Five Predictions for 2009
Drum roll please… Here are my five technology predictions for 2009.
- Google will buy Twitter.
- Sun Microsystems will be purchased by one of the following companies - IBM, Google, Oracle or Microsoft. Sun’s current market cap is $2.8 billion.
- IT departments will hunker down due to the depressed economy. Java, .Net, Oracle and SAP will remain entrenched as the dominant enterprise technologies until the recession if over.
- Yahoo will be acquired by Microsoft. With Jerry Yang out, the battle of egos is over.
- Google Android, Amazon and Mozilla Songbird will force Apple to rethink its music download business model.
JEval 0.9.4
I couldn’t finish the year without writing one last post about JEval. A new maintenance release is available. For whatever reason JEval’s download rate had more than doubled over the last couple of months. The number of downloads has now exceeded 1500.
‘Tis the Season for a Great Quote
Einstein has so many great quotes. Almost as many as Yogi Berra. This one I just discovered the other day and I think it fits in perfectly with the Christmas season.
“There are two ways to live your life - one is as though nothing is a
miracle, the other is as though everything is a miracle.”
Enjoy the miracle. Merry Christmas everyone.
The Easy Way to Select a Java Web Framework
Sorry for the delayed post. Things have been very busy lately. Besides, I just don’t get around to writing as many blog articles now that I use social networking applications like Twitter and Facebook.
The most difficult part of writing this article was getting started. I didn’t want this article to be another taxonomy of Java web frameworks like my original article. Instead, I wanted this article to present a pragmatic way to select a framework that is easy and matches the things that you and your team find valuable to software development. Let’s get started.
Instead of looking at the numerous features of web frameworks, I’m instead going to focus on three high level categories. They are “safe choice”, “cutting edge” and “rich user interface”.
Safe Choice
If you work for an enterprise where going with the tried and true is looked upon more favorably than taking a risk on something new, then you fall in to the “safe choice” category. Another motivation for going “safe” is that you want a standard set of Java and web technologies to work with. Since JSF is a Java specification, many of the major JSF implementations will work here. If you go down the JSF path you will most likely end up looking at JBoss Seam to work as a middleware solution for your JSF front end. There are a lot of folks out there that do not like JSF. If that is the case then your best choices are Spring MVC and Struts2. With Spring MVC you will most likely also be looking at using the Spring Framework and Spring Web Flow for your middleware. The Spring suite of software libraries is immensely popular these days and their penetration into the enterprise has been immense. Struts2 is for those who feel like it is the best migration path for existing Struts applications. Remember that Struts2 isn’t really a Struts upgrade. It is actually the wonderful WebWork framework that has been refactored, renamed and adopted by The Apache Software Foundation to be to the formal replacement for Struts.
Cutting Edge
If you work in an environment where management is more tolerant of trying new technologies, you are on a team that has a ton of Java web experience or you are simply excited by trying new things, then selecting a “cutting edge” framework may be for you. Without going too much into these frameworks, I will simply list out some of the popular frameworks that fall into this category. They are: Tapestry, Stripes, Wicket, Ruby on Rails on JRuby and Grails. These framework are either not adopted to the extent that the “safe choice” frameworks are, or they employ the use of dynamic languages. An interesting choice in this category is Grails, because it is written on top of Spring MVC, which is a “safe choice” framework.
Rich User Interface
Do you need a rich user interface instead of a more standard HTML one? Do you want a full AJAX interface instead of one with small amounts of AJAX mixed in? Only you will be able to answer these kinds of questions based on your business and technical requirements. If you answer “yes” to either question, then you are in what I consider the be the “rich user interface” category. And by definition if you want a rich user interface, then you have already left “safe choice” category. I don’t have as much experience in this category, so I will tread lightly. Choices in this category include Google Web Toolkit, Echo, ICEFaces (also a JSF implementation) and the new JavaFX.
Conclusion
There are countless choice, but selecting a Java web framework doesn’t have to be hard. You just need to know your environment and values that are important to you. Not making a choice at all will make selecting a framework hard, so don’t let this decision take too long. Regardless of what Java web framework you end up selecting, the days of using only one framework is a thing of the past. If your selection isn’t working out or if you think some other framework is a better choice for another application, then by all means select a different framework. Good luck.
The Lambda Lounge
Last night I attended the inaugural meeting of the Lambda Lounge. The meeting was great. Not only was the attendance high, but the enthusiasm and energy level was also very high. Its fun to go to events like this when everyone is so excited to be there. I particularly enjoyed the beginning of the session when everyone told a little about them self and what they are currently working on. There is so much cool stuff going around St. Louis.
For information on the Lambda Lounge, what it is and when it meets, click here.
For a great write up on last night’s meeting by the person who founded the group, click here.
SpringSource Acquires Groovy/Grails Company, G2One
Spring is a huge name on the Java landascape. The Spring based web framework, Spring MVC, is also well known, but doesn’t really capture the big headlines like Spring or some other web framework. SpringSource, the company behind Spring, today has announced that it is acquiring G2One, the company behind Groovy and Grails. Since Grails is built on top of Spring and Spring MVC, this appears to make a lot of sense. I think its a safe bet that Grails adaoption will pick up significantly. This is definitely a headline grabber.
Cheers Darling
In the last week I’ve really gotten into Irish rock music. Last weekend I rented the movie, Once, based on the recommendation of a friend who said it was a must see. The movie, which was made for a low price of $160,000 has been a huge success. It features the lead singer of the Irish rock band, The Frames. The music in this movie is brilliant. The story is great too. About half way into the movie, I forgot that I was watching a musical. The music simply becomes an integral part of the story. I thoroughly enjoyed the movie and would place it at the top of the rock music movie genre, along with the likes of the Almost Famous or The Pianist.
Then a couple of days later, a strange coincidence happened. Fellow blogger, Alex Miller, recommended the rock duo, Rodrigo y Gabriela, and their self titled album. I listened to some samples from the album and immediately scooped up a copy off of the Amazon MP3 Daily Special. Like the movie Once, this album is brilliant. If you enjoy the fusion of different styles of music or love Mexican guitar, then this album is a must. Below is just one example of their unbelievable Mexican guitar rock music.
Back to the coincidence. Rodrigo y Gabriela are from Mexico, but now live in Dublin, Ireland. As I was reading about Rodrigo y Gabriela on the web, I found that after they moved to Dublin, they were forced to become “buskers” in order to earn money. While busking, they became friends with a fellow busker, Damien Rice, who has since also become a successful musician. I had never heard of Damien, so I thought he might be the musician featured in Once. It turns out the featured artist in Once is Glen Hansard. I then Googled for “damien rice frames” to see if there had been any collaboration between the two. Below is the video I found, which is yet another brilliant piece of music from Ireland. The video is rough, but still conveys the energy that existed in the pub the evening. This is a perfect way to kick off the weekend. Grab a glass of Guinness and enjoy. (give the video 30 seconds to turn to the correct position)
Thinking in Stacks (Revisited)
This is the third of three previously published articles related to Java web frameworks that I am republishing. This one is from about fifteen months ago. Choosing the correct stack of software to support a web framework is important. You can either build your own stack or choose from an already integrated stack.
———————-
The number and diversity of Java frameworks (and web/MVC frameworks in particular) is a great thing. But along with choice also comes drawbacks. Which frameworks do I choose for a new web application? Project X is using frameworks A, B and D - do you know these? Are they production worthy? I have heard for every project you should choose the best tools (or frameworks) for the job. Really? I tend to agree to an extent. But is one Web application so different from the next that I need to reevaluate which frameworks I use on each new project?
This leads me into what I really want to discuss. I believe there has been a positive development in the Java world, in that popular “stacks” of open source software are beginning to emerge for developing web applications. I am defining “stack” as simply “multiple software frameworks integrated and used together”. Wikipedia defines a similar term, solution stack. Should project teams start making stack selections instead of framework selections? While frameworks maybe should ultimately be selected based on their individual merits, I think a popular stack can be a great place to start. Some of the benefits of using a popular stack include: accelerated startup time, reduced learning curve, increased software quality and increased knowledge base. So far, I see three stacks emerging as the most popular.
The first stack is the Spring/Hibernate stack. Maybe this one is the most obvious. Over the last fews years Spring and Hibernate have become so popular that they have almost knocked EJB2 out of existence on new projects and forced the creation of the new EJB3/JPA specification. I think this stack is still maturing, in that projects are adding everything Spring has to offer in addition to the already popular Spring IOC and Spring Transaction frameworks. By that, I mean using Spring MVC for the web tier, Spring Web Flow for work flow and any other Spring frameworks that are found to be useful. Maybe I should simply call this stack the “Spring stack”. It should be noted that the very promising Grails framework is built on top of Spring MVC, Spring IOC/Transaction and Hibernate.
The second stack is the JBoss Seam stack, which is basically a stack by definition. JBoss Seam ties together the JSF framework specification, using MyFaces for its default implementation, to the JPA specification, using Hibernate (another JBoss product) for its default implementation. The JBoss Seam framework itself adds work flow and other capabilities to the middle of the stack. Other JBoss frameworks like JBoss Rules can easily be integrated into the stack. If you like the idea of working with J2EE specifications and tools designed for J2EE specifications, then this stack may be the one for you. A big positive of using JBoss Seam is that it reportedly handles of lot of issues developers encounter when working with JSF.
The final stack is the Ruby on Rails (RoR) stack. JRuby 1.0 has just been released and is expected to execute close to if not 100% of RoR applications on the Java platform. The increasingly popular and much imitated RoR gives you everything you need in one package, with ActiveRecord for persistence along with MVC functionality and much more. If you have ever read or listened to interviews with RoR creator, David Heinemeier-Hannsen, you might recall him talking about why he created RoR as a way to quickly create a new web application without having to start from scratch. David wants RoR to give you everything you need to create a web application right out of the box, with little or no configuration, so you can focus on the business logic and not the underlying framework code. I mentioned that the Grails framework/stack is built on the top of the Spring/Hibernate stack. Grails is a Java implementation of a RoR like framework.
This discussion wouldn’t be complete if I didn’t mention the AppFuse project. Created by Matt Raible, AppFuse let’s you quickly create an application skeleton using various combinations of the most popular Java frameworks. Without going into too much detail, you can choose from four popular Java web frameworks (Struts2, JSF, Spring MVC and Tapestry) and three Java persistence frameworks (Hibernate, iBatis and JPA). Spring is used to tie everything together. I think of AppFuse as being a nice alternative to choosing one of the above stacks, while still getting many of the same benefits.
The downside to the emergence of these popular stacks is there are some great frameworks not included in these stacks and not getting as much attention as a result. A few that come to mind are Struts2, Tapestry, Wicket, Rife, Guice and Google Web Toolkit. While I feel having a small number of popular stacks is a good thing, I also see diversity and innovation as good things. I guess you have to make a choice between what is most important to you, starting with a small group of popular technologies, or selecting from the latest and greatest.
If stacks truly become the way the Java community prefers to view software in the future, I think we’ll start to see the creation of new frameworks slow down and a lot more activity continue around the already popular stacks. In true Java tradition, perhaps there will even be a couple new stacks show up in the next year (Google stack anyone?).
Great Book Titles From DHH
I just watched David Heinemeier Hansson’s keynote from RailsConf 2008. As usual, it was very good and offers a nice perspective for someone who works in the world of Java development.
David referenced several interesting books during his presentation.
- Agile Web Development with Rails - Sam Ruby, Dave Thomas, David Heinemeier Hannson (I would plug myself too)
- The Secrets of Consulting - Gerald M. Weinberg
- My Job Went To India - Chad Fowler
- Implementation Patterns - Kent Beck
- The Innovator’s Dilemma - Clayton M. Christensen
- Envisioning Information - Edward R. Tufte
Web Conversations in Java (Revisited)
In the spirit of selecting a Java web framework, I am going to republish a couple more articles related to the subject that were previously published on this blog. Below is an article I published over a year and half ago related to web conversations in Java. Support for web conversations is an important topic when selecting a Java web framework. If anything its probably even more important today than when the original aricle was published, since the subject is better understood today and by more people.
————————-
Sometimes in a Java Web application you may want to pass data from one screen to the next. A shopping cart is a good example of this. Another is a “wizard”, which leads the user through multiple steps when entering data. You can pass the data from one to screen to next in a stateless or stateful way depending on how you want to design your application.
With shopping carts, if you were to open two of them for the same Web site at the same time, the data entered into one would probably step on the data in the other. I think to most users this is understood and I believe most of us know that opening a shopping cart more than once is a bad thing. However, in a business application, it may actually be desirable for a user to open a wizard more than once at the same time. If this is the case, then multiple instances should not step on each other.
There are many factors to consider when deciding to make a Java Web application stateless or stateful, but I won’t go into those issues here. Its a very complex decision and there are many chapters in many books dedicated to the subject. Let’s assume we want a stateful application. For our wizard screens, using the HTTP session object simply will not do the trick for us. The HTTP session object is generally shared by each instance (window or tab) of a type of browser (Firefox, IE, …). If you have multiple Firefox browser windows open, they will still still share the same HTTP session. Its not entirely consistent on how this works, but to describe this behavior would take too long here and is the subject for another day. What we need is memory that is not shared by each of the wizards. We need data that is scoped to a series of user interactions in the wizards. What I have found is that this concept is starting to be referred to as a “conversation”.
A “conversation” can be thought of as a series of interactions between the user and the Web application. In this discussion our user interaction is taking place in the wizard pages, where the user inputs data and moves from one screen to another in order to complete their data entry. In order for conversations to be properly supported, multiple conversations need to be able to take place at the same time. This would allow us to have multiple wizards open at the same time. I think of conversation scope as being in between session scope and request scope.
There is a Java Web framework that is formally supporting conversations, Seam. In Seam, you actually specify in your Web pages when you want the conversation to begin and end. Seam takes care of the programming on the server side to make it all work. It would be nice if more frameworks would support conversations in this way. I haven’t used Seam yet, but this feature may be a good reason to give it a closer look.
Spring Web Flow is another framework supporting conversations. It is a layer that sits behind a Web framework such as Struts or Spring MVC. Spring Web Flow appears to be very in depth in its support of conversations. Given the popularity of the Spring Framework these days, I would recommend giving