Steve On Java

Hacking Java, JavaFX, and Raspberry Pi
  • rss
  • Home
  • NightHacking Tour
    • [Archive] NightHacking Europe – The Road to Devoxx
  • SvJugFX
  • JFXtras
    • JFXtras Individual CLA
    • JFXtras Corporate CLA
  • 2013 Travel Map
    • Let’s Meetup!
    • 2012 Travel Map
  • Contact

Joining NASA to Conquer Space with Java

steveonjava | April 1, 2012

This was an April Fools’ spoof — everything is factual except the company I joined.  Read more here.

Just in the past year I lead the OSCON Java conference, wrote a new book on Android Flash, and also put out an update to Pro JavaFX 2.  A lot of rumors have been flying around about what the next big thing for me will be, especially since I just quit my job this past week!  Well, time to put the speculation to rest and announce my new gig at the NASA Ames Research Center.

“…time to put the speculation to rest and announce my new gig at the NASA Ames Research Center.”

NASA actually already has quite a bit of Java in use internally at NASA today.  You may not know that the command and control systems for many of the mars rovers, including the Spirit and Opportunity, use Java technology to send instructions to the remote robots as well as analyze the data coming back and construct 3D views for the navigation software used in the control center. After 8 years on the planet, the Opportunity is still going strong, collecting data on Mars craters and seasons, and bringing back priceless images from the red planet.

NASA is so reliant on Java technology that they are also active contributors to the open-source community.  The newer K-9 rover has even more use of Java technology, for which they developed a tool called Java PathFinder in order to identify and eliminate software errors. This is actually an open-source project that you can use in your own application development to trace through different bytecode paths and identify and debug potential deadlocks or exceptions. One of the main features is the ability to deliver not just a stack trace where the error occurred, but the entire execution path that lead to that error.

Recent advances in Java make it a great platform for doing the sort of mission-critical work that NASA needs.  Embedded Java offers a compact, reliable platform for building Java applications on a variety of hardware platforms that are efficient and robust enough to be used in unfavorable conditions such as space and planetary exploration.  The Java EE platform is the industry standard for server technology, and provides a number of reliable, fault-tolerant communication transports that can speed up and data transmission and analysis for researchers worldwide.  And the part I am most excited about is JavaFX technology, which is a modern UI toolkit for developing rich client applications that can incorporate business controls, data charting, media playback, and even 3D.

“JavaFX … is a modern UI toolkit for developing rich client applications that can incorporate business controls, data charting, media playback, and even 3D.”

So you might be wondering why NASA has so much investment in Java and not web technologies like HTML5 and Javascript…  Well, let’s imagine an alternate world where Javascript and web applications were the way we did space exploration:

Swigert: ‘Okay, Houston, we’ve had a problem here.’
Houston: ‘This is Houston. Say again please.’
Lovell: ‘Houston, we’ve had a problem. We’ve had a 404 error.’

“Houston, we’ve had a problem. We’ve had a 404 error.”

Needless to say, I am glad to be working on Java, and taking it to new heights at NASA!

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
2 Comments »
Categories
Announcements, JavaFX
Tags
java, JavaFX, NASA
Comments rss Comments rss
Trackback Trackback

JavaOne is Rebuilding Momentum

steveonjava | October 10, 2011

Just finished up an extremely busy week at JavaOne and there was a lot to like about this year’s event.  There were plenty of surprise announcements, lots of good content/sessions, and a lot of improvements on the venue and organization.

For folks who have been patiently waiting for me to publish all my talks, I apologize for the delay…  giving 4 talks + a keynote (plus 3 more talks at Silicon Valley Code Camp yesterday) was a lot more work than I expected.  To make sure I can cover the topics and code in enough detail I am going to publish 1 talk plus commentary a day for the next week.  Please follow me on twitter or rss to catch the updates as they roll out.

To get you started, here are some of the highlights from JavaOne:

JavaFX is back in the spotlight!

After a year of hibernation, JavaFX is back with a 2.0 release, big open source announcement (more on this below), and mobile prototypes on Android and iOS.  For those naysayers who said JavaFX is dead, Oracle has proved that they are going to continue to move the platform forward and support state-of-the art development on Java client technology.  As always, Jasper and the rest of the JavaFX team had some pretty impressive demos and the entire Java community was re-energized about the future of client Java.

If you haven’t already, go download JavaFX 2.0 right now!  It is available in production for Windows and there is a developer preview of Mac OS X, so you have no excuse for not trying it out today.  (unless you are on Linux…  but that is supposed to be coming soon too)

The Open Source Petition Was Successful!

Thanks to all my blog readers who spent the time and energy to sign and support the petition to open source JavaFX.  In part due to the huge community sentiment about the need to open source JavaFX, Oracle has taken action and promised to open source the entire platform.  They are going to start with the controls library as announced last year, and continue to open source the entire platform as part of the OpenJDK project.

This is a huge benefit to JavaFX, which will finally be getting equal treatment with the rest of the Java platform.  They are also actively working on getting JavaFX to be fully redistributable, which will remove yet another obstacle to making JavaFX the standard for desktop development.

Community, Community, Community.

Oracle has been listening to the Java community, and put in place many of the changes and suggestions that were raised.  This was evident in the entire JavaOne conference, which was a huge improvement over last year’s event.  Some of the improvements that I noticed while hanging out at JavaOne this year included:

  • A Community-focused Keynote – While I may have been biased as a participant, I thought the best keynote of the conference was the wrap-up community keynote that Sharat Chander lead.  This included some amazing demos by the Duke’s Choice Winners of audible development for the blind and home automation using Glassfish, a spicy panel that had a lot of positive things to say about the Java Community and OSCON Java, and a surprise appearance by the Java Posse who were at 3/4 of their finest!  (the 1/4 being poor Tor, the Googler)
  • Community Hang Spaces – While navigating the conference it was much easier to bump into folks you know by hanging around one of the many hang spaces that were built out around the venue.  In fact, Dean Iverson and I found ourselves preparing for one of our talks in the hang area, because it was more conducive to collaboration and interaction than the speaker room.
  • Easier Venue Navigation – A couple things contributed to this…  One was that all 3 hotels were reserved for JavaOne talks, so you had more talks concentrated in the same vicinity.  Another was the plethora of helpful staff directing traffic and answering questions (I made quite a lot of use out of this myself).  Finally, the signage and open tent configuration made it much easier to get form Point A to Point B.

And a Few Things to Improve for Next Year…

Everyone has their personal gripes…  here are some of mine:

  • Fewer Sponsored Keynotes – When you pay big $$$ to attend a conference, the last thing you want to do is sit in a session and watch a canned talk by a corporate stooge.  The Juniper Networks talk was a particularly blatant example of something that was not really focused on the Java crowd tossed in as a sales kick-back.  In the future, it would be better to make the sponsors earn the attention of the attendees by labeling the talks as sponsored and giving attendees some alternatives.
  • Better Network Connectivity – It was almost impossible to get on the wifi network in any crowded situation (like a session), and once connected the response times were abysmal. That is until everyone left around Thursday midday and the network started going blazingly fast for those who stuck it out for the last few talks.  :)
  • Improved Tech Support on Talks – I listened to the presenter advice and formatted all my slides in 16:9, which didn’t seem to work for the first couple talks that had big black letter-boxes above and below the slides.  Also, my first talk had no network connectivity on the wired connection (and as I mentioned, wireless was useless).  However, I had to the good fortune of giving way too many talks, so by the time I got to my 3rd and 4th ones they seemed to have figured out how to use the very expensive screen adjustment boxes and got everything tuned just right.  Also, the wired network seemed to work fine in all the other rooms I hi.
  • Patching Things Up With Google – This is the second year that Google has refused to let anyone speak at JavaOne. They blame the lawsuit for this, but at some point the policy is more retaliation than just good legal defense. (Is letting Tor speak on stage in a community setting is really going to jeopardize the Android platform?) The real losers in this battle are the average developer who is missing out on great technology and content from one of the most innovative companies in the world.

Overall, JavaOne was a great conference this year, and is definitely back on the upswing.  There was mention of improving the venue in the community keynote, and I hope the upper management at Oracle takes this seriously.  The 3-hotel setup is not ideal, and really not large enough to contain the Java community.  It is time to unleash the Java Community in a full conference venue of its own.

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
3 Comments »
Categories
Events, JavaFX, OSCON Java, Uncategorized
Tags
community, JavaFX, javaone
Comments rss Comments rss
Trackback Trackback

JavaFX 2.0 and Scala, Like Milk and Cookies

steveonjava | September 27, 2011

JavaFX 2.0 and Scala are both great technologies individually, but work even better when used together.  JavaFX 2.0 is a powerful rich client technology with advanced graphics, animation, and media capabilities.  Scala is a simple, yet powerful language with advanced language features for writing domain-specific languages (DSLs).  Add a little Scala UI DSL to your JavaFX 2.0 project and you will be in cookie and cream heaven!

Time Lapse Photography Creative Commons Licensed by Robbie’s Photo Art

JavaFX Colored Circles

I will go into more detail on why Scala in a bit, but I believe this is all best illustrated with a code example.  One of the basic examples of JavaFX 2.0 functionality that comes with the SDK is a sample application called ColorfulCircles.  The full source code can be found here:

Java Colored Circles Code

With the help of Sven Reimers, we ported this to Scala on top of the ScalaFX library.  The working application source can be found here:

ScalaFX Colored Circles Code

Update: Dean Iverson has a great example of the same code in GroovyFX

Feel free to peruse the source code at your leisure, and take note of the following:

1. ScalaFX is More Concise

The ScalaFX version is shorter both in number of lines and more importantly number of characters.

Code Count (excluding licenses and imports):

  • Lines:
    • Java: 48
    • ScalaFX: 42
  • Characters:
    • Java: 1602
    • ScalaFX: 866

This is due to custom tailored DSL language that is fully expressive with less redundancy.  In the Java version of the code you will notice a lot more boilerplate and syntactic repetition that is required by the language.

2. ScalaFX Code Looks Like the Output

While the output of the Colored Circles example is quite simple, it actually hides quite a bit of complexity in the way it is structured.  Here is the output run from JavaFX 2.0 Build 45 using ScalaFX:

What you are actually seeing is a SceneGraph composed of the following layers:

  • A Scene with a black background that contains…
    • A Group that contains
      • 30 semi-transparent Circles covered by…
    • A rainbow-colored Rectangle overlay

When reading the ScalaFX code you get this nesting through the object-literal style declaration of the Nodes in the Scene as excerpted here:

// ScalaFX Scene Excerpt:
scene = new Scene {
  content = Seq(
    new Group {
      circles = for (i <- 0 until 30) yield new Circle { ... }
    }
    new Rectangle { ... }
  )
}

However, the Java version does not give you the same hierarchical representation, and instead uses an imperative series of calls to constructors, getters, and collection methods.

3. Tailored Animation Syntax

Animations are very commonly used in creating good UIs, which is why JavaFX Script had a built-in construct to simplify the creation of animations. ScalaFX has a similar syntax that allows you to quickly and easily create animations, which is used in the ColorfulCircles example:

Seq(
  at(0 s) {circle.centerX -> random * 800},
  at(0 s) {circle.centerY -> random * 600},
  at(40 s) {circle.centerX -> random * 800},
  at(40 s) {circle.centerY -> random * 600}
)

This makes it trivially easy to create complex animations.

4. And the ScalaFX Version Has a Hidden Bonus Feature…

Unlike the JavaFX version, the contents are bound to the width and height of the stage. Binding in ScalaFX is as simple as replacing the assignment operator (=) with the bind operator (<==) as shown here:

// ScalaFX Property Setting:
width <== scene.width
height <== scene.height

While this is a simple operator change in ScalaFX, it requires complex enough code that they decided to omit it from the JavaFX sample. A loose translation to Java would be the following:

// Java Fixed Property Binding
colors.widthProperty().bind(scene.widthProperty())
colors.heightProperty().bind(scene.heightProperty())

Although, the precise equivalent code in Java syntax would actually be the following:

// Java Dynamic Property Binding
colors.widthProperty().bind(Bindings.selectDouble(primaryStage.sceneProperty(), "width"))
colors.heightProperty().bind(Bindings.selectDouble(primaryStage.sceneProperty(), "height"))

Either of these versions is quite a bit more complex and unwieldy than the ScalaFX equivalent, and this is for a very simple binding!

About ScalaFX

ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.0 (not to be confused with Ingo Maier’s great work on Functional Reactive Programming for Swing). This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX 2.0 are supported.

Some of the features of ScalaFX include:

A Programmer-Friendly Object-Literal-Like Syntax

ScalaFX uses a simple, hierarchical pattern for creating new objects and building up the scene graph.  Here is a simple example that creates a new stage with a rectangle that changes color based on mouse events:

stage = new Stage {
  title.value = "Hello Stage"
  width = 600
  height = 450
  scene = new Scene {
    fill = Color.LIGHTGREEN
    content = new Rectangle {
      x = 25
      y = 40
      width = 100
      height = 100
      fill <== when (hover) then Color.GREEN otherwise Color.RED
    }
  }
  visible = true
}

Unlike the builders you find in the core JavaFX APIs, the ScalaFX object declaration syntax uses the normal object API. This means that you can use the same operators and convenient syntax to create and modify your scene graph. Also, anything that is permissible in a Scala block (such as variable declarations, method calls, binding, etc.) can also be done inline while constructing objects. For JavaFX builders you need to declare binding after you finish creating your objects, which leads to disassociated and hard to maintain code.

Natural Language Bind Expressions

One of the greatest advantages of using the Scala language as a DSL is the rich support for operators as methods. This is similar to the C++ concept of operator overloading, but much more uniform and clean in its application.

The ScalaFX bind library exposes normal operators such as &&, ||, +, -, *, / on top of all bindable objects. Also, Scala supports operator precedence, so it looks and feels like you are writing normal expressions even though you are creating bound objects under the covers. As a result, you have the full functionality available from the JavaFX 2.0 binding libraries with code that looks akin to mathematical expressions and operators.

Here are some examples of what you can do with the ScalaFX bind API:

Infix Addition/Subtraction/Multiplication/Division/etc.

height <== rect1.height + rect2.height

Aggregate Operators

width <== max(rect1.width, rect2.width, rect3.width)

Conditional Expressions

color <== when (hover) then Color.GREEN otherwise Color.RED

Complex Boolean Expressions and String Concatenation

text <== when (rect.hover || circle.hover && !disabled) then textField.text + " is enabled" otherwise "disabled"

Free-form Invalidation and Change Handlers

rect.hover onInvalidate {
  needsRepaint = true
}

Fully Type-Safe APIs

This may seem like an insignificant point…  Type safety is something that Java developers have always had (and often take for granted), and developers in other scripting languages live without (and unknowingly suffer with runtime errors as a result). However, it is a critical feature if you are developing applications that cannot have unexpected runtime errors and bugs after deployment.

A good compiler will be able to pick up many common coding mistakes through comparison of expected and actual types, and a great compiler (like Scala) will automatically infer types for you so you don’t have to tediouisly repeat them throughout your code.

ScalaFX gets the best of both worlds with a scripting-like DSL syntax where you can rarely have to explicitly type objects, with the strong type-safety of the Scala compiler that will infer and check the types of every expression and API call. This means less time spent debugging weird code bugs and misspellings, and higher quality code right out of the gate!

Seamless JavaFX/ScalaFX Interoperability

It is often the case that you do not have complete freedom about the predominant language of the codebase, or of the libraries you are including functionality from.  Even in a mixed environment codebase where you have Java, Scala, and possibly other JVM languages, ScalaFX will seamlessly convert and interoperate.

ScalaFX gets this functionality through the implicit operator capabilities of Scala.  Anywhere your program expects a JavaFX typed object, it will automatically insert the code to convert from ScalaFX wrapped objects to JavaFX native classes.  Any time you use a ScalaFX specific feature, the compiler automatically creates a ScalaFX wrapper object that allows you to call advanced methods and access the full functionality. This all happens behind the scenes, letting you focus on writing clean code, and not fussing about integration and interoperability.

With all this interoperability magic happening behind the scenes, there is some additional overhead on your application. We have taken pains to minimize this using features like @specialize in the Scala language, which allows us to avoid boxing and unboxing costs on primitives. However, without real benchmarks it is hard to tell just how good of a job we have done. Hopefully more on this in a future post.

Finding out More About ScalaFX

The ScalaFX project site is hosted by Google Code including a couple mailing lists that you should join if you are interested:

  • ScalaFX Users
  • ScalaFX Developers

At the time of writing we do not have a bundled release, but are interested in early adopter feedback.  If you would like to give it a try, please download the source and give it a quick spin!

I will have more details about ScalaFX at my upcoming JavaOne session with Dean Iverson entitled “JavaFX 2.0 With Alternative Languages“.  Come to hear more about Scala, Groovy, and other JVM languages you can use to write simpler, cleaner code.

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
12 Comments »
Categories
JavaFX, ScalaFX
Tags
dsl, JavaFX, javafx 2.0, ScalaFX
Comments rss Comments rss
Trackback Trackback

Steveonjava Track at JavaOne

steveonjava | September 1, 2011

The JavaOne Session Builder is now up and available for setting up your sessions. If you are not used to the JavaOne ritual, it is always a good idea to sign-up for sessions well in advance so you don’t get bumped out of the more popular ones. This also helps them fix the room allocation so popular talks get the right size room.

I put together my own schedule of all the JavaFX-related content I plan to attend, and published it on Google Calendar. It is also a pretty good guide to some of the top JavaFX content that is being featured at JavaOne this year. — Apologies to my fellow speakers with conflicting session slots. I wish I could be in multiple places at once, but even rich client technology is not that advanced — yet.

Note: Click for details — sessions I am actually giving are highlighted in green.

Also, for those of you brave enough to attempt to use the schedule builder, it is no simple feat. The UI is fairly convoluted, so getting your schedule tweaked to be just right takes a lot of time and experimentation. Fortunately, I did a lot of this work for you and have figured out the happy path through the system.

JavaOne Schedule Builder Happy Path:

  1. Login to the system and go to the JavaOne Content Catalog
  2. Setup your filters to get the sessions you want (if you are reading this, you probably want to search on “javafx”)
  3. Click on the stars to pick the sessions you are interested in — this adds them to the “My interests” list
  4. Finally, click on “Schedule My Interests” and follow the little wizard UI

Just about any other path through the system (scheduling by time, resolving conflicts as you add sessions, etc.) is fraught with peril, so be warned. :)

Enjoy, and I hope to see you at JavaOne!

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
1 Comment »
Categories
Events, JavaFX, JFXtras, Presentation, Visage
Tags
JavaFX, javaone, JFXtras, Visage
Comments rss Comments rss
Trackback Trackback

JavaFX 2.0 at the Chennai JUG

steveonjava | February 21, 2011

I was fortunate enough to be invited to speak at the Chennai Java User Group during my trip to India.  I was expecting a small group of very devoted Java fans; however, I was surprised to walk into a room of over 200 developers eager to learn about JavaFX 2.0.  The venue was very impressive with rows of workstations that we later used for a lab, as well as plenty of seating.

Chennai User Group Venue at Tenth Planet

Also, Raj was a great host, and both he and the folks at Tenth Planet went completely over the top with this event.  This included:

  • A life-size poster with the event details
  • An ornamental flower arrangement with the event details
  • Two gifts presented at the conclusion of the talk

Life-Size Event Poster

The session ran from 10AM through 4:30PM with a break for lunch in the middle.  When half the hands went up for returning after lunch, I didn’t believe most of them would be back, but we easily had 60% of the folks back in their seats by the time we were ready to start.

If you are interested to see the slides from the talk, you can find them on Slideshare here:

Thanks again to the folks in the Chennai JUG for being great hosts!

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
1 Comment »
Categories
Events, JavaFX, Presentation
Tags
chennai, india, JavaFX, jug, Presentation, Visage
Comments rss Comments rss
Trackback Trackback

JavaFX 2.0 With Alternative Languages at the SvJugFx

steveonjava | October 14, 2010

It is kind of ironic, but after a year running I have never spoken at my own user group.  In November I am going to break the trend and present an updated version of the JavaFX Alternative Language talk that I gave at JavaOne. You can sign-up for the event here:

http://www.svjugfx.org/calendar/14264038/

Note: Even if you plan on attending online, please make sure to sign-up above so you get reminders for the broadcast.

Since Jonathan Giles and I originally gave the talk, the JavaFX 2.0 APIs have gotten closer to completion, interest in the JVM Language Communities has grown, and I have launched the Visage project to carry forward JavaFX Script.

   LEONARDO da Vinci's "La Scapigliata"

Digression {
  var link = Hyperlink {
    name: "Jim Weaver's blog"
    url: "http://learnjavafx.typepad.com/"
  }
  description: "Speaking of Visage, I am looking for"
  "a logo for the project.  I would have gone with"
  "Matisse's \"Visage - Mask\" from {link} but it was"
  "created in 1951 and has an active copyright.  The"
  "current front runner is LEONARDO da Vinci's \"La"
  "Scapigliata\", which is simple and has nice emphasis"
  "of the figure's 'Visage'."
}

