The Source for Java Technology Collaboration
User: Password:



John O'Conner's Blog

John O'Conner John O'Conner is a software architect, consultant, author, and speaker. After many years developing the internationalization features of the Java platform at Sun Microsystems, he is now actually trying to use those features in real world projects.



Link and run: Binding var and def variables

Posted by joconner on June 27, 2009 at 12:22 PM | Permalink | Comments (0)

The Flex guys have enjoyed this for a long time. When I discussed JavaFX with a friend who is familiar with Flex, he shrugged the feature off, clearing unimpressed with JavaFX despite his appreciation for the feature itself. Still, for Java enthusiasts, bind is a welcome language feature.

Another link and run post. Read more about using the bind keyword in JavaFX in the blog tip Binding var and def variables.



JavaFX for-loop considerations

Posted by joconner on June 23, 2009 at 08:50 PM | Permalink | Comments (0)

I hate to simply drop a link and run, but that's essentially what I'm doing here until others learn about my new blog Learning JavaFX.

My most recent dip into JavaFX involves for-loop constructions. And this experience brings up an interesting question for me. How do you access a variable outside the loop if it contains the same name as the "formal parameter" of the loop itself?

For examples of this and more details, read the blog entry:

Variables in a for-loop



Learning JavaFX?

Posted by joconner on June 14, 2009 at 08:19 PM | Permalink | Comments (3)

Long ago, I started a series called JavaFX Learning Curve Journal. Those articles/journals were on java.sun.com at the very beginning of the JavaFX project. I recently tried to find some of those articles, and I think they've been removed or improved significantly. They're certainly not recognizable in their original form. That's probably a good thing. The language has changed since then, and we all know how absolutely misleading and frustrating an outdated article can be.

I'm still interested in this new language though, more so now than then really. When I moved from Sun a couple years ago, I knew JavaFX wasn't ready for prime time. I stopped tinkering with it. I stopped reading about it. I stopped writing about it. However, I'm re-evaluating now.

JavaFX certainly seems to be the future of desktop applications. I know there was a lot of denying that Swing and JavaFX were competing. But let's just face the truth ok. Limited resources, limited time, limited developers....Sun can't put its continuous efforts into both, right? Something will get starved for resources. I spent a lot of time becoming proficient with Swing. If you are a Swing developer, you most certainly put in a lot of time learning it as well. However, if you want to continue developing Java desktop user interfaces, I think the future is JavaFX. Sun just isn't backing down from it. Despite its shaky start, JavaFX does seem ready for serious consideration at this point.

So, I've done two things to jump back into the JavaFX mix:

  1. I've started a new blog called Learning JavaFX. If you're just learning this language, you can fumble along with me. We'll figure out some of it together. If I can do it (which is not yet proven), you most certainly can! I learn by doing and sharing. Hopefully, you'll benefit too!
  2. I've started a Twitter account learningjavafx. Subscribe to those tweets if you'd like. You'll find out where I'm succeeding with the language. And if you've read my blogs before, you know I don't pull punches either. If I don't like something about a tool, I say it, trying to be fair of course. So I hope to give it to you raw, my experience learning JavaFX.

I'm just getting started of course. So this isn't a bad time to start listening in, especially if you're just getting started too. We'll tackle this learning curve together, and hopefully have some fun along the way.



JavaFX Designer Tool...where is it?

Posted by joconner on June 10, 2009 at 10:40 AM | Permalink | Comments (11)

At JavaOne 2009, Sun demonstrated a new JavaFX designer tool. You can even view the demo online. To shortcut right to the section that shows the tool, move to about 23:00 minutes into the video.

There are obvious questions that are not answered. So obvious, in fact, that I'm slightly baffled that I can't yet find an answer:

  1. Where is this new tool?
  2. Is it a standalone tool separate from NetBeans?
  3. Will it plugin to NetBeans or Eclipse?

If I'm not mistaken, at the end of that video, Nandini said that the tool would be available at the end of the year. At the end of the year? Wow. Why announce something now that's not done?

Do you remember two (three?) years ago when Sun made its first announcements about JavaFX itself and presented demos of it at JavaOne? When we all got home, we realized that JavaFX wasn't really ready and we couldn't really use it. That announcement was definitely premature, but this year's conference gives me confidence that finally JavaFX is a consideration for me in my real job. However, why continue the pattern of announcing things so early? Why announce a designer tool that is apparently not available for even a preview download? Why? This behavior really is frustrating to consumers...that's me, a developer that wants to use JavaFX and any decent tool I can find. I'm glad that something is in the plans...but it would also have been nice to know what exists TODAY for designing JavaFX applications.



CommunityOne Live Session Video Streams

Posted by joconner on June 01, 2009 at 10:48 AM | Permalink | Comments (1)

The next best thing to being at CommunityOne today and tomorrow is the live video feed of the sessions!

Can't participate directly? Check out the CommunityOne online video feeds.

JavaOne 2009: Top 10 Sessions

Posted by joconner on May 29, 2009 at 12:32 AM | Permalink | Comments (1)

Choices, choices...so many choices and so little time. JavaOne has hundreds of sessions, BOFS, and labs. There's no way to do it all, although many of you will try. Plan well, and use the JavaOne session schedule builder to make the most of your time.

Of course, your selections will be different, but here's my list of Top 10 Sessions that I must attend at JavaOne (in no particular order):

  1. TS-4605, Enterprise JavaBeans™ 3.1 (EJB™ 3.1) Technology Overview
    This session provides an overview of Enterprise JavaBeans™ 3.1 (EJB™ 3.1) -- JSR 318 -- technology. You'll find war packaging of components based on the EJB specification (EJB components), EJB "Lite" technology, Singleton beans, Startup/shutdown callbacks, Asynchronous session bean invocations, and more.
  2. TS-3817, Google App Engine: Java™Technology in the Cloud
    Google App Engine is a powerful cloud-computing platform designed to help developers more easily create and manage scalable Web applications.
  3. TS-5225, Spring Framework 3.0: New and Notable
    The latest Spring release, 3.0, introduces new features and enhancements that make Spring more powerful and extensible yet even simpler to use.
  4. TS-4875, Developing RESTful Web Services with the Java™ API for RESTful Web Services (JAX-RS)
    The Java™ API for RESTful Web Services (JAX-RS) is an annotation-driven API that makes it easy to build Java technology-based RESTful Web services that adhere to the REST architectural style.
  5. TS-5578, The New World: JavaFX™ Technology-Based UI Controls
    This in-depth session covers the new JavaFX™ platform UI controls. It discusses the basics, such as how to use them and how to lay them out, through to more-advanced topics such as theming, skinning, and creating your own custom controls and layouts.
  6. TS-4247, Getting More Out of the Java™ VisualVM Tool
    This session addresses the following topics: leveraging existing JConsole plug-ins, creating new plug-ins for specific applications such as application servers, creating new plug-ins for specific tasks that are not supported out of the box
  7. TS-5307, Building Next-Generation Web Applications with the Spring 3.0 Web Stack
    In this session, you will learn how to build Web applications using the RESTful Spring 3.0 @MVC annotation-based programming model, expose multiple representations of the same resource, including HTML, XML, JavaScript™ Object Notation (JSON), and Atom, to service multiple client types without the need for specialized handling in server-side controller code, use Spring JavaScript technology and the Dojo toolkit to consume your RESTful Spring resources, using unobtrusive Ajax techniques, easily connect your existing RESTful Spring resources to RIA technologies such as JavaFX™ technology, and more.
  8. TS-5265, A Java™ Persistence API Mapping Magical Mystery Tour
    The session will be of interest to any Java technology developer who may store a Java technology-based object in a relational database. Attendees will learn how to use annotations to map objects to a relational database, what the new JPA 2.0 specification is adding to the mapping layer, when to use specific mappings and when certain mappings should be avoided, and how to make the best use of the O-R mapping part of JPA.
  9. TS-5385, Alternative Languages on the Java VM
    There are several languages that target bytecodes and the JVM™ machine as their new "assembler," including Scala, Clojure, Jython, JRuby, the JavaScript™ programming language/Rhino, and JPC. This session takes a quick look at how well these languages sit on a JVM machine, what their performance is, where it goes, and why.
  10. TS-4640, A Complete Tour of the JavaServer Faces 2.0 Platform
    This session presents a comprehensive tour of all the new features in the JavaServer™ Faces 2.0 platform.

Remember, whatever you choose, make sure you plan ahead to get the most out of the week. If you must choose between two great sessions, pay attention to schedule updates near the end of the week. Often popular sessions get rescheduled!



VisualVM: One of the best kept secrets

Posted by joconner on May 28, 2009 at 09:19 AM | Permalink | Comments (0)

You update your JDK frequently to get the latest and greatest...but did you know about VisualVM. It may be one of the best kept secrets in the JDK. But now you know too!

The VisualVM application gives you visual insight into your application's use of resources: heap, threads, memory, CPU usage, and more. This is a profiling tool that you might consider paying for, but you won't -- it's free, and its right under your nose.

