JavaFX Forms Framework Part 5

4 09 2009

Introduction

Tilghman Island

Tilghman Island

This is the final part in a five part series of entries creating a proof of concept for a JavaFX forms framework.  Here, I will conclude with some thoughts relating to using JavaFX to build a forms framework. If you are here for the first time I recommend going to the beginning: Part 1 “What is a Forms Framework?.  By now we should know why it is very important to understand the MVC architectural pattern and how it applies when building applications (especially form type applications). The forms framework helps provide manageable code and clear boundaries for both the designer role and developer role. This allows a designer to focus on the usability (look and feel) of the application meanwhile allowing the developer to focus on the service components and business logic. Next, I want to talk about the popular and ambiguous acronym ‘RIA’ (better known as rich internet application).  You are probably wondering what does RIA have anything to do with a MVC forms framework?  Well, let me try to explain. To some people ‘RIA’ is a buzzword and to some people its actually a tangible software development platform. I have a hunch that some people are not convinced they should jump on the bandwagon or not.  But whatever you choose to agree with, I believe as we slowly become convinced what RIA is and how it fits into our domain an MVC forms framework should always be considered when building larger scale forms based applications. I want to begin by discussing RIA from a Swing/Web/Enterprise developer point of view (considering that’s my background).

Swing/Web/Enterprise Developer

Like most of us who had previously come from an enterprise background noticed the Web 2.0 looking applications getting lots of attention.  Whenever I hear the word RIA, I really think that it should be called  “Rich Applications” and drop the ‘I‘ because all clients should look and feel great regardless if they were connected to the Internet or not. So, usability is key to making client side applications connect with users. This year I was fortunate to go to JavaOne 2009 and experience all things rich client (some enterprise) and one of my last sessions was about Craftsmanship in Software from Ben Galbraith. He mentions “the most important aspect of software creation: crafting an amazing user experience.” This makes me realize that as applications become richer, consumers will demand richer content (a vicious cycle).  But,  I still believe enterprise-y looking applications (not so flashy)  using Swing will still have its place in the world of rich client. When developing rich clients I’ve found Swing GUI development to be quite pleasant to work with, however at times certain things  seem pretty hard to do such as animation, binding, and validation.

Martin Jet Pack

Martin Jet Pack


JavaFX

If you are like me who enjoys software development will learn over time some good proverbs and principles that surface. One saying I’ve heard was “Letting Go of Your Bananas”, which can be applied to your life and not just software. In terms of software I feel its OK to let go of some things and embrace other things. So, it’s healthy to be early adopters, but always keeping in the back of your mind past concepts that are tried and true.  An example would be “Swing/Web Frameworks” where everyone created their own or used the vast number of open-source libraries out there.

Rocket man - melbourne show (Fir0002/Flagstaffotos)

Rocket man - melbourne show (Fir0002/Flagstaffotos)

Conclusion

As the JavaFX community matures I believe forms based frameworks, GUI tools and application frameworks should start appearing, making many developers’ jobs much easier. I think there will be a day where Java developers around the world will not think ‘Swing is Hard‘, but say ‘JavaFX is extremely Easy‘. I encourage you as the reader to explore and learn as much as you can about JavaFX because it’s not every day that you can start from the beginning to learn a soon-to-be-popular language. Enjoy!

About these ads

Actions

Information

6 responses

4 09 2009
JavaFX Forms Framework Part 4 « Carl’s FX Blog

[...] While some features of the ‘User of the Application‘ perspective may seem debatable, I believe a forms framework should at least have all the features described in the ‘User of the APIs‘ perspective. As a framework implementer one should design a plug-able architecture for custom components. Components should be wrapped and registered when assembling a form. I’m sure there are many features I have not mentioned.  As JavaFX matures I believe GUI builders providing WYSIWYG development will eventually allow third party GUI controls to be added to their control palette. Next, I will discuss Part 5 Concluding thoughts. [...]

4 09 2009
ABC

“soon-to-be popular” or is it just the next hype? What is exciting today may fade away tomorrow. Currently FX people start again with a “hello world” and wait until tools like a UI builder, working debugger, … exist or useable UI controls like a tree view will be implemented again and again.

How many times will the world still reinvent the wheel? There is nothing new or innovative in JavaFX beside some fancy colors. The only thing is that it makes life a little bit easier for people who struggle with things like swing.

I’m tired of riding this cycle with any new language appearing. So I looked at something thats already existing and mature and to my own surprise I found a language called Smalltalk (which I thought was dead since there is not much buzz around).

But if you want to really learn about MVC or where XProgramming, unit testing, refactoring, … were invented then download a Smalltalk system (like the free MIT licensed http://www.pharo-project.org or http://www.squeak.org) and meet people like the inventor of MVC (Trygve Reenskaug) in person on the developer mailing lists. Thats amazing.

Even today they have much knowledge and experience to offer and I currently enjoy this very much.

5 09 2009
carldea

Mr. ABC,

Before I reply, I just want to say that I have the utmost respect for great pioneers such as (Trygve Reenskaug, Alan Curtis Kay, Daniel Henry Holmes Ingalls, Jr. and others). I’m fully aware of their accomplishments and sorry I didn’t detail the origins of every known concept and technology known to man (after all this is a personal blog). I’m sure there are others who have blogged about the history of MVC and Smalltalk. I am not here to start a language (religious) war.

Disclaimer: The views expressed on this website do not necessarily reflect the views of the company I work for, Sun Microsystems, Oracle, wife or my dog. I also don’t do JavaFX for a living.

I appreciate being schooled by you (I know my ABCs by the way), but If you are adamant and you want to make a hard stand on a bunch of silly opinions please don’t be anonymous!

Re: “soon-to-be-popular”
Last time I checked, “people” are what make things popular. So, it’s up to “you” to convince the world “MVC on Smalltalk (or Smalltalk on MVC)” is the definitive way to go. Please point me to a spokesperson who can tell me the road-map and time-line that is better or equally compelling as Sun’s marketing slogan “All the screens of your life” (TV, Mobile, Desktop, Browser, Navigation systems, devices, etc.) . I don’t know how many Squeak VMs are out there, however it is a good idea to choose a platform based on the number of VMs out there and I believe the Java VM is one of the top 3.

Re: “There is nothing new or innovative in JavaFX beside some fancy colors”
You got me there!
To be serious RIA is the future and so, love it or leave it. Currently the headlines always talk about “Flex”, “Silverlight” and “JavaFX”. So, the goal of the JavaFX platform is to provide the best user and developer experience to the “People”.

Re: “I found a language called Smalltalk (which I thought was dead since there is not much buzz around)”
You answered yourself… being popular you gotta make the buzz!

Re: “meet people like the inventor of MVC (Trygve Reenskaug) in person on the developer mailing lists. Thats amazing.”
What’s amazing is how concepts can take on new forms. Being too dogmatic can hinder that change. For example: JavaFX controls API has a modified ‘MVC’ architecture.
Skinning UI controls:
http://fxexperience.com/2009/06/javafx-ui-controls/
I did meet the inventor of Java (my Flickr account).

If you are passionate about Smalltalk, you may want to talk Daniel Ingalls, Jr. (Sun Fellow) regarding (Squeak on the JVM) to discuss with him on the JSqueak mailing list or ask Mission software to open source their work.

One should try to learn ALL the languages.

P.S. Don’t gulp the kool-aid just sip it.

Bye T.B. from Germany

-Carl

6 09 2009
Java desktop links of the week, September 7 | Jonathan Giles

[...] Dea has posted parts four and five of his five part series on a JavaFX Forms Framework he has been investigating. Note: Carl updated [...]

19 02 2010
Jesus

Hi Carl. Can you send me via email the complete source code for the sample discussed, if it isn’t copy righted? I’d like to learn more about javaFx. I am currently developing an application that uses my JnrFramework and I plan to use javaFx UI components as a way to explain how to integrate it to my java framework in a ‘client/server’ base architecture. If I get success with this small application, I probably continue to use javaFx for my other open source project (OpenETL).

22 02 2010
carldea

You may want to look at the code here: http://code.google.com/p/jfxtras/source/browse/jfxtras.samples/trunk/CarlFX/fxforms/#fxforms

I’ve made some minor changes and have not committed them to this source. This code is just a proof-of-concept, to demonstrate a demo. One thing important that I changed was instead of making a Form a class to be extended, it should be a Mixin class. This provides reuse and derived forms can extend MigLayout or CustomNode, etc. along with interfaces and mixin class (multiple inheritance). Also, there are things such as binding to combo boxes and other controls not implemented yet. Please feel free to use the code and change it to your liking, it would be nice if you could include the copyright information. If not, just mention to others about the JFXtras library or my blog.

I hope that helps.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

Join 74 other followers

%d bloggers like this: