Archive for the ‘Java’ Category

Filed Under (Flex, Java, RIA, Technology) by jonr on February-11-2008

I just got done reading an interesting post by Gerard Mason on Flex & Java developers. He points to my post last year on the RIA Landscape and Flex. Near the end he states he surprised at the black lash on “in-browser” Java technologies:

So, yes, I wasn’t prepared for the degree of, frankly, hatred of in-browser Java that I found, even amongst ex Java developers. Like lovers who’ve been deceived, strung along, and humbled once too often.

While, I will point out that I still am a Java developer (not an ex), it has been a long-long time since I considered applets an option for web user interfaces (does anyone?). So, if you want to develop “rich” user interfaces Java has little to offer. Mason does cover this early in his post:

It seems that after a decade of Java programming, while Sun has more or less abandoned the browser and chased the server, people have finally given up waiting for usable in-browser technology…

Applets still look clunky, they still have funny fonts, they still take forever to load, as the browser has to load and run the complete JRE (at least)…

Well the market was Sun’s to lose, and they lost it; indeed, they seem not to have cared about it at all.

Sun is working on JavaFX, but the current trend line looks like the technology is going to be far too-little-to-late. Anyhow, Mason throws out a couple of questions/statements. First:

I’ve not done a lot of reading about Flex, but I haven’t heard anything about sandboxing.

From the context, I assume he means from a security perspective. He will have to flush out more on what he is looking for here, but it is worth noting that Flex applications run on the client side in a single threaded VM with limited OS permissions (i.e. the flash player). So, the needs are probably a bit different here than what he is use to in Java. In addition, I still rely on Java for all of my server-side business logic. So, I still have the full power of Java there.

Second, he states:

If Flex/Flash becomes the standard delivery mechanism for RIAs, Adobe will make a lot of money and we’ll all wish we had stayed free.

I am still a bit confused on how this is different from the Java world we have all lived in for so long. They have taken many of the same steps that Sun took to open-up Java (it did take Sun 10 years to really open source it). In addition, the player, flex sdk, and backend plumbing (BlazeDS) are all free. All you really need to pay for is the Flex Builder IDE. I have actually been wondering if Adobe is heading down the road of following Sun’s example of bringing the industry a quality platform, but never really figure out how to monetize it.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (AIR, Flex, Hibernate, InfoQ.com, Java, RIA) by jonr on February-5-2008

I just posted an interview with Granite Data Service founder Franck Wolff. You can check it out on InfoQ.com at: http://www.infoq.com/news/2008/02/granite-data-services.

A few interesting items:

- I have used GDS a bit, but I didn’t realize that there Hibernate support allow for using lazying loading in the Flex clients. This sounds very powerful and I am excited to check it out.

- He had some interesting thoughts on the possible negative impacts RIA might have and, how GDS can help address them:

I think that with the new RIA developments we face the risk of going back fifteen years ago from an architectural point of view, when the client/server paradigm was dominant. This trend could bring us to stateful clients interacting with stateless servers (i.e. a simple database front-end). While this architecture may be possible and viable for small Flex applications, I think this is not the best choice for large applications.

Thanks Franck for the interview and for the significant open source contribution.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, Java, RIA) by jonr on January-29-2008

 

This weekend, I finished up an article on building a Flex Messaging application using the BEA Workshop Studio (Flex Bundle) IDE.  The IDE is Eclipse based and very familiar to a Java developer like myself.  You can check out the article on BEA’s Dev2Dev site: http://dev2dev.bea.com/pub/a/2008/01/flex-messaging-workshop.html.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (InfoQ.com, Java, RIA) by jonr on January-15-2008

I have been writing for InfoQ.com for about 6 months now. I really enjoy learning about new things and attempting to capture the important details for others.

I just finished an interview piece with Chet Hasse on JavaFX. It was fun to broaden my perception on the framework. After pulling together his responses, I am much more optimistic about the possibilities with JavaFX. I was especially excited to learn that they are putting significant effort into the plug-in. I personally think this is the key to making Java a competitive RIA platform. The idea of simpler syntax sounds great too.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, Java, RIA, Technology) by jonr on January-8-2008

Cay Horstmann posted a great blog today on the current state of Java:

http://weblogs.java.net/blog/cayhorstmann/archive/2008/01/dinosaurs_can_t_1.html

‘Why is it that Sun can’t give me a decent web framework? Is it a shortcoming of the Java language? Or crummy API design? Rails uses the metaobject protocol to good effect in Active Record, but as it turns out, that isn’t my problem. JPA works ok for me. The rest of Rails doesn’t attract me—I want components, not RHTML files.’

Also, Last night I listen to a Java Posse podcast on Java/Web UI/Applets:
http://www.javaposse.com/index.php?post_id=291572. It is funny to me how they describe the problem (paraphrasing), “Java is great for RIA development, except for the browser plug-in stinks.” Followed by repeated suggestions that Java just needs to address this ‘small’ problem. This is why Flex/Flash is so interesting to me – they solved a problem that Java hasn’t been able to address in a decade plus.

There are so many wonderful new options for building RIA’s. Why is anyone still trying to use Java? It is possible that JavaFX will catapult Java back into the race, but as things stand now I am confused why anyone is turning to Java for building web UI’s.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, InfoQ.com, Java, RIA, Technology) by jonr on December-13-2007

There are basically no more barriers to entry with Adobe’s announcement today that much of Flex Data Services is being open sourced. In addition, they recently lowered the price of the Flex Builder IDE to $249. What reasons are left for Java developers to keep using crappy server side Java frameworks over Flex? Really. Please share.

Here are some links on today’s announcement:

http://coenraets.org/blog/2007/12/blazeds-open-sourcing-remoting-and-messaging/

http://www.jamesward.org/wordpress/2007/12/12/blazebench-why-you-want-amf-and-blazeds/

Also, check out my latest InfoQ.com post, where I talked with Adobe’s James Ward on some of the Misconceptions around Flex:

http://www.infoq.com/news/2007/12/top-10-flex-misconceptions

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, Java, RIA) by jonr on August-1-2007

Well, I’ve heard more than a few comments on my picture… What can I say? I am just not a beautiful man, but what good developer is? :)


You can check it out at: http://www.adobe.com/devnet/flex/articles/java_flex.html

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Hibernate, Java) by jonr on July-31-2007

I am a big fan of using Ant to do routine tasks. I just spent a bit of time figuring out how to get Hibernate 3/Ant to generate the database scripts when using annotations. The Hibernate 2 way with the SchemaExportTask doesn’t appear to work. Hopefully my notes below will save you a bit of time if you are trying to do the same.

The Hibernate 2 with hbm.xml file way:

<taskdef name=”schemaexport”
classname=”net.sf.hibernate.tool.hbm2ddl.SchemaExportTask”
classpathref=”project.class.path” />

<schemaexport
properties=”${resources.db}/database.properties”
quiet=”no”
text=”no”
drop=”yes”
delimiter=”;”
output=”${resources.db}/drop-tables.sql”>
<fileset dir=”${hibernatedoclet.dir}” includes=”**/*.hbm.xml”/>
</schemaexport>

The Hibernate 3 with Annotations way:
- Note you need to download the hibernate-tools.jar

<taskdef name=”hibernatetool”
classname=”org.hibernate.tool.ant.HibernateToolTask”
classpathref=”hibernate.export.classpath” />

<hibernatetool destdir=”${build.db.dir}”>
<annotationconfiguration configurationfile=”hibernate.cfg.xml”/>
<hbm2ddl export=”false”
create=”true”
delimiter=”;”
format=”true”
outputfilename=”create-tables.sql”/>
</hibernatetool>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, Java, RIA) by jonr on May-29-2007

This post is a follow-up to my post last week were I noted some of my initial reactions to the Cairngorm Framework.

When I look at the overview diagram of Cairngorm, I just keep hearing Eddie Vedder exasperatedly saying, “… It just doesn’t feel like we have evolved at all – in 20 years…” I will admit he might not have been talking about software (but I still love Pearl Jam – so whatever). Audio Here

After writing some code with Cairngorm I am feeling less critical. I think the structure provided by Cairngorm makes sense to some extent – at least more sense than the overview picture provided. I would still love to see a much flatter picture and resulting implementation. Either way, I figured I would throw out a few suggestions that I believe would improve the framework and the potential perception of future Java developer converts to Flex sure to check it out.

We all love patterns, and the value in them comes from the shared understanding of a given pattern. My largest hang-up with the framework is the naming of some of the components, and I am less than convinced that they all follow the patterns they are named after.

I don’t believe the “Front Controller” is true to the pattern (nor should it be). There are much better ways in Flex to accomplish the benefits articulated in the Front Controller pattern. In the Cairngorm code it is just a simple dispatch mechanism. To me, the only real value of MVC is addressing separation of concerns (SoC). This pattern needs to go by the wayside, along with the thin-client architectures we are striving to replace.

To the extent we do need some dispatch mechanism to address the SoC and a level of true decoupling, I actually think that Cairngorm falls a bit short. In the store example application, the ValidateCreditCardCommand uses the executeNextCommand function to chain commands by hard coding the next event. Certainly, this is where we could gain value from a central dispatch infrastructure. Also, the controller doesn’t really do anything except map an event to a command within the class file (there is little-to-no benefit in this).

So, in terms of trying to providing a constructive suggestion, I think Cairngorm should rename the “Front Controller” to “dispatcher,” and provide a more robust mechanism for mapping, and the chaining of multiple commands to a given event. In Flex, we really just need M & V or M-V-D (dispatch).

In addition, the Service Locator pattern could also stand to be renamed. Although, it is of far less consequence than other issues. I have had a bit of a hang-up here in explaining Cairngorm to other Java developers evaluating Flex, as it doesn’t really do any lookups per the pattern. It really just encapsulates the client side configuration for accessing remote services. So, once again the name could be considered misleading, and the Cairngorm framework should consider renaming the Service Locator.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn


Filed Under (Flex, Java, RIA) by jonr on May-17-2007

When it comes to Rich Internet Applications (RIA), I am way behind to some, and way too far out there for others… Oh well!

It is time to completely embrace the RIA model and put to bed the old Request/Response type model of building web applications. My conclusion is simple, no longer do we have to train our customers to be disappointed with the final product when purchasing online software. The tools are finally good enough to give our business stakeholders and users the ‘rich’ applications they have been asking our industry to build for all these years.

Until recently, I have avoided the ‘Rich Internet Applications’/’Web 2.0’ craze, mostly because I saw Ajax as the primary method available to Java developers, like myself, for enhancing web based applications. I am finally ready to get onboard, but I am still uncomfortable with using the Ajax techniques on a large scale.

In this post, I am asserting the underlying assumption that the majority of the online user interface work going forward will be done in a Client Server like model over the Internet (e.g. Ajax and the like). As far as I am concerned, debate around the question of continuing to use JSF and Struts like frameworks is pretty much over, and any further discussion is for someone else’s blog. We should all be excited that we finally have better ways to build online applications. For me, it has been about finding a method that will enhance the user’s experience, but not be a complete pain to me as a developer.

Going forward, my personal platform of choice for building online user interfaces will be Adobe Flex. Adobe’s recent 2.0 release of Flex finally gives developers a robust solution for building ‘real’ applications and delivering them over HTTP through a browser.

I think Flex is cool and you can clearly build ‘sexy’ applications using it, but really who cares? I see way better reasons to utilize the Flex 2 framework as a Java developer:

  1. Of most importance, Flex provides the ability to dramatically improve the end user’s experience, build complex features with ease, and improve productivity (of both the programmer and end user).
  2. Tools:
    1. It builds on the tools Java developers already know.
      1. Eclipse IDE Plug-in.
      2. Ant build tasks for command line and automated builds.
      3. Flex and/or Granite Data Services used for easy Java integration, which deploy to a J2EE Servlet container.
  1. Runtime:
    1. Everyone computer already has the Flash Player and users are used to interacting with Flash based content.
      1. This does matter!!! Overtime it will matter less, but it takes time for users to adopt a new runtime, and as we all saw with Applets it can end up being difficult to get a consistent runtime installed to the masses.
      2. Flash movies run inside a browser and allow for integration with other web technologies (e.g. HTML, CSS, Javascript).
  1. Framework:
    1. A framework 100% geared toward user interfaces.
    2. ActionScript 3.0 is Object Oriented.
    3. The language’s heavy Java influences are obvious.
  2. Seeing is believing… Spend some time looking at some of the sample applications at http://www.flex.org/showcase/.

I have been getting a bit of push back when I suggest Flex/Flash as a viable option for building user interfaces to other Java developers. Some of the more common questions/comments are below:

  • ‘Doesn’t Flex cost money?’
    • Adobe does charge for the Flex Builder IDE ($599) and Flex Data Services (FDS) deployed beyond a single CPU. However, you can build and deploy an entire Flex application for FREE. The SDK is free and there are Ant Tasks for creating a build. For the applications I am building, I have concluded that the only paid tool I need is the IDE. Granite Data Services (http://www.graniteds.org/) and Open Source alternative to FDS has met my needs to this point. In addition, Flex also provides methods for integrating with Web Services.
  • ‘I tried developing applications in Flash before, and it just doesn’t seem geared toward developers.’
    • I share this experience, and had the same apprehension about Flex. The key thing about Flex is that it is a framework geared toward application developers, not designers. Although the applications are deployed as Flash movies, little-to-no knowledge is needed of traditional frame-by-frame like Flash development.
  • ‘Wow. Flash, really? That sounds like a really heavyweight method of building applications.’
    • Not to oversimplify, but I have come to view the Flash Player as just another browser when building and deploying Flex applications, except the Flash Player displays consistently across all supported Operating Systems.

If you are willing to embrace the Ajax-like model for building web applications there are a number of options to consider in addition to Adobe Flex: Microsoft SilverLight, Open Laszlo, Java FX, and the many Ajax frameworks. Below is a brief review of each of these from my perspective as a Java developer.

Ajax

My depth of knowledge on Ajax is limited, as I have avoided using it on any large scale to this point. I do know there are many developers out there with successful deployments of online applications that incorporate significant amounts of Ajax functionality. For me, it just seems to push the standard browser functionality beyond its natural capabilities. Regardless, by its nature, it is always going to be painful for the developer, as they have to support deployment to multiple runtimes and the many cross-platform issues that arise from that.

I do believe Ajax, along with HTML, CSS, JavaScript and server side technologies, will always be some part of any comprehensive online application. The only question that still intrigues me is, what parts should they make up?

Microsoft SilverLight

I would anticipate SilverLight being the strongest competitor to Flex in the near-and-long-term. As much as I love to hate the Evil Empire, we all know they will commit to making this a world class development platform that integrates with all of their other tools. It appears to already have stronger video support than Flex, and will surely catch Flex in other areas very quickly.

My biggest reservation with SilverLight comes strictly as a Java developer. It doesn’t seem to make a lot of sense to learn a new tool set (e.g. Microsoft Visual Studio) and be outside the mainstream trying to integrate Java and SilverLight when there are comparable technologies that are much closer to the Java space. That’s not to say a .NET developer shouldn’t consider Flex, but hey, I don’t know how things work on that side of the software planet.

OpenLazslo

OpenLazslo is similar to Flex, as it is an Open Source Framework for building applications that deploy as Flash movies. However, it is my understanding that the current release of the OpenLazslo Framework does NOT target the Flash Player 9 virtual machine (and its many performance benefits). Flash Player 9 was a virtual rewrite with many improvements including support for ActionScript 3.0 and much improved performance (up-to 10 times faster than previous versions according to Adobe). The Flash Player 9 actually ships with two virtual machines for backwards capability (Flash 8 & 9).

Regardless of the performance trade-offs, it is still attractive to some because it is an Open Source project. However, Abode committed to Open Sourcing the Flex framework in recent weeks. So, I am not sure that is still a compelling motivation to choice Lazslo over Flex.

Java FX

Java FX is a complete joke to me! It’s just another grand Java One announcement with NO release date… and foggy details on what it will look like when it is released. The most promising descriptions describe an Applet like deployment (over the samples that run in Java Web Start outside the browser), which just isn’t going to cut it. Thanks Sun… Thanks for showing us the raw work going on in your R&D labs (more Jon Rose skepticism run amok).

The only interesting thing about Java FX is that it is essentially Sun’s acknowledgement that the industry has already shifted away from server side user interface frameworks (e.g. Struts, JSF), in favor of richer client side runtimes.

Summary

Each of us comes to our own conclusions on how to best build online applications. For me, Flex is clearly the way to go. As a few wise developers have said to me, ‘Flex is just another tool.’ To a large extent I agree, but the difference to me is that the end product produced from Flex is such a large leap forward when compared with the current landscape.

References:

http://www.adobe.com/aboutadobe/pressroom/pressreleases/pdfs/200606/062806Flash9.pdf

http://msdn2.microsoft.com/en-us/library/bb428859.aspx

http://www.openlaszlo.org/front_page

http://www.jamesward.org

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • del.icio.us
  • Reddit
  • Facebook
  • LinkedIn