Wille Faler is an experienced software developer, architect and agile coach with experience across a number of different industries as an independent consultant. Wille specializes in backend, integration, and Java technologies, but has more recently found a passion for Scala and text mining/analysis. Wille is a DZone MVB and is not an employee of DZone and has posted 42 posts at DZone. You can read more from them at their website. View Full User Profile

“Perfect Web Framework”? There Ain’t One

  • submit to reddit

Discussions about web frameworks online often lead to extended flamewars, with fanboys of various frameworks trading arguments and inevitably, insults. It’s not secret that I’m a bit of an Apache Wicket fanboy. Though I don’t believe it is the perfect framework for all situations and problems. I find it to be more of a swiss-army knife: it’s one of the most versatile and well-rounded frameworks I’ve come across, pretty good at most things, but certainly not without a few rough edges or weaknesses, just a lot fewer rough edges and weaknesses than any others I’ve come across.

Different Problems, Different Solutions
The thing is, different frameworks emphasize different problems, and approach those problems in different ways. They also emphasize different mixes of developer skills, allowing developers to spend the bulk of their time with technologies they are comfortable with. For instance, I would say that Wicket is ideal for webapps that have a mix of user interactivity and content presentation, written by developers who are good at Java (or Scala) and understand object orientation.

However, if I was looking to build something that was 95% read-only, I’d probably not use Wicket. In fact, I’d probably save myself a lot of effort and simply look at a decent publishing/cms platform, like oh, say, Wordpress? Customized templates, job done, time to go home.

If I was looking to write a Rich Internet Application type webapp, heavy on interactivity with no/few requirements to be search indexable and discoverable, I might look at frameworks that solve that problem, like GWT or it’s cousin Vaadin. But most likely, I’d probably be somewhat tempted to go for a html/css/js only front-end talking to a RESTful backend built on top of Scalatra, along the lines I discussed in an earlier post, and at the same time get a hopefully nice API to go with my webapp so others could build clients on top of my platform as well.

All the Wrong Reasons to Chose a Web Framework
Organisations often chose the wrong tools for the job because of a number of reasons, either because of irrational fanboyism, Resume Driven Development or because “it’s the corporate standard”. The last one in particular annoys me, as the practical implication is that you should use the hammer if that is the “standard tool”, even if the problem you are faced with requires a drill or screwdriver.

The right reasons are problem fit and skills available. It’s really that simple.

There really is no “perfect” web framework, a search for one is futile and the results will largely be dependent on what you are trying to solve and how well it fits with your skills and way of thinking (though sometimes a learning curve is more than worth the effort). Use what works for you and your project, and evaluate your choice based on those criteria.

Oh, just don’t use Struts or JSF. They’re useless piles of donkey poo, unfit for any purpose given the multitude of alternatives. Extended use of Struts or JSF will make any reasonable man want to stab themselves repeatedly in the Cerebral cortex with a rusty spoon just to end the misery.

Published at DZone with permission of Wille Faler, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Cafebabe Ru(ssia) replied on Fri, 2010/11/19 - 11:47am

I've successfully done rich web project with JSF1.2+Seam and I'm very content. JSF2 is even more suitable for web app, it is strange to see how "experienced software developer" mixes really outdated Struts with actively developing JSF.

 Wicket is ugly, architecturally. May be it is good for small tasks due to its low learning curve, but if you want to solve complex tasks and have a good maintainance it is not a solution. And I really prefer to use facelets than swing-like design because markup should be described by markup language and not Java code - say me how you will communicate with web-coder (the same is true for GWT and Vaadin). Yes swing developers will be more comfortable to start with swing-like frameworks but only because impotency of learning of new approaches.

If you vote for REST it is a good in idea but bad in practice, eventually you will return to any kind of framework, but it will be developed by you and it is questionable will it have good design and obviously it will be more expensive.

Steven Goldsmith replied on Fri, 2010/11/19 - 1:11pm

Metawidget http://www.metawidget.org concept is the way to go in my humble opinion. This whole focus on "Web Framework" versus an abstraction that allows multiple UI targets from the same code base seems like a dated way to think of UI presentation (is web all we care about?). The reality is you can exploit multiple UI targets with minimal code rewrite and take advantage of native widgets when required.

Donny A. Wijaya replied on Sat, 2010/11/20 - 3:34pm

JSF 2 is great (with SWF). GWT is the most annoying framework I ever date since Struts 1.x (very difficult to trace the errors. More annoying than the old Struts). Vaadin is much better and has better integration with Spring and Grails.

Amin Mansuri replied on Sat, 2010/11/20 - 3:40pm

A criteria for looking for web frameworks should include: 1. Is it easy to create your own components? 2. Are there lots of 3rd party components to choose from? 3. Is AJAX easy? 4. Is it realatively simple? 5. Is it used by many other projects? (how likely is it that you can find trained people, books and that it won't be abandoned) There are several frameworks that fulfill these requirements. I chose GWT a couple of years ago. We like GWT because we don't have to deal with complex Javascript and it is very easy to make reusable components. For searchable parts of the site we just use basic JSP and tag files.

Rob Juurlink replied on Sun, 2010/11/21 - 7:01pm

Hope you meant JSF lesser than version two by "JSF".

I really like JSF 2.0, this opposed to older versions. I have also used Struts2/WebWork and GWT before. Depending on the type of application they both suit. I liked working with both.

BTW, when deployment is not an issue and the application is rich, most of the time a native app suits best imho.

Leo Erlandsson replied on Mon, 2010/11/22 - 2:01am

No, there is no perfect Web Framework. We evaluated 5 or 6 different frameworks for our applications when we moved from JSP. The evaluation and prototyping included JSF, Struts, Apache Wicket, Spring (MVC + classic) and Pivot.

We chose Apache Wicket, as it best suited our needs (fast, effective, easy, clear, inheritance, excellent AJAX Support, great vivid community, ..., ...)

I don't know why Java Web Frameworks is such a sensitive subject, but:

 Let the FUD begin ;)

Cosmin Mutu replied on Mon, 2010/11/22 - 2:11am

Clearly you have no ideea what you`re talking about ... JSF 2 is very productive and quite easy to learn (if you buy the right book). I`ve learned it in 2 weeks (1 week i studied the book, the second i started writing code).

Now the real question is, why are you criticising a framework you didn`t worked with? (isn`t this FLAMING?)

I don`t really understand the purpose of your post ... Blogging (at least on JAVA ZONE) should be about passing knowledge further on ... not talking about your likes and dislikes .. or at least if you wish to talk about it, point out why exactly you like that, how did it worked out for you, etc ....

Hope we`ll see better stories from you on the future ... cheers!

Brian Topping replied on Tue, 2010/11/23 - 2:06pm

Willie, if you like Wicket so much, maybe you should give Brix a try, http://brixcms.org. Come join us!

Henk De Boer replied on Tue, 2010/11/23 - 6:30pm

Oh, just don’t use Struts or JSF. They’re useless piles of donkey poo, unfit for any purpose given the multitude of alternatives.

Really? I mean, really? There indeed isn't a perfect framework, let alone a perfect web framework, but I consider JSF 2 as one of the better general purpose frameworks on the market today.

Unfit for any purpose is just b*llsh*t. We create perfectly fine web apps with it, thank you very much...

Paul Keogh replied on Wed, 2010/11/24 - 5:17am

+ 1.

I have built successful applications rapidly and without undue stress using the JBoss Seam + Richfaces stack. Its a great platform for rich, scalable and future proof web applications.



Victor Tsoukanov replied on Mon, 2010/11/29 - 3:25am

I think the question “Perfect Web Framework” is not the correct one, better to ask why there are so many Web Frameworks and why we have always select a better one for our project. I do not understand what is the difference between desktop (Swing) application and WEB application? Why do we have only one – Swing framework (yes, two – AWT also) for desktop applications and have the whole bunch of frameworks for WEB application? Actually, I do not have an answer. For me the best is GWT, it provides same application model that I have used in ordinary desktop application without far-fetched complexity existing in JSF, Spring MVC….. (I could continue) BTW, I think the most important feature of GWT is an ability to develop stateless web application for scalability without redundant headache.

Samuel Franklyn replied on Mon, 2010/11/29 - 5:30am

Oh, just don’t use Struts or JSF. They’re useless piles of donkey poo, unfit for any purpose given the multitude of alternatives. Extended use of Struts or JSF will make any reasonable man want to stab themselves repeatedly in the Cerebral cortex with a rusty spoon just to end the misery.

 What an idiotic statement. I use JSF since 1.x. Yes it has many flaws but I am able to fix the flaws by using several open source library and some custom code. Thats because JSF designed to be hooked and customized. Since JSF 2 I only have to use 1 open source library. JSF 2 has eliminated 85% of JSF 1.x flaws. If you do not use JSF to develop applications please shut your mouth because you don't know what your talking about.

Nikolay Skachkov replied on Wed, 2010/12/15 - 11:37pm

<p> "The right reasons are problem fit and skills available" -

really good said. The problem is that there is always a contradiction between the aim of "fitting" any specific problem and any "skills" currently available.

<p>  Another very right thing all you guys say here is about "learning curve". And there is one "perfect" way to avoid the learning curve - not to learn anything else besides you already know. It is such a strong temptation. It is a proven plus. And the paradox is in that choosing this way you simply may not compare its pros and contras with other option ... simply because knowing those is not included.

<p> And the better you know something the stronger your love that knowledge in yourself. In the extreme positions are the "teams" that develop technologies - they know their knowledge even much  better. Almost usually the desire to be a knowledge provider (and to benefit of that role) results in forcing all the <i> rest </i> of known computer science into the "technology" you want to sell. This is called "REST"-full technology.

<p> To be able to go forward we have to do a very difficult thing - to pretend that I do not know about it nothing at all yet. And start considering things from scratch, asking yourself questions like: "If this web framework does not describe how to use a database - is it a big fault or an advantage?". Or "if this web framework works OK but does not use this at all (e.g. JavaBeans, XML, Helper classes, Listeners, Interceptors, instances for each HTML button, instances for each loop) - is that a fault or an advantage?".

<p> IMHO the big part of the problem is that too much unnecessary knowledge and too many hardly necessary techniques are hooked to most of the so called "mainstream" frameworks. The set of criteria to compare web frameworks should be much sharper.  For instance: "What is a exact definition of component in this framework?". Or: "Can the framework help to implement a known set of test-examples?".

Liezel Jane Jandayan replied on Thu, 2011/08/25 - 6:03am

Java frameworks use hibernate as a persistence layer, which can generate a database schema at runtime capable of persisting the necessary information. This allows the application designer to design business objects without needing to explicitly define a database schema.-Jonathan Berkowitz

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.