Frameworks arent as easy as they make it seem

The point of web frameworks is supposed to improve programmer productivity, support a variety of extensions and be able to simplify things. Well I found things just the opposite. I’ve been looking for a good Java web framework to work with but in every one I try – Seams, Appfuse and now Spring Roo, I’ve run into difficulties with starting out.

Why is the setup and configuration so difficult? I look at the Get Started and Tutorial links and they seem straightforward. But the problem is that those tutorials are always missing some detail that could wrong and often does in reality.

I followed Spring Roo’s Getting Started article and I followed it very carefully yet inevitable I run into a bug or error the tutorial doesn’t mention:
Internal error in the plugin manager executing goal ‘org.codehaus.mojo:aspectj-maven-plugin:1.0:compile’: Unable to load the mojo ‘org.codehaus.mojo:aspectj-maven-plugin:1.0:compile’ in the plugin ‘org.codehaus.mojo:aspectj-maven-plugin’. A required class is missing: org/aspectj/bridge/IMessageHolder

This is the error I get after fixing 7 other errors that the tutorial convieniently never ran into when building with Oracle, Hibernate and Maven. I had to manually download and install each jar after Maven failed building. The tutorial never runs into this problem, because of course things always go smoothly for them. Even after I ran into this error, I tried posting on the Spring Forums with no luck in getting responses. So now I’m left with two choices: Try to fruitlessly Google the source of the error (which I have been doing but to no luck) or to start over with another framework from scratch (which I’ve already done twice already). What a pain. I ran into the same thing when I was trying to build with Ruby on Rails and Appfuze, I follow the tutorial exactly – I run into an error or something that the tutorial doesn’t explain – I google it / ask for help on forums to no avail – I try starting over with another framework because I can’t find the solution. JBoss Seam 3.0 doesn’t even have complete documentation! It’s awful how I can’t build something as simple as a web interface with a framework without running into numerous bugs.  The only one which worked (sort of, I still had to modify some code to get it to work) in accordance with the tutorial was Grails. But, I can’t use Grails because people are unfamiliar with Groovy, forcing me to find a Java framework.

Another thing – Spring Roo only supports Eclipse (which we don’t use); I use Netbeans and there doesn’t seem to be any support for it despite it being able to create a Grails application just fine. Well since Spring owns Grails and Roo, why can’t they make Roo as easy! Inevitably I run into errors with Netbeans because it doesn’t integrate properly. Roo also has a way of editing its files from the command line – but I often find it more tedious than editing using a GUI.


Web Development frameworks

There’s an article on wikipedia comparing different web frameworks:

The scope and breadth of these frameworks is quite vast, and it would be nice to do a more thorough comparison, especially among the ones using the same language.

ASP.NET for example, has no less than six different web frameworks; quite daunting if you wanted to start your own project. The variety of choices makes it hard to settle on one web framework to use. It’s similar to Joomla vs Drupal vs WordPress; they’re all good CMS but for different purposes depending on how much flexibility and usability you want.

Flex is the widely used for flash applications; Lift vs Grails is much like the comparison of Scala vs Groovy; both has its ups and downs. Ruby on Rails is still quite popular, but honestly the language itself isn’t as widely used as Java, PHP, or Python. As for those three languages, there’s just way too many frameworks there to choose from. PHP programmers have the choice of Zend vs Cake vs Symphony vs Codeignitor, etc while Java and Python have a plethora of different frameworks to choose from. C++, ASP.NET and Smalltalk round out the rest, which aren’t as widely used for developing web applications as the former ones.

I think to pick one framework you think you can work with is a good thing, but the variety of frameworks out there makes it hard, because its hard to see which ones will last, and to which extent the community will support those frameworks. I hope that someday each language will have one or two frameworks, instead of having five or six; having less means having more support around it, instead of diversifying the architecture around several different ones.

Most have some themes in common; Ajax, JSON+REST for HTTP services, support for open source, a form of ORM, the MVC methodology, and some have my personal favorite practices including convention over configuration and don’t repeat yourself, which makes it easy to set things up. I’ll stick with PHP, Java and Python though, the three languages I’m most familar with. *Sigh* Decisions, decisions…

Edit: Ok, so I used Appfuse at first but runnig into too many errors when I try to integrate with Oracle and Maven. SpringSource has a bunch of other web frameworks including Grails (my personal fav, but no one knows Groovy) and SpringRoo. Gonna take a look at that later… and if not there’s still a ton more -_- (Seams? Cmon)

Edit: Frameworks are stackable. Example: Oracle->Hibernate->SpringRoo->GWT->Jquery/Prototype->Client, any idea how many frameworks are bundled in that? It gets more complicated when you debug.