• Home
  • About
  • JavaFX Script Productivity Part I of II: Learning

    June 27th, 2007

    The team of guys that worked on the “Music Pinboard” application are all seasoned Java/Swing/2D (and ULC) experts. So although it’s been a while, we do recall that it took us a little while to really learn these APIs in depth, not to mention the various subtleties behind them. We have also coached relative beginners in Java and have, not surprisingly, witnessed the process taking even longer.
    So an important question for us to consider was: Is learning Java FX script (JFX) significantly easier than learning Swing?

    Admittedly, we can’t be entirely objective when answering this question because – good news – knowing Swing (what components and layout managers are available etc.) gives the developer a significant jump-start. This fact was one of the reasons we were able to construct “Music Pinboard” so quickly.

    Nevertheless, there were a number of aspects of JFX, which were novel to us, and which therefore demanded special attention:

    • JFX’s declarative constructs
    • JFX’s (sometimes unnecessary) deviations from Java syntax
    • Provision of animation
    • JFX’s threading model
    • Discovering how to integrate external components

    To assist in the first four of these areas, we found the pages provided by Chris Oliver, which document numerous F3 examples, to be the most useful. (Aside: JFX was called F3 prior to its rebranding for the JavaFX product line.) But we should bear in mind that the provision of WYSIWYG tools for JFX could potentially eliminate most of the learning time here, at the same time reducing the barrier of entry for the non-Java specialist. The company ReportMill has provided an early version of a tool – JFXBuilder – which demonstrates the kind of support, which will be required by such users. We didn’t use JFXBuilder for “Music Pinboard”, but as an aid to learning the tool proved useful on some occasions (construct a GUI using the point-and-click builder, look at generated source code etc.)

    Let us then consider three types of developer:

    1. The non-Java programmer, with no interest in becoming a Java expert, perhaps with a background in web authoring and/or UI design
    2. The Java programmer, with no Swing (or similar) experience
    3. The hardcore Swing developer

    Firstly, a non-Java developer will certainly require the a good WYSIWYG tool before s/he can become truly productive with JFX. Although, as mentioned above, at least one early solution is available today, anyone coming from an Adobe/Flash background will likely find the lack of industrial strength tools for JFX reason enough to reject the technology.

    For the Java programmer with no prior Swing experience the situation is different. If the requirements are to produce a non-trivial GUI, then this developer will quite likely get off the ground quicker with JFX than with Swing, because s/he will have to learn about widgets and layout managers in either case, and because it is simply easier to construct GUIs using JFX’s declarative syntax than with Swing. Learning time? We estimate for Swing from 2-5 weeks; for JFX 1-3. The reality will, of course, vary significantly depending on the person involved and the environment in which s/he works.
    For obvious reasons, the “seriously hardcore” Swing developer is less likely to profit from the simplifications provided by JFX than his non-Swingy counterpart. JFX is, after all, a new language, which deviates from the Java programming model in significant ways. This type of developer will likely complain about the inconsistencies and seemingly unnecessary deviations from Java syntax, which hinder his or her learning, and may consider joining the OpenJFX project in the hope of having some influence. On the other hand, if the next GUI development is calling for extensive Java2D effects and animation, then even this type of developer will likely experience a productivity boost using JFX, and may therefore find the 2-3 days (our estimate based on the “Music Pinboard” experience) of learning time a worthwhile investment.

    Finally, if choosing a language like JFX as opposed to Java Swing or Groovy is a strategic i.e. long-term decision for your organization, then the initial learning curve will not prove that significant. What is important here is the potential improvement in productivity once the learning stage is over (we will address this in JavaFX Script Productivity Part II of II: Developing), as well as many other technical factors, which we will consider in future blog entries.

    To conclude, ease of learning definitely impacts the overall attractiveness of a language or platform, and was one of the reasons for Java’s success as an alternative to C++. Sun and the wider JFX community will have to improve its current level of Java-syntax and WYSIWYG tool support for JFX, if it is to find acceptance with programmer and non-programmer alike.

    Related posts:
    Java FX: An Overview
    JavaFX Script: Canoo discerns Hype from Fact with “music pinboard”


    Jazoon Monday

    June 25th, 2007

    Ted Neward spoke about “Why the next five years will be about languages”. He first started with the wide gap between practitioners (software programmers) and academics, which define/invent new programming languages. Up until now the wide gap exists because it was one thing for the academics to define a language for some new concepts but another story to make it usable in the real world. Virtualization narrows this gap. It is possible to build language on top of virtual machines (JVM but also Microsoft CLR). That makes the design of new languages a lot easier, one gets most of hard-to-implement features needed for the real world for free (e.g. support for different hardware, garbage collection etc. etc). He gave an impressive lists of powerful languages which already run on virtual machines. Neward finally ended with the following conclusions that developers should:

    • learn these languages
    • use these languages to gain productivity
    • start to build new languages.

    All in all a really enjoyable keynote.

    After lunch I attended What’s wrong with Java by Aaron Digulla. What could have been a nice follow-up of the keynote ended in some kind of a rant against Java by comparing Java against Python and Groovy. He made one important point – even if it’s not new though: A lot of Java supporting frameworks use XML and that creates another problem: the information is spread in different places.

    JBossSEAM certainly speeds up the implementation of JSF applications. Andy Bosch pointed out that you will probably hate it if you are a friend of strict layering. That’s because SEAM components can be used as a model in the presentation layer as well as model for an EJB entity bean.

    I was looking forward to Impossible Possibilites by Michael Wiedekind but was a little bit disappointed. He announced that he was going to talk about something else but forgot to mention the new topic which left me a little bit out in the blue. Also trying to squeeze a 70 minutes presentation into 35 minutes didn’t improve the presentation. Which was a pity because I think it could have been interesting and fun.

    After having listened to Walter Bischofsberger presenting his architecture monitoring tool I attended The Power of Tracing held by Tom Sprenger and Christian Siffert. They talked about the importance of tracing especially in distributed environments and about the difficulty of achieving it. They added three additional levels on the top of Log4J:
    1. Enforcing a common syntax for the logging
    2. Enforcing logging in every method on entering and leave (with source code interweaving). This ensures that the context of a log message is available
    3. By adding a transfer id into remote calls they were able to to trace a call over remote locations.

    It was quite a long day with a lot of sessions. The conference is held in the cinema complex of Sihlcity which means big screens and comfortable seats. Another advantage of Sihlcity is that if you don’t find a suitable session you can always go shopping ;-) . (Which I didn’t!)


    RIA Technology for BPM Software

    June 25th, 2007

    I just heard that an UltraLightClient (ULC) customer will be presenting two talks at Jazoon 07.

    There’s a technical session discussing “Process-based Application Development: A flexible and end-user centered way of creating software” on Tuesday, 26th June. The presenter is Kaspar von Gunten.

    The version 4.0 of Xpert.ivy (which is still under development) takes advantage
    of the Canoo ULC framework to provide a rich web interface for users of the
    processes and workflows. At any point where the process requires user
    interaction, a previously designed ULC panel is presented to the user. Such
    panels can have any level of complexity and richness; depending on the kind of
    data presented and functionality required for manipulation.

    And there’s the corresponding software demo: “Bringing BPM and RIA together: Process-based ULC application development“, scheduled for Tuesday, 26th and Thursday, 28th June.


    Talks at JAX India 2007 (May 30 & 31, 2007)

    June 25th, 2007

    This was the first time that a JAX conference was held in India. It was a 3-in-1 conference covering Java, Eclipse, and Enterprise Architecture (including SOA). I attended the event on the last two days and found it to be very well organized and well attended.

    The conference was held at Indian Institute of Sciences, Bangalore and therefore had an academic setting.

    I met few interesting persons at the talk some of whom knew Canoo and ULC:

    • Ralph Mueller of Eclipse Foundation, Europe: He expressed a wish that ULC would be ported to SWT!
    • Neelan Choksi of Interface21: He represents a company which has contributed most to Spring and is now offering services for Spring.
    • Alexander von Zitzewitz of Hello2morrow: He had a booth displaying his SonarJ tool. He is a ULC customer and has presented SonarJ at Canoo, Basel.
    • Craig McClanahan of Sun Microsystems: He gave an interesting talk about Architecture Options for Next Generation Web Applications where he discussed about where to put the view, controller, and model tiers, and the technology options (both Java and non-Java) for each approach. I spoke to him briefly about ULC and how it can fit into his scheme of things.
    • Suresh Shamana of LifeRay, Europe: He spoke to me about his JSR 286-based Portal Server.

    I gave two talks:

    Rich Internet Applications and AJAX – Selecting the Best Product
    This talk elaborated on the ideas first presented in Marc Domenig’s article: http://www.javalobby.org/articles/ajax-ria-overview/
    The main point is that you carefully need to evaluate the various rich web UI technologies available.

    There were about 40-50 people in the audience. Listed below are a couple of interesting questions attendees asked:

    Q. Why not Java for multimedia and animation?
    A. JavaFX is an effort towards simplification.

    Q. How to strike a balance among requirements and strengths?
    A. The best architecture appears to be an application independent presentation engine on the client and presentation logic, business logic and data on the server. Within this space Java based solution can provide industrial strength quality.

    Java Rich Internet Application (RIA) Pattern
    This talk was mostly about the use of the Presentation Model pattern to capture the presentation logic of a rich user interface.
    In addition it discussed patterns for validation as well as granularity of data and services. Again there were 40-50 people and lot of questions:

    Q. Detailed design of Presentation Model
    The presentation model contains the dynamic or mutable state and presentation logic of the GUI independent of the underlying widgets. It mediates between V+C and M of the classic MVC pattern.

    There was an interesting discussion about how the presentation model differs from the mediator pattern in the sense that it mediates between the Business / Domain Model and the presentation.


    RIA course at ETH Zurich

    June 25th, 2007

    In addition to tomorrow’s session at Jazoon 07, there’s another event I’d like to highlight:

    Canoo’s CEO, Hans-Dirk Walter, will be presenting a course on Rich Internet Applications (RIA) together with Prof. Dr. Donald Kossmann and Prof. Dr. Gustavo Alonso on Friday, 29th June at the ETH Zurich.

    Details are available at: http://www.inf.ethz.ch/kurs41
    See the Canoo press announcement here.