The Source for Java Technology Collaboration
User: Password:



Vikram Goyal

Vikram Goyal's Blog

Java frameworks - maybe too many

Posted by gvix on May 09, 2006 at 09:42 PM | Comments (21)

A recent discussion on the Queensland JUG mailing list here in Australia, has echoed some of my thoughts on Java frameworks. Before I point you towards this list and the messages in it, let me confess something.

I have never used Hibernate commercially.

There. With that career ending publicly stated confession, let me take a bow and get out of the way to contemplate a career change to opening my own curry restaurant (Ah, at least I would be able to eat my own creations).

For that matter, I haven't actually ever used Spring. Or Tapestry. Or Velocity. Webwork? No. I do have books on Hibernate, Spring and Tapestry.

While I am in this self-destruct mood, let me add. The last framework that I actually used and can tell you everything about in a heartbeat is Struts, version 1.1. I have only recently used Struts 1.2, and would be clueless if you asked me anything about the new Struts Shale Framework, based on Java Server Faces.

For me, the requirement to use anything over that framework didn't arise (the fact that my day job requires me to work partially with ASP.NET may have something to do with it as well). Unlearning a solid, reliable framework that did everything that you asked of it, just didn't seem right. There is not a single case I could make against using Struts (1.1 and 1.2) in production environments.

So, back to the list. Paul Reedman, responding to an article on a failed Java project in West Australia, hit the nail on the head by saying:

"Java Frameworks good grief what a joke, take your pick we have a million of them. Everyday on Server Side I read about a NEW, FANTASTIC, LABOUR saving framework.

I still run into Java projects that build their own frameworks !!! Yes Struts or hibernate is not good enough, we need our own framework, so lets spend precious several weeks (or months) of the project time recasting a new web framework."

He goes on to add:

"Another thing I have noticed is that Java people love building layers. So a particular developer doesn't like the interface into hibernate or struts (or whatever framework) so they build another layer on top of the framework.

This layer then becomes complicated and so a whole bunch of other people add to the layer in an attempt to make it "easier". (which doesn't happen because all they have done is to make it more complicated). Of course this new layer hides everything and soon you have no idea what you are doing. Importantly no one documents this new layer, so when new people join the project, they ask "I don't understand this framework..". Of course they don't know that underneath all of this software is plain old struts which has disappeared from view."

How true. Plain old Struts. Even though I have a propensity to add multiple layers to my Struts projects, I love the fact that Struts is the glue holding them together in a working whole. There was a never a requirement weird enough that made me think, "Hmm. Maybe Struts can't do that, better look at other frameworks".

Or maybe, I am holding on to the past without thinking about the future. Would I still be using Struts (ok maybe 1.2 instead of 1.1) 5 years from now? 10 years?

Or would I be giving away free rice with your curry?



Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Let me clue you into something Vikram:

    > I have never used Hibernate commercially

    Neither you, no I, nor the vast majority of Java developers have either. Surprised? It's because it simply isn't that important.

    Do yourself a favour and avoid the server side. In case you haven't realised; it is essentially a marketing channel, for consultants and book writers. Their job is to fabricate the next new 'miracle', and hype how you will be left behind by not using it. Trust me, they can crank out as many of these new miracles, as departments have training budgets.

    Understand your technical fundamentals well, focus on the job at hand, and things will work out for the best.

    Fortunately things aren't nearly as complicated as the "industry experts" are trying to make them.

    Posted by: cajo on May 10, 2006 at 04:12 AM

  • First, Struts is a framework for developing web applications. Hibernate is for the persistence layer. They have nothing in common, except that they're both written in Java. Secondly, if you're happy with Struts, keep on using it. But for many other developers - including me - the abstractions provided by Struts are way too low-level. JSF, Tapestry and a couple of others are potential candidates. Freedom of choice is never a bad thing. Or would you prefer to kick either the SAX API or the DOM API out of the JDK? They're both about XML processing...

    Posted by: scotty69 on May 10, 2006 at 05:52 AM

  • I completely agree with the sentiment about building extra layers being problematic and common. This is overwhelmingly common, the rationale almost always being that it "isolates" you from your technology choice, so you are free to replace it later.

    Never mind that 80% of projects don't change, or that the implementation details leak right through this layer, and that it's a lot of extra busy work. If you want to be productive you need to stop fighting your chosen tools, embrace them and work with them.

    As for the framworks - I've said this elsewhere; maybe the reason there are so many is because the ones that exist don't cut it. While Struts "works", having used it on several projects I'm always left with the distinct feeling that it adds complexity, demands effort on my part, and gives very little in return. If you dispute this I'd suggest you spend some time with a modern framework like Stripes (which I maintain), Wicket, or in a slightly different vain, JBoss Seam, which is a framework that ties together EJB3 and JSF and adds quite a lot of interesting stuff.

    Posted by: tfenne on May 10, 2006 at 09:19 AM

  • Hype-driven code monkeys are the ones that:
    - give Java a bad name; - create a multitude of incredibly complex frameworks that consume other people's time in trying to learn it by their poor documentation, or even worse, by a 600 hundred page book; - need attention, and see the "open crapware" as a shortest way to fame;
    The hype on Ruby at least will make Java's fortune to turn to better I hope. The days of endless XML configurations should remain in the past.
    Think about it, Java already has a HUGE library, J2EE has a huge set of libraries, do we need more? The framework fest is too idiotic to be true, but... it is true.

    Posted by: thiagosc on May 10, 2006 at 02:24 PM

  • Count me in as one of the many on your side.

    While these frameworks might be fun to play with, they do not really form part of the common standards. Using them to develop any applications is literally the same as writing your software in an entirely different language - at least in terms of the headaches you will cause others to have.

    Posted by: alexlamsl on May 10, 2006 at 04:50 PM

  • Hey Vikram - Good point! I still see very many organizations still on struts and POJDBC!!! For developer Joe who has made a quantum leap learning struts and has not even heard of JSF, thinking of frameworks like Tapestry, Wicket, Webwork, Rife and what-not hurts the brain. Lets not even talk of learnig it!

    Posted by: tchangu on May 10, 2006 at 07:04 PM

  • Now might be a good time to unveil SQL on Rails, the most exciting thing to *EVER* hit the web. Ruby, prepare to be blown out of the water, you've reached EOL.

    http://www2.sqlonrails.org/screencast

    Posted by: ilazarte on May 10, 2006 at 09:57 PM

  • I've been using the same framework for almost 7 years, that we developed in house before Struts was there, and even though I understand why some people prefer high level APIs that put layer on top of layer to add some goodies, I'm quite careful on the layers I add not to lose insight of what goes underneath in some cases.
    And well, I do have used Hibernate as persistence engine in production systems, in fact we released one last week. But I've also used PLSQL, EJB1.1 (tried, tested, abandoned :) ), EJB 2.1 (abandoned in favour of HB) and now I might try with JDO2.0/EJB3.
    In any case, I stopped paying attention to the hype long ago, I have real work to do :). S!

    Posted by: greeneyed on May 11, 2006 at 03:25 AM

  • I've released several products out here in Japan running POJDBC. I wouldn't have traded that SQL learning experience for anything, but I'm currently moving all of our products over to Hibernate. Why? It actually *does* reduce the amount of code I have to write.

    Posted by: gachapin on May 11, 2006 at 05:37 PM

  • cajo

    "Understand your technical fundamentals well, focus on the job at hand, and things will work out for the best."

    Well said indeed! This should be the motto for every developer IMHO.
    Vikram

    Posted by: gvix on May 11, 2006 at 05:58 PM

  • Scott69:
    "First, Struts is a framework for developing web applications. Hibernate is for the persistence layer. They have nothing in common, except that they're both written in Java. "

    Of course! But the point is, is all the years of working in Struts, I haven't felt the need for introducing Hibernate for the persistence layer, yet.

    "Secondly, if you're happy with Struts, keep on using it. But for many other developers - including me - the abstractions provided by Struts are way too low-level."

    Strange! There is a difference of opinion. I always thought that Struts abstractions were way high-level.

    "Freedom of choice is never a bad thing. Or would you prefer to kick either the SAX API or the DOM API out of the JDK? They're both about XML processing... "

    True. It's all about the freedom of choice. As Java developers, we are way spoilt.

    >

    Posted by: gvix on May 11, 2006 at 06:04 PM

  • > I always thought that Struts abstractions were way high-level.

    Do you have assembly language background?

    Posted by: michael_jouravlev on June 28, 2006 at 08:36 AM

  • All this whining about having too many frameworks. Do you complain about all the different cell phone models that come out every year? Surely an old fashioned telephone suffices. Why many frameworks? Because people are trying to innovate so that they can build new software faster, better maintainable, etc. Most open source projects are created by people who have an itch to scratch, feel that they might help other people out and by building a community increase the chances that their framework will be good (more eyes on the project, testing hours, etc). God, it is so tiring to read these dumb conspiracy theories (open source developers are after your consulting hours). Why don't you try talking to a few? You just need to be informed consumers, which you achieve by reading, trying what problems the different frameworks tend to achieve, and determine whether you might agree with it.

    Posted by: eelco12 on November 03, 2007 at 11:57 AM

  • 博澳流水线以丰富的经验和先进的计算机辅助设计生产线来满足客户的要求,设计出合理的工业流水线.

    Posted by: sunhuanjun on November 18, 2007 at 10:31 PM

  • 购买流水线就到浙江温岭,那里的生产线质量很好呀!

    Posted by: sunhuanjun on January 18, 2008 at 02:37 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds