on 5/13/2000 9:08 PM, dave bryson <[EMAIL PROTECTED]> wrote:

> I've started some work on an extension of the GenerateMapBuilderTask
> to build not only the MapBuilder classes but also the Peers and
> Business classes.
> 
> To make it as flexible as possible I've "tweaked" a standalone version
> of WebMacro to use templates for generating the classes.  Currently
> it uses 3 Webmacro templates:
> 
> - A license template to expand the license into every class.

Yea, that was a problem I didn't solve. :-)

> - A Peer template that contains all the fixed/duplicated code in a Peer
> class.

Great!

> - A Data Object template that contains all the fixed/duplicated code
> that you normally have in a class that extends BaseObject and
> talks to the Peer.  This class would include a method such as save().

Great!

> As an example, If you had a Table called "Project" in your SQL
> script, the Task would generate the following Java files:
> - ProjectMapBuilder.java ( just like Jon's current implementation)
> - ProjectPeer.java
> - ProjectDO.java
> 
> You could then extend ProjectDO and add any business specific methods.

Great!

> For example - public class Project extends ProjectDO
> 
> This way, if your schema changes, you can re-generate the Database files
> ( MapBuilders, Peers, and DOs) and not lose that business specific code
> you may have written in the Project class.
> Anyone have any thoughts on this part ?

You are right on.

> Hopefully, this will give us the flexibilty to change the
> templates without changing hard coded out.println() statements, and
> reduce a good chunk of work generating all the Database code.

Ahahahah...what a great way to use this technology!

> I'm about a 1/4 of the way into this now.  But, I wanted to ping the
> group and see if there's anything that I may be missing.

+1

-jon

-- 
    Java Servlet Based - Open Source  |        Collab.Net
        Bug/Issue Tracking System     |   now hiring smart people
       <http://scarab.tigris.org/>    |  <http://Collab.Net/jobs/>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to