Prototype

I have been in process of moving from Taiwan back to California recently. I'm finally settled in for now. My partner and I finally had acquired some hours to work on the Stripes on Rails idea. The prototype includes features:

  • Maven2 Webtype Plugin
  • Maven2 Stripes-on-Rails Configuration Archetype
  • Corresponding Templates
  • Other quirks
    • Override default templates
    • Inherit configuration to make new configuration
    • Add webtype to existing projects

Webtype

We ended up calling the project Webtype (as oppose to archetype). A webtype is for now geared towards Java web-based applications. A webtype consists of an architecture configuration and corresponding templates. In the Stripes-on-Rails configuration, it includes dependencies such as Stripes, Spring, Hibernate, EJB3 Annotation, and supporting base classes such as BaseCRUDAction, BaseCRUDManager, BaseDAO to scaffold default CRUD behaviors. It would then use the templates to generate the CRUD features from a domain entity, including JSP pages, Spring configuration, Hibernate configuration, etc.

How to Use?

  1. webtype com.acme.example webapp # create a new webapp/ directory with a project structure
  2. generate Person # generate CRUD feature and configuration
  3. export derby # export database schema to Apache Derby database
  4. initdata derby # load initial data from xml into Apache Derby database
  5. run # execute the web server
  6. http://localhost:9090/webapp/Person.action # view the webapp!

The web server will check for class and JSP updates to hot deploy changes.

Play Nice with Existing Project

Webtype is a generic Maven2 plugin that looks for a webtype.xml descriptor either in the current project or in the classpath. Suppose there is an existing Maven2 project that needed quick code generation, one can easily add the descriptor and the corresponding templates to src/webtype/, that's all! It doesn't really care what architecture you have underneath, so long the generated code works for you.

About these ads

3 comments

  1. Sounds like a really interesting idea. Are you planning on making the prototype code available soon? I’d really like to take a look as I am in the process of putting together a Stripes and Hibernate app.

  2. Hi Ray, I am the editor from “Illustrated of Weapon and Tactics” magazine in Taipei, Taiwan, ROC! I am currently doing an article about John Alison, the famous American ace serving in China during World War II. As I learned, your grandfather, Tsang Tsi-Lan had once rescued Mr. Alison during their mission to attack the Japanese in Ichang, China on May 31st, 1943! For that mission, your grandpa earned Silver Star Medal from President Franklin D. Roosevelt! Your grandpa was a very interesting man in the history of the Chinese Air Force! He was the man who founded the Thunder Tiger Demonstration Team for the Air Force in Tainan!

    I am living in Irvine now as a student of UCI majoring in history, and I really want to meet up with you to discuss more about your grandpa! Here is my e-mail address:

    samuel1266@hotmail.com

    Thank you!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s