Check out The Best Kept Secret in the JDK: VisualVM for more information about this great tool.

If you go to JavaOne, make sure you attend Geertjan Wielenga's session too:

TS-4247, Getting More Out of the Java™ VisualVM Tool
Friday June 05 12:10 PM - 1:10 PM Gateway 104



Java upgrades UTF-8 handling

Posted by joconner on May 21, 2009 at 09:22 AM | Permalink | Comments (0)

The UTF-8 encoding is easy to abuse in some ways. Or rather, sometimes people use it in unexpected ways.

Recently the Java platform received an update to reject one malformed UTF-8 encoding sequence called non-shortest form. You can learn more about this fix and its implications for you in the article Overhauling the Java UTF-8 Charset.



Will blog for JavaOne pass

Posted by joconner on April 22, 2009 at 03:26 PM | Permalink | Comments (2)

I should be ashamed. But I'll do it again this year regardless. I'm begging for a JavaOne pass. I'm not asking for a free handout, not exactly. Instead, here's the deal:

  1. You provide a full JavaOne conference pass.
  2. I provide blogging and coverage of JavaOne, your product, or your events here on java.net during the JavaOne week.

You provide the JavaOne pass, and I'll do the writing each day of the conference!

Contact me a john at joconner dot com.



What does Oracle mean for NetBeans?

Posted by joconner on April 21, 2009 at 01:00 AM | Permalink | Comments (9)

By now you know that Oracle intends to purchase Sun. It's a welcome deal that will no doubt be approved by stockholders. It certainly has the board's approval. So let's assume that Oracle will own Sun by the end of summer. Now we can start asking some questions.

Will Oracle embrace NetBeans? Like many open source projects, NetBeans gets a lot of support from corporate interest. In this case, it's no secret that Sun pours cash into NetBeans. However, Oracle already supports an IDE. Let's make that two IDEs: JDeveloper and Eclipse. Both receive financial backing from Oracle already, and...well, my first thought is that Oracle simply won't need a third IDE.

As Oracle continues to evaluate its new assets, how will it value NetBeans? Although I personally enjoy and use NetBeans, I don't think Oracle will care much for it. Not that NetBeans isn't an excellent product, but like I said, Oracle already has IDEs. In my opinion, NetBeans and its users will have to find new support elsewhere. I doubt Oracle will continue funding its development.

Hey, this is just speculation. I'd enjoy hearing your ideas, particularly if you think that Oracle will champion NetBeans in the future.



JavaFX Quick Tip: Printing to the console

Posted by joconner on April 12, 2009 at 09:30 PM | Permalink | Comments (2)

Like Java, the JavaFX Script has its own println statement. You can use the println statement to print output to the console. This method has already been imported by default, so all you have to do is invoke it.

println("Hello, JavaFX!");

This, of course, simply prints "Hello, JavaFX!" to the console window. Simple right? There are, however, a few improvements in the JavaFX method that do not exist in the plain Java System.out.println method. The JavaFX println method has the ability to interpolate placeholder variables.

Imagine you want to invoke a print method to print "Hello, {friend}!" and {friend} is a variable for a different name that is determined on each method invocation.

var friends = ["John", "Jack", "Nick", "Matt"];
for(friend in friends) {
  println("Hello, {friend}!");
}

This code iterates over the sequence of friends and substitutes the {friend} text with an actual string from the sequence.

That's the JavaFX way to put together strings. And in my opinion, it beats string concatenation any day!



June 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        


Search this blog:
  

Categories
Accessibility
Business
Community
Community: Global Education and Learning Community
Community: Java Communications
Community: Java Games
Community: Java Specification Requests
Community: Java Tools
Community: Java Web Services and XML
Community: JavaDesktop
Community: JDK
Community: Mac Java Community
Community: NetBeans
Databases
Deployment
J2EE
J2ME
J2SE
JavaOne
JSR
JXTA
Open Source
Programming
Swing
Tools
Web Applications
Web Services and XML
Archives

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

Recent Entries

Link and run: Binding var and def variables

JavaFX for-loop considerations

Learning JavaFX?

Articles

Synchronizing Properties with Beans Binding (JSR 295)
The idea of setting up listener relationships between your GUI models, views, and controllers is simple enough, but grinding the same "glue" code dozens or even hundreds of times is wasteful and error-prone. JSR-295, Beans Binding, offers relief from the drudgery. In this article, John O'Conner shows how it works and what it can do for you. Mar. 20, 2008

All articles by John O'Conner »



Powered by
Movable Type 3.01D


 Feed java.net RSS Feeds