Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create Desktop Application using Java backend & Web Technologies UI

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.

like image 658
Mihir P Avatar asked Aug 04 '10 04:08

Mihir P


2 Answers

First of all, it is possible. If you are looking for example, check http://wiki.eclipse.org/Hudson-ci/Meet_Hudson. You can get basic architecture if you dig into their code. It does not use any embedded db. You are saying your application will always be offline, in that case I suggest you to go for pure desktop application using technologies like Eclipse plugin development.

If you already made up your mind, here are some points that can help you based on my experience with similar application,

  1. Although your application is offline(I assume, your application need not connect to any server for any use case but the user machine can access internet ), you need to deliver changes(for example, change in html or jsp page )/bug fixes transparently to end user. JNLP/Java web start is a good fit for this.

  2. If you are going for JNLP way of installing, you launcher should take care of embedded db installation and ports at the end user machine(this is big problem than it appears).

  3. Also if you are launching server(in my case, Jetty) through JNLP, you will come across Class loading errors due to permission issues. Be prepared to dig through server code. I have done it long time ago and I do not have code now to point exact issues.

  4. Show progress bars during installation process and during your application startup. Your war deployment takes some time and user needs some of knowing that application is startup is in progress. You will end up writing some swing UI.

  5. Launch URL of the application automatically in default browser of the user system, after application startup. You do not need embedded browser.Check http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/desktop_api/.

  6. I used MySql as embedded data base. Check Embedding mysql in java desktop application. It worked for me, I did not come across any problems.
like image 136
Adisesha Avatar answered Sep 21 '22 23:09

Adisesha


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.

like image 20
jreznot Avatar answered Sep 21 '22 23:09

jreznot