The Source for Java Technology Collaboration
User: Password:



Simon Morris's Blog

Simon Morris Simon Morris started coding professionally back when 1 MB of RAM was considered decadent. He eked a living writing games for a while, before winding up scribbling R+D code at a top UK university. In early 1996 he discovered Java, drawn immediately to its latent potential - which, he reckons, it still hasn't even begun to tap. He now owns a laptop with more than 1 Mb of RAM (but doesn't like to boast about it).



Thinking Declaratively in JavaFX

Posted by javakiddy on May 26, 2009 at 11:23 AM | Permalink | Comments (3)

JavaOne is coming up, and with it no doubt a slew of enhancements to JavaFX. Many of you reading will have no doubt dipped your toe into the waters of Sun's new platform, but how well do you really understand the power of its Domain-specific language, JavaFX Script?

I've had a pretty good excuse to write lots of JavaFX code of late, and to be exposed to some of the difficulties programmers first have when approaching the language. One of the common stumbling blocks seems to involve the shift in thinking from purely procedural source code (where the function/method is our chief currency) to the declarative source code supported by JavaFX Script (where code may be nested into a tree structure).

So, what I'm going to do in this post is take a problem ripe for declarative exploitation, and show how JavaFX Script might change the way we tackle the solution. For newbies struggling to understand the power of JavaFX, hopefully this will be an eye opener. For the uninitiated, perhaps it might demonstrate how JavaFX Script differs from Java and other languages.

The example I've chosen is the parsing of an XML file — a simple enough task one might think, but a task which highlights the stark contrasts between the structure of the document being processed, and the structure of the source code processing it. (Hopefully that last sentence will make a bit more sense by the time you've finished reading this posting!)

Continue Reading...



May 2009
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            


Search this blog:
  

Categories
Community
Community: JavaDesktop
Community: Mobile & Embedded
Deployment
Games
J2ME
J2SE
Programming
Security
Swing
Web Applications
Archives

May 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006

Recent Entries

Thinking Declaratively in JavaFX

JavaFX in Style

No Future In Java

Articles

Kickstarting Google Web Toolkit on the Client Side
The focus of most Ajax development is the interaction between a slightly richer client and the server, with not a lot of attention paid to how much can be done on the client side. In this article, S. E. Morris takes the Google Web Toolkit and focuses exclusively on the client side, showing how to perform sophisticated layout and animation and providing compelling demos that never make a server call. Jun. 27, 2006

All articles by Simon Morris »



Powered by
Movable Type 3.01D


 Feed java.net RSS Feeds