Invite your language-guru geek friends too.  I want as much feedback as possible on the suggested APIs so they can be used to improve the underlying JavaFX 2.0 APIs prior to release.  As usual, we will be taking questions online via Google Moderator.

As always, I will have the very latest and greatest content to share (at great demo peril to myself).

I hope to see you there!

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
4 Comments »
Categories
Events, JavaFX, Presentation, Visage
Tags
clojure, groovy, JavaFX, jruby, scala, Visage
Comments rss Comments rss
Trackback Trackback

Apropos Launches into the Stratus

steveonjava | October 8, 2010

Followers of my blog have probably heard about the Apropos project that I built in JavaFX and released as open-source.  It is an Agile Project Portfolio Planning tool that I developed for work to help manage our large Agile rollout. Apropos is a perfect application of rich client technology, because it sits on top of the web services exposed by Rally, and provides a higher level of visibility and planning.

The folks at Rally Software took notice and have been contributing back to the project to get it customer ready.  They have branded the commercial version of the tool Stratus and are now in the process of a customer beta.

Some of the features that the Rally folks have added to Stratus include:

  • Customization of fields and settings
  • Performance improvements in the web service communication
  • Styling and usability improvements throughout
  • A fully hosted environment for customers to use Stratus without any setup

I had the opportunity to present with Ryan Martens, Rally CTO, at the JavaOne Keynote to demonstrate the very latest version:

It was a cool experience to be on the big stage.  I have heard that a lot of presenters get scripted to death in preparation for Keynotes (or at least it always looks that way), but I had a lot of freedom to ad-lib and blend in my demo with Ryan’s talk.

If you or your company are interested in piloting Stratus, send email to stratus@rallydev.com and Rally can engage with your program managers.

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
No Comments »
Categories
Agile, JavaFX
Tags
Agile, apropos, JavaFX, portfolio planning, rally, stratus
Comments rss Comments rss
Trackback Trackback

Announcing Visage – The DSL for Writing UIs

steveonjava | September 27, 2010

I am pleased to announce the Visage Language, a domain specific language (DSL) for writing user interfaces.

http://visage-lang.org/

User interface developers have long been neglected and forced to deal with languages and tooling that are a poor fit for their craft.  At times they are asked to write user interfaces in languages originally meant for server-side applications such as C and Java.  In other instances they are required to use a markup language originally meant for representing documents or structured data such as HTML and XML.  These are fine technologies for the applications in which they were originally intended, but a weak substitute for declaring and representing user interfaces.

The goal of Visage is to provide a common language for user interface developers that provides the following benefits:

  1. Model the UI – The code should look like the user interface with a similar structure to how the resulting application will appear.
  2. Data Binding – All user interfaces have a backend model, so it should be easy and painless to hook this up to the UI with bidirectional integration.
  3. Resilient Behavior – The last thing you want to see during a customer demo of your new application is a NullPointerException.  Language constructs should have deterministic, but fault tolerant behavior in all cases.
  4. Rapid Development – Application development should allow rapid, iterative cycles with early feedback starting right at the compilation phase.

The way in which Visage satisfies these requirements is summarized in the following table:

Model the UI Data Binding Resilient Behavior Rapid Development
Object Literals X X
Closures X X X
Data Binding X X X
Bijective Binding X X X
Null-Safe Semantics X X
Strong Type Checking X
Compiled Language X

So what does a Visage application look like?  Here is Hello World in the Visage language:

Stage {
  title: "Hello World"
  Scene {
    Text {
      "Hello World"
    }
  }
}

This code should look familiar to readers of my blog.  It is based on the JavaFX Script language with a few (proposed) syntactic additions.

For those of you who don’t know the history of JavaFX Script, it was originally designed by Christopher Oliver and called F3 for Form Follows Function.  With the acquisition of SeeBeyond by Sun, this technology became the cornerstone of JavaFX and was open sourced in 2007 at JavaOne.  Oracle purchased Sun and just this past week at JavaOne 2010 announced that they are going to continue with the JavaFX Platform, but replace the JavaFX Script language with Java APIs.  We are adopting the JavaFX Compiler for use in the Visage project, and plan to continue evolving it.

Here are some of the goals of the Visage project:

  • Provide a JavaFX Java API Binding – One of the most innovative parts of the JavaFX platform was the language, and it is what all JavaFX applications are written in today.  Our number 1 project goal is to make sure that developers can continue to write declarative code and easily port over their existing applications.
  • Enhance the Visage Language – The language syntax remains largely unchanged since the 1.0 release of JavaFX.  We plan on making numerous improvements that will be beneficial to UI programmers and make common patterns easier to code.
  • Support for Other Platforms – For the Visage language to thrive, it has to be a general purpose UI programming language.  Some other platforms that are in great need of a UI DSL include HTML5, Flex, and Android.
  • Language Standardization – We would like to see the Visage language be made an official standard with possibly multiple implementations.

If you are interested in following the project or helping out, please join the Google Groups:

http://groups.google.com/group/visage-users

http://groups.google.com/group/visage-dev


 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
17 Comments »
Categories
Announcements, JavaFX, Visage
Tags
dsl, JavaFX, language, Visage
Comments rss Comments rss
Trackback Trackback

JavaOne Enterprise JavaFX and JFXtras Presentations

steveonjava | September 26, 2010

Speaking at JavaOne was challenging, but fun this year. With the surprise announcements about JavaFX 2.0 there wasn’t a lot of time to respond, but I managed to refocus all my talks in a very short amount of time.

Pro JavaFX Platform – Building Enterprise Applications with JavaFX

My second talk on Tuesday with Jim Weaver was packed to the brim with folks eager to ask questions about the new direction.  We managed to both hit our original presentation topic about enterprise JavaFX development as well as distill the new JavaFX 2.0 market pitch down to something that makes sense to developers.  As an added bonus we threw in some examples of what the new JavaFX APIs could look like from Scala code.

Download Pro JavaFX Platform Presentation as a PDF

JFXtras – JavaFX Controls, Layout, Services, and More

The JFXtras BOF was standing room only with a lot of very prestigious folks from the desktop community filling the chairs.  We covered the latest JFXtras 0.7 features and updated everyone on the plan for the future of JFXtras in light of the JavaFX 2.0 announcement.  At the end of the presentation we announced a new language project called Visage to fill the gap left by JavaFX Script (more on this in a future post).

Download JFXtras Presentation as a PDF

Even if you couldn’t attend, hopefully you can get a flavor for how the talks went by skimming the above presentations.

See you at JavaOne next year!

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
6 Comments »
Categories
JavaFX, JFXtras, Presentation, Pro JavaFX, Visage
Tags
JavaFX, javafx 2.0, javaone, JFXtras, Visage
Comments rss Comments rss
Trackback Trackback

JavaFX 2.0 (a.k.a. What Just Happened to JavaFX Script?)

steveonjava | September 21, 2010

There were some huge announcements at JavaOne today for the JavaFX platform.  Overall I think the announcements show some very positive momentum for the future of JavaFX and rich client Java, but there were some casualties…

In this blog I will cover the salient bits, but if you would like an opportunity to hear it directly from the JavaFX leadership team in a free event, we will be hosting a JavaFX 2.0 event with Richard Bair and Jai Suri at our next SvJugFX meeting.  As usual, the event will be streamed live, and questions can be asked remotely via Google Moderator.

.

The Good Parts:

Java and Alternative JVM Languages

JavaFX has a new API face.  All the JavaFX 2.0 APIs will be exposed via Java classes that will make it much easier to integrate Java server and client code.  This also opens up some huge possibilities for JVM language integration with JavaFX that Jonathan Giles and I explored in our JavaOne talk today.  We did a whirlwind tour through four different JVM languages (Ruby, Clojure, Groovy, and Scala) showing what JavaFX 2.0 code may look like when ported to these different languages.

Here is the full presentation deck:

JavaFX Your Way: Building JavaFX Applications with Alternative Languages

Which can also be downloaded as a PDF.

Open Source Controls

Read the rest of this entry »

 

Share this:

  • Twitter
  • Google +1
  • More
  • Facebook
  • LinkedIn
  • Email
Comments
18 Comments »
Categories
Announcements, JavaFX, JavaFX Mobile, Presentation, SvJugFx
Tags
clojure, groovy, java, JavaFX, javafx 2.0, javaone, ruby, scala
Comments rss Comments rss
Trackback Trackback

« Previous Entries Next Entries »

  • Travel Map - Let's Meetup

Publications

  

Affiliations

Awards

2009/2011 JavaOne Rock Star!

Disclaimer

Views and opinions expressed here are all my fault... complain to me, not my employer. :)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.