4193869276_1c43c12a9a

Firefox IE8 Chrome Opera Safari – best browser for Java?

Initially, I was not going to write up about browsers until I had to download all the known web browsers to test a project front-end. I already had Firefox, IE8 and Chrome installed therefore all I had to do was to download and install Opera and Safari. There might be other browsers outthere but this what I am working with for the moment. So what’s the problem? You might ask. Well, I decided to see how simple it would be for a normal user without much computer experience to view a Java-enabled application embedded in a web app or simple HTML page.

Before I go on about what I think, first let me give you an idea of the PC I am currently using:

  • Dell PC with a dual 22″ screen (customised version of Inspiron 530)
  • 4Gb of RAM
  • Intel Pentium Dual 1.80GHz (looking to upgrade this after xmas)
  • Windows Vista Ultimate (how rubbish is that?)
  • Java RE version 1.6.0_17
  • and a few other hardware and software.

So as you can see, my personal PC is quite simple in settings. Ok, for some reasons, I decided to launch all the browsers at once and load the JavaFx homepage (http://www.javafx.com) and all I wanted to do was to compare which one loaded the fastest. Here are my findings, in brief:

Firefox
This is probably the best browser outthere but lately it has been crashing on me. And btw, it does not cope well with Google Wave. Anyway, here is what Firefox gave (see screenshot):

As you can see on the above screenshot, the JavaFx homepage loads in its entirety. To be quite honest, the page was loaded without any fuss but bear in mind, I already had Java installed. The “Demos & Samples” box in blue requires Java to be installed as it a JavaFx applet. As I already have the JRE installed, the browser did not ask me for any plug-ins ( I could be wrong feel free to share your experience).

Internet Explorer 8

I am not a great fan of IE in general, but for this simple test; IE8 loaded the page faster than Firefox. Also, it did not ask me to install a specific plugin in order to load the JavaFx portion of the page. IE handles Google Wave much better than Firefox, so this is the browser I use to interact on the Wave.

Google Chrome

Google Chrome, like Firefox and IE, did not cause any problem and it was the fastest at loading the JavaFx page including the Java applet. So far, it is the best performing browser but it is not my personal choice so I rarely use it. Also, I like the fact that Chrome scales the page to fit nicely in its window.

Opera

As you can see in the above screenshot, it seems as if the applet was not fully loaded. Indeed, Opera has loaded some portions of the JavaFx applet but I do not know what is happening here now. This page has been the same since I loaded the browser until now. Again, Opera did not ask me for any plugins to be installed nor did it ask for anything else. I suppose this is not an issue from Sun 😉 but something that the Opera team should look at. I know Opera can find the JRE on my system (see screenshot below) but it seems not to be a big fan of Java. In the screenshot below, you can see the JavaFx splash screen but this is all you will see and nothing else. Off-subject, I really like the user interface and I might start using it for a bit longer just to see if it can convert me.

Safari

Ha! what the hell happened here. I have my JRE installed, the previous four browsers did not ask me to install Java (again!!!). The demo applet did not even load, this is Safari running on Windows machine not Mac. So I did what it has asked me for the thousandth time. I clicked on the provided link, takes me to the Java RE download page and I did all the required and look!!!!

Java!!!!! This is the confirmation that I already have the software installed so what’s the big idea? The Apple team are not doing a good job to support Java but I can browse to Youtube and watch video without installing Flash player (it recognises that it’s already installed). Well I do not think I will be using this browser again anytime soon.

Final words
When it comes to browser to support, you have to test your application on multiple browser ( and OS platform too) to make sure it will not affect the expected user experience that we are so accustomed to.

I do not know why Opera and Safari have issues with the JavaFx site, it could be anything from the site designers to the respective browsers’ team. I believe that Java is probably the best Cloud computing platform currently outthere (when it comes to high performance applications) and that browser providers should make sure that at least they do support the platform.

I have a question:

Who should be to blame if Java or any other plugins such Flash is not supported in the browser? The plug-ins developer or the browser developer?

I believe the plug-ins developer should be to blame as they can be a million plug-ins on the net and you cannot possibly cater for all of them. But on the other hand, as in Java ‘s case, the plug-in is supported without any major issues by the top 3 which accounts for 93.9% percent of the market (based on November 2009), should you as the plugin developer care? I say yes at least for the Mac users’ sake. We can overlook opera for now but I am sure that all the Apple fans still use Safari as their prefered browser. Do not try to leave them out, they brought us the iPhone.

Anyway, based on my simple test, I think the best browser for Java applet is (in order of best performance):

  1. Google Chrome
  2. Internet Explorer (make sure you do support this browser as a priority)
  3. Mozilla Firefox (this should also be supported right after IE)

The other two browsers are not included as they did not even successfully launch the applet. I am not saying that you guys are going to have the exact same issue as me and therefore looking forward to your comments.

4190189872_6bb23523e5

JavaFX Composer RAD Tool – First Review

Just over a week ago, Sun announced a RAD tool for JavaFx built on the Matisse framework, I believe. I was very critical of JavaFx for its lack of tool for building UI and I think this is a step in the right direction. The tool was made available through the NetBeans Update Center on the 14/12/2009. OK, so I have installed the plugin and here are my views; not just on the tools but also on other stuff I think would benefit the JavaFx community:

When comparing something, it only makes sense when we use a benchmark; here my benchmark will be Adobe Flash Builder (formerly known as Flex Builder). Over the years, Adobe had made it easy for the designer to build impressive user interface with minimal coding. Sun, in the other hand, made it easier for developers to build application, yes I am aware of some nice UI in Java but they still do not compare to the eye candy of Flash/ Flex.

I am going to look at the tools; Flash Builder and JavaFx Composer plugin, from a developer perspective.

Components:
A key feature of RAD tools is the amount of components they make available to developers without having to write too many codes. I understand the plugin is at a “preview” stage, whatever that mean (alpha?), but there are alot of missing components; as an example, this release version was meant to be a “preview” of what to look forward to but I cannot drag a “combox” from the components palette into my form, no data grid, no chart, no menu bar, no date components and can’t even draw a rectangle which is possible but only through coding. I hope the JavaFx team add all the components available in JavaFx plugin to the Composer.

moz-screenshot-2NetBeans JavaFx UI Composer

moz-screenshot-4Adobe Flex/ Flash Builder

Round-trip code update
One thing I dislike with Java IDE’s (or most of them) is the inability to change the generated code without requiring you to write more code. The Adobe team actually made a good job in giving more freedom to the developer. In Flash Builder, you can design your UI through drag-n-drop but also customise it directly through the XML file (MXML). This feature was not available in NetBeans Matisse, I could be wrong, but and again Matisse was not really used in large project (no comments, thanks), at least not were I worked. Why all the fuss, you might ask? Try to create a simple interface and add a “rectangle” object to it which you will use as a toolbar and tell me how simple that was.

The coding style in JavaFx is very similar to Flex/ Flash ActionScript (so why the “V”oid instead of void, but that’s another issue) and very easy to learn. So far, I found it easier to actually code the canvas then using the Composer plugin. Another thing, when inspecting object properties; not all properties are available, for example: the gradient properties are not available, which will require you to write more lines of code.

UI Preview Panel
Again, a feature which Adobe Flex/ Flash builder excels at (I feel like I am starting to sound like an Adobe salesman) is the synchronize preview of codes. This is not a due to JavaFx Composer plugin but this seems as a bug as sometimes, you might have to restart the IDE in order for the UI Preview panel to start working again. Hopefully the introduction of the RAD (or not so much RAD) tool, will fix this issue.

Conclusion
You might feel that I was on a JavaFx bashing quest but this is not the case. JavaFx might not have a large components set (well what about all the SWING components available which you can use? You might not be able to “skin” them to your application look and feel but they still availabe to you) but I still think it has a good future. If you take a look at the screenshot below which was built with Adobe Flex, it took me less than five (5) minutes to build. Now time to synchronize your watches and tell me how fast it will take you to build the same interface using JavaFx Composer plugin. It will probably take me less than five (5) minutes if I was designing it with Matisse. My point is; a RAD tool is supposed to promote productivity and YES!!! I have realized this is a “PREVIEW” release but can you actually use it? I know I will still be coding JavaFx for the foreseable future and I would love it to succeed. If you are going to call a tool “a RAD tool for building Form-based JavaFx UI” then I suggest that you provide most of the form components.

Should JavaFx UI RAD tools be based on XML like Android and Adobe Flash Builder?

moz-screenshot-5

5 components I like to have on JavaFx

  1. Menu and tool bar (come on guys, this was there in previous release)
  2. Grids (even just a simple table will do. For now I use JTable)
  3. Date picker, Rich Text and Navigator components
  4. HTML panel (something that display HTML and can also be used as iFrames)
  5. Panels similar to JInternalFrame (this will be useful in portlet-like applications)

I know it’s not really 5 things but they will make a difference. Thanks for reading and tell me what you think about JavaFx and its UI Composer.