AppFuse Light converted to Maven modules, upgraded to Tapestry 5 and Stripes 1.5
This past week, I stayed up a couple of late nights to do some of the AppFuse Light work I wrote about in October. I converted all web frameworks to Maven modules, as well as made them inherit from the appfuse-web project. Below is what the new module structure looks like:
At this point, the project is ready to import into AppFuse's SVN project. Here's a list of other changes I made:
- Modules now depend on AppFuse's backend and allow you to use Hibernate, JPA or iBATIS as the persistence framework. Implementations for Spring JDBC, OJB and JDO have been removed.
- Ajaxified Body integrated into all frameworks. You can easily turn it off by modifying the global.js file.
- Prototype and Scriptaculous loaded from Google's Ajax Libraries CDN.
- Upgraded to Tapestry 5. Mad props to Serge Eby and his tapestry5-appfuse project for showing me how to do this. Serge became a committer on AppFuse recently, so hopefully we'll continue to see great things from the Tapestry 5 support. I really like the clean URLs and minimum configuration required in Tapestry 5. It's testing framework is nice too, but I believe it could be improved.
- Upgraded to Stripes 1.5. This was easy and painless. I'm definitely a fan of Stripes and look forward to reading the Stripes book on my bookshelf.
- Dropped support for: Struts 1.x, WebWork, Spring MVC + Velocity.
If you want to try any of these applications, you can create archetypes using the following commands:
svn co https://appfuse-light.dev.java.net/svn/appfuse-light/trunk appfuse-light cd appfuse-light/preferred-web-framework mvn archetype:create-from-project cd target/generated-sources/archetype mvn install cd ~/dev mvn archetype:generate # The new archetype should show up as an option
Next steps include figuring out a way to flatten the inherited dependencies and plugins so archetype:create-from-project can create truly standalone projects. Please let me know if you have any questions.
Posted by Marc on December 21, 2008 at 10:49 AM MST #
Personally, I'm disappointed to see support for Spring JDBC being removed from the project. In the organisation where I work, ORMs such as Hibernate are prohibited, so Spring-JDBC is the best option available to me. The prohibition of Hibernate is not a decision I agree with, but one I have to live with. Nevertheless for projects that have a DB of only a few tables, an ORM is probably overkill, and given that JDBC could be considered the "lingua franca" of database connectivity, maybe it's worth reconsidering this decision?
Keep up the great work!
Posted by Donal on December 21, 2008 at 11:04 PM MST #
I tried to follow your instructions, but it seemed to require an svn login. That makes sense, given https in the url.
Posted by Paul Sundling on January 04, 2009 at 07:46 AM MST #
This blogpost goes over what I mean:
Especially given Spring 3 will deprecate the controller hierarchy, it might be interesting to try out the new style. The blogger did a really nice presentation at Spring One that explains it well. Too bad I haven't seen him post the presentation. I saw a copy from a coworker who went this year.
Posted by Paul Sundling on January 04, 2009 at 08:07 AM MST #
Appfuse lite was missing the codehaus repository, so it failed for me. Here is the working respository section from pom.xml. It will of course allready work for anyone who already have codehaus in their settings.xml:
BTW, I have a comprehensive presentation on Maven 2 at the LA Java User Group and I used Appfuse for the demo to show how you could start from nothing, get an archetype and go from there. :) Very good stuff, your efforts are appreciated.
Posted by Paul Sundling on January 04, 2009 at 10:35 AM MST #
@Donal - the good news is you can still use Spring JDBC. The dependency is in the classpath. The reason I dropped Spring JDBC is because AppFuse Light now uses AppFuse's backend (which doesn't have a JDBC implementation).
@Paul - have you tried FreeMarker? The reason I removed Velocity is because FreeMarker seems like a better option with better error reporting and support for JSP tags. As far as the svn login, it's "guest" with a blank password.
AppFuse Light's Spring MVC + Annotations: I'm sure this can be improved. Patches most welcome. ;-)
Why did you need the Codehaus repository? Which dependencies aren't found in the central repo?
Thanks to everyone for the feedback!
Posted by Matt Raible on January 04, 2009 at 12:22 PM MST #
[INFO] Scanning for projects...
[ERROR] FATAL ERROR
[INFO] Failed to resolve artifact.
Reason: Unable to download the artifact from any repository
from the specified remote repositories:
Posted by Randy Jones on January 12, 2009 at 02:27 PM MST #
@Randy - I believe you might need to do this as a second step:
Hope this helps.
Posted by Matt Raible on January 12, 2009 at 02:33 PM MST #
Posted by Kieron Edwards on February 17, 2009 at 09:20 PM MST #