Is it possible to create Desktop Application using

2019-02-02 00:42发布

I would like to create a desktop application in Java & web technologies. The main reason for selecting Java is that it is free, open source, and hence our investment would be minimal and we would save lots of investment with respect to licensing costs, etc. Also, the main reason for selecting web technologies is because our current programmers are well versed with web technologies like HTMl, css, Ajax, and we have good experience in creating amazing UI in web technologies.

I will give you some idea about the software that we would like to create. It would be a desktop based software, namely something like an ERP software.

The key requirements are that there should be a great UI and it should be fast and not very resource intensive.

I have heard that implementing a great GUI is possible, but difficult in Java. It can be done but is complex, whereas it is pretty simple to do the same in Visual Studio, Microsoft products.

I have also checked Adobe Air, Nokia QT, etc but they all are pretty expensive for us and we are looking for front-end browser UI and backend embedded server/database using java technologies.

Is it possible to create a desktop software in which the UI is created using the web technologies and there is an embedded server (like jetty or tomcat) and database and the backend programming would be in Java. How does JavaFX fit into this?

So basically, the desktop application would have an embedded browser (mozilla or some java browser which can packaged with the software), but the end user should never realize this.

I look forward to getting feedback about the same. Can you please provide some examples of software created in a similar combination of java + web technologies.

I did study some softwares like PulpTunes & Zimbra which were along similar lines, but they seem to be connecting to internet to display data. Our software would be totally an offline desktop application.

7条回答
迷人小祖宗
2楼-- · 2019-02-02 01:32

You are truly right, java is great if you are developing a project by self.

Server side coding can be done using Spring (For MVC, Database etc...Very rich and ligthweight framework, easy to learn and understand) with hibernate(ORM framework for Database handling, provides dialects for any Database server).

For UI, you can use Spring MVC OR JSF OR GWT OR javaFX. JavaFX provides JNLP download, which runs on java and without browser. check the link for more JavaFX samples. http://javafx.com/samples/

So its on you, what you want to use for UI side. If you prefer web UI (Not javaFX i mean) then you can have many options.

For Ajax, you will have libraries which support easy ajax. like DWR (Easy Ajax, JS to JAVA) and many other JS libraries like yahoo, jQuery etc.. can be used.

hope this helps.

查看更多
虎瘦雄心在
3楼-- · 2019-02-02 01:32

I didn't get the embedded jetty/tomcat part. You want the desktop app to run an embedded server that talks to the database? So each desktop app would open a DB connection?

Why not have a Java desktop app that sends HTTP requests to a JavaEE server that connects to the DB and processes the requests? So basically, a Java client (which could be as rich as your developers can make it) replacing a browser. This gives you a lot more scalability, etc.

We have a similar (albeit much more complex) product developed using - Swing + Apache Commons HttpClient on the desktop. This makes an HTTP POST request with serialized binary data to the server. - A dispatcher servlet running in a web container that recreates the Java object on the server and executes the request.

查看更多
ら.Afraid
4楼-- · 2019-02-02 01:34

IMHO the whole idea of running a web-server just to create a desktop app with js and ajax and stuff is horrible... I heard about Apple-creator Titanium which is allows to create crossplatform apps using web techniques. There are couple other similar programs as well.

I think you'll end up better buying a good wyswing Swing design tool for java ui which will cost you couple hundred bucks but will save you lots and lots development trouble. It is very hard to believe that laying out a nice desktop app is more complicated than laying out a web page.

查看更多
Explosion°爆炸
5楼-- · 2019-02-02 01:36

We are looking to do a very similar thing. We have an existing Java Web Application. We have tested running this on a desktop system installed with Jetty and MySql. With the Chrome browser in "app" mode it looks just like a desktop application.

We are looking into this approach as a way to implement a cross-platform (pc/mac/linux) offline version of our existing mature online web application. I would like to hear if anyone knows of similar projects or can poke any holes in the idea of running an application server for a desktop application. Our goal being, of course, to have essentially one code base for both the server and desktop implementation with protected variations where necessary.

查看更多
该账号已被封号
6楼-- · 2019-02-02 01:38

Yes, it is possible. See https://github.com/jreznot/electron-java-app demo. There you will find an easy way to build Electron based application on Java, without compilation to JS, just Java application inside of embedded Jetty instance with Vaadin UI.

查看更多
你好瞎i
7楼-- · 2019-02-02 01:38

I will probably get stoned for this, but I suggest JavaFX for this. We have successfully implemented a JavaFX-application for internal use in a larger company. The advantages are that the software is "controlled" on the server side (thus, nobody will have an "old" version). Installation effort is minimal (Java Web Start fixes this for you, it will even trigger a minimal JRE-installation if none exist) and last but not least, JavaFX can be run in the browser and as a pure desktop application alike without having to change the code.

Adobe FLEX is another contender, but it lacks the "Web Start" bit and is not quite as flexible when it comes to easy migration between browser and desktop.

Anyway, JavaFX is not quite feature complete as FLEX but version 1.3 can be considered battle-ready and you can create neat stuff with the free JavaFX plugins for Adobe Creative Suite (if your app will contain any graphics, that is).

查看更多
登录 后发表回答