JumpStart Your Web Application

Posted on Wednesday, December 3, 2008

4


I was planning to start a small hobby project last week. I did not want to build the infrastructure ground up so the best thing was to look at quick enabler tools which would get me started in a jiffy.

I have had a reasonably successful project delivered with Appfuse so this time I thought let me try out something else. That led me to get to 2 other enablers.

RIFE and Able

So this is where I am

Goal: Getting started quickly and getting the infrastructure up so that i can code the business logic.

RIFE: Rife can be thought of as a development library. It can be thought of as a web application API to implement most of the features that common web apps have.
Look at the stack and you would get most of the things that you would desire
rife1
It has Ioc, JDBC Abstraction, support for web services, scheduler, mail queue, out of container testing, authentication, persistence layer etc. etc.

So what is the pitfall, at least in my eyes 🙂 The pitfall is that RIFE is a library of these things, you can use them and you remain tied to the RIFE library. So for example consider this

RIFE provides its own framework for the authentication of web applications. It includes authentication session management, remember-me support and credentials management and validation.

For database queries if I need to use a generic Query manager then this is where I get it from com.uwyn.rife.database.querymanagers.generic. Again if I need to build a page then the page syntax looks like this

import com.uwyn.rife.engine.Element;
import com.uwyn.rife.template.Template;

/**
* This element simply outputs the <code>Hello world.</code> message.
*
* @author Geert Bevin (gbevin[remove] at uwyn dot com)
* @version $Revision: 3364 $
*/
public class HelloWorld extends Element {
/**
* The element's entry point.
*/
public void processElement() {
Template template = getHtmlTemplate("helloworld");
template.setValue("hello", "Hello world.");
print(template);
}
}

So the thing which makes me worry is that I would be tied to the RIFE library. This is no way discounts the RIFE library and the fact that it is wonderful but somehow I need my web application to be based on standard frameworks which are easy to get skills on and the industry support is good. So I would be looking at something like Struts, Spring, Hibernate, JPA etc. Though RIFE suggests that we can go ahead and use these frameworks by delegating calls to these frameworks from RIFE, I feel this would be an extra step.

Also if I am using RIFE as compared to Spring and Hibernate that I have already used earlier then probably that is an extra learning curve for me.

People who have done that can comment on it and I would love to try this out.

ABLE: is a starting point for building web apps. It is not a library and is an aggregation of various open source tools to in one cohesive stack. This is similar to Appfuse and something that Rails has done to Ruby.
Able uses Spring for Ioc and iBatis for OR mapping. It does not support Hibernate as of now, or at least I could not find details on that.

I got a hint to use ABLE from this article on InfoQ.

The discomfort here is that thought it started with a lot of hype, it seems to have lost steam. You can possibly still download the code from here https://svn.opensymphony.com/svn/sandbox/able but OpenSymphony does not mention this project on their main site.

Also there I read a discussion somewhere that Able might be merged into Appfuse. For lack of other information I am assuming that, that is the case.

So back to Appfuse then

Appfuse : is again an aggregation of open source frameworks. It is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently. Appfuse 2.0 version uses mvn to build and deploy.

You can chose the project to use any of the following

  1. JSF Basic
  2. Spring MVC Basic
  3. Struts 2 Basic
  4. Tapestry Basic
  5. JSF Modular
  6. Spring MVC Modular
  7. Struts 2 Modular
  8. Tapestry Modular
  9. Core(backend only)

and each of them can be created using the maven archetype. It would build up the entire structure for you and you can start rolling then on.
The advantage that I see here is that you are not tied to a library which has a lower industry support but you are free to chose between the best Open source frameworks which are available. The skills are easy to get and you have better support.

Take your pick!

Advertisements
Posted in: Architecture, Java