This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java fx and Web view for hybrid application

 
Claude Moore
Ranch Hand
Posts: 829
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Times ago inthis post, discussion ended with a speculation about a possible use of JavaFX Webview component as a possible way to migrate from rich client to web applications, in the form of hybrid web application (where for example app modules would be actually web pages displayed and somehow controlled by a desktop application). What do you think about this approach? Would it be only a big mess?
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see it as a justifiable approach for many situations, and I see it that way both as a user as well as a developer.

As a user, there are still many(?) people whose personal tastes lean towards desktop apps rather than web apps.

I'm one such myself.
I still prefer using libreoffice/openoffice/word over google docs - I can create documents fluently with the former, while I feel
irrationally put off by the gdocs interface.

I prefer the outlook/thunderbird interface over gmail. I prefer evernote's desktop app (which uses embedded Qtwebkit) over evernote web...

I prefer writing wordpress blog posts using my own javafx desktop app (which provides goodies like markdown, code syntax highlighting, web camera integration and immediate wysiwyg preview in an adjacent webview pane) over WP's timewasting submit->view->edit cycles.

I prefer using my own javafx app that shows google maps in a webview, to create and organize my personal points of interest and store them in my own database with the fields I want, rather than bend to google's storage and data model.

I think most people who maintain digital diaries would prefer that their most intimate and private thoughts remain on their own machine, rather than floating around in some private company's cloud.

I once worked with one paranoid entrepreneur who preferred using desktop MSWord over Google docs because he was convinced his idea was so earth-shattering that Google would steal it

My point is, there are many users who prefer the desktop app interface, and apart from suiting their individual tastes, they may also do so for reasons like mistrust, privacy and security.

From a development viewpoint too, there are some situations where such hybrid apps makes sense.
One reason may be that a 3rd party's web application can have its usability enhanced by native desktop app interface (like the wordpress and gmaps examples above).
Another reason is that the application is of such a nature that local storage and processing would be better than remote (like the diary example above).

From a design viewpoint, I don't see any reason it has to be a mess.
1) If it's a desktop app only to enhance the web app's user interface, then webengine's java<->javascript bridges provide an easy way to communicate information from the desktop interface to the web app logic. The web app can still do all the usual things it does, like sending ajax requests to a remote cloud. Or it can just make calls back to the java logic via the bridge.

2) If it's a desktop app where the server component has to be a local server but the web app still wants to use ajax, then the desktop app itself can provide a HTTP server interface using an embedded container like jetty, or even using plain httpcomponents routing.
 
Claude Moore
Ranch Hand
Posts: 829
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Karthik for your long and interesting reply. To be more precise, at work we are searching for a strategy to move from a desktop based application - quite a big one, with a good amount of business logic already put on appserver's side - to web based application, and porting single modules using Webview seemed a seamless transition to me.But what seems at a first glance a good idea is often not so good when you look closer...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic