AppFuse Review
Monday 5 December 2005 @ 12:49 pm
Filed under:

I did a short investigation into the AppFuse project, to establish if this is a tool Consultants working for the LogicaCMG Java Competence Center can use in their projects.

What is AppFuse?

AppFuse is an application for “kickstarting” J2EE web application development. It consists of a set of libraries, jsp’s, templates and several build scripts. Running the ant new target in the AppFuse root directory will prompt for a few parameters of the target application, like database and package names. AppFuse then generates and copies a deployable web application that can serve as a starting point for further application development.

How well does AppFuse work in practice?

To find out how well AppFuse really works, I followed the QuickStart Guide, the Creating new DAOs and Objects in AppFuse, the Creating new Managers, the Creating Spring Controllers and JSPs and the Adding Validation and List Screen tutorials. I then tried to port the generated code to another RDBMS (Cloudscape 10.1). I also had a go at replacing the default two column page design with a three column design.

These are my findings.

Strengths

  • Short startup time - I had a deployable, database driven, tested, 3-Tier J2EE application supporting authentication, authorization, logging, click through tracing etc. in less than 3 hours. Even taken into account that I already had a complete Java environment installed on my machine (JDK, Eclipse, MySQL, Ant), this is fast … very fast.
  • Choose between IBatis and Hibernate - for persistence, AppFuse lets you chose between a DAO layer implemented using IBatis or Hibernate.
  • Choose between Spring MVC, Tapestry, Webwork orJSF - for the Web Tier, you can chose between two Component based (Tapestry and JSF) or two Request based web frameworks (Spring MVC, Webwork).
  • Support for Test Driven Development- apart from DAO, Manager and Web classes, AppFuse also generates Test Cases and the ant targets to run them, either individually or in logical groups (test-dao, test-web, etc.).
  • Build script - the Ant build script consists of 1200 lines and 65 targets and covers everything from dropping, creating and populating the database to deploying to Tomcat and fixing CRLF for Unix Machines.
  • Integration with Sitemesh - the JSP’s are build up using the the Sitemesh templating library, providing for clean separation between content and layout directives. Compared to for instance Tiles, Sitemesh is more powerfull and flexible.
  • Released under the Apache License - it lets us freely use the software for company internal and commercial purposes and does not require us to submit changes that we make to the software back to the Apache Software Foundation.
  • Documentation and community support - the tutorials and JavaDoc are quite good, and there is an active developer community using the software.

Weaknesses

  • MySQL only - the generated code is targeted at the MySQL database system. AppFuse does not support other RDBMS out of the box - manual adaptations of the generated code are necessary to achieve this.
  • No clean dependency management - AppFuse relies on ant build scripts and properties files to configure its (50+) dependencies. Usage of a tool like Ivy, a simple to use but powerfull dependency manager would be nice instead.
  • Heavy reliance on XDoclet for code generation - this leads to code that belongs in the Integration Layer (i.e. Hibernate mapping definitions and column names) being part of the Domain Layer.
  • Large build scripts - although they do provide a lot of functionality, the large build scripts are difficult to understand and maintain. It is also not always clear what the different targets do and how they depend on each other.
  • Usage of Business Keys as PKs - in general, when using Hibernate, it is a best practice to use Surrogate Keys as PKs for database tables representing Business Objects (”User”, “Car” etc.). AppFuse ignores this and uses the Business Keys as PKs.
  • Small committer base - it is unclear to me how large the developer base is that actively maintains and develops the AppFuse project. This is something to investigate when planning any long running projects.

Conclusion

AppFuse does what it promises to do, which is always nice: it kick starts a J2EE project in a very short period of time. In my opinion, this makes it a very good tool for Consultants that are assigned to small to medium sized, Proof of Concept like projects. Here AppFuse really shines and should be used to its full extent, meaning including all XDoclet code generation features and ant targets.

For larger projects, that will be running over longer periods of time, that have to integrate with other RDBMS like Oracle and need a clean dependency management, AppFuse can serve as a starting point. In that case though, one really has to invest the time to refactor the generated code.

— By Thomas Delnoij   Comments (4)   PermaLink

Menu


Sha256 mining

Blog Categories

Browse by Date
December 2005
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031 

Upcoming Events

Monthly Archives

Recent Comments

Links


XML Feeds Option


Get Firefox  Powered by WordPress

code validations
Valid RSS 2.0  Valid Atom 0.3
Valid W3C XHTML 1.0  Valid W3C CSS