Friday, June 17, 2005

Sunsetting Apache Struts

If you can't already tell from some of my previous postings, I'm not a real big fan of Apache Struts.

I don't hate Struts, I'm just impatient for something better.

I've used Struts because it is an industry standard, and standards are extremely important. And for a medium-to-large sized application, Struts more than pays for itself, and many large projects have succeeded by using it.

However, in my opinion, Struts represents one of those "Two steps forward, one step back" frameworks that is only useful until something better comes along that provides the more optimal solution that everyone has been looking for.

That next "thing" isn't quite here yet, but I see the some seeds of promise in JSF (JavaServer Faces).

JSF is simpler and less dynamic than Struts, so it lacks the "two steps forward" that Struts represents. But it is also a cleaner and more direct model/control solution that spares you the pain of "one step back" that comes with Struts as well.

If I rate JSF and Struts by comparing features, Struts comes out ahead in some areas, and JSF comes out ahead in other areas. But overall, JSF has a better chance of being one of the building blocks of the next great "thing" that will take all Java Developers three steps forward in Web Development. Oddly enough, one of the areas that I would rate Struts ahead of JSF is in the implementation of it's tag library, and yet this seems to be the first things that Struts users are willing to cede to JSF while focusing on making Struts a better application controller. Hmmmm.

Sure, you can use Struts and JSF together, but in my opinion, there is little benefit in that combination. You gain the control-layer functionality of Struts, but you also introduce the complexity of two frameworks into your project.

Any two technologies can co-exist on the same project if you are willing to pay the price of the added complexity. I can use Java and .NET on the same project, and there are middleware products on the market that will bridge the two. But I'm not going to do that unless I have a project that keenly needs the strenghts of BOTH platforms. If I can get by with just one platform, I will.

The again, if JSF is just a starting point down the path towards a better framework, then I'm not sure I would choose it yet if I were given a truly huge project to code today. Maybe I would still rely on Struts....or maybe I would give Spring MVC or Tapestry a try. (???)

I do like that JSF is an official Java standard, supported by the Java Community. I've seen other "standards" floated out by Sun in the past that never caught on, but with JSF I'm seeing at least some major vendors supporting and implementing JSF directly.

JSF represents a concrete step in the direction of developing a true component-based Web Development framework for Java. That's a very interesting direction to take Java, because it does remind me a lot of the .NET Framework.

Here are some good articles I found in a quick Google search that back up the things I've said here:

http://websphere.sys-con.com/read/46516.htm?CFID=366297&CFTOKEN=E9331826-6B8D-10F4-CA9110454903B6A0

http://www.oneinfoplace.com/jsf.html

http://blogs.sun.com/roller/page/craigmcc/20040927#struts_or_jsf_struts_and

http://www.oracle.com/technology/tech/java/jsf.html


Another interesting article comes from Apache (below). They state that Struts is not going to take any more significant steps foward, and will only be maintained as "Struts Classic". The next big framework that the Struts group works on will be a completely new one written from scratch, and will likely incorporate JSF into it. Maybe this new framework (code named "Shale") is the next big thing we have been waiting for? We'll see.

http://www.apachenews.org/archives/000552.html

2 comments:

Gautam Shah said...

Your present a good analysis. Check out links at http://techyatra.blogspot.com or hit http://www.devx.com/Java/Article/31419 directly for a deeper look at Apache Shale's capabilites. May be, just may be we might have a convert :-)

Gautam Shah said...

Your present a good analysis. Check out links at http://techyatra.blogspot.com or hit http://www.devx.com/Java/Article/31419 directly for a deeper look at Apache Shale's capabilites. May be, just may be we might have a convert :-)