struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <mark.l...@boxstuff.com>
Subject Re: generate struts ActionForm & strut's jsp from hibernate's mapping
Date Mon, 26 Apr 2004 07:13:07 GMT
I agree that generating web.xml and hibernate mapping classes helps but 
I'm not as convinced that generating struts resources would help that 
much.

generating web.xml is good as this makes deploying across different 
containers more organized and hibernate resources to keep all the 
mappings in with the java code. I can see how generating action 
mappings could help but forms I don't yet see how that would help that 
much. Although I'll give it a go and see.

That's my pov.

Mark

On 26 Apr 2004, at 05:09, David Friedman wrote:

> Dion,
>
> I took the time to get XDoclet up and running in the last month and 
> found it
> makes coding so much easier.  I access it though the Eclipse IDE by the
> JBossIDE plugIn.  I've found that having the various tags in my Java 
> classes
> was initially distracting but after a few days it started making sense 
> and
> made things a lot easier (for both Struts and Hibernate activities).  
> That's
> just my humble opinion.
>
> Regards,
> David
>
> -----Original Message-----
> From: Dionisius Purba [mailto:Dionisius.Purba@mitrais.com]
> Sent: Sunday, April 25, 2004 9:02 PM
> To: 'Struts Users Mailing List'
> Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
> mapping
>
>
> Richard, I must say that your code generation is a well-done one that
> it can even differentiate & generate selection popup..
> For my self, I'm not familiar yet with XDoclet, I guess it's good idea
> to learn it, since what you say is right, lots of the code get 
> generated are
> repetitive,
> IMHO..it's better to use other time for build a better design that do
> repetitive coding..
> Well..if you think it can be used for more general application and 
> intend to
> share it,
> I'll be more willing to try it on! Thanks for your suggestion.
>
> regards,
> dion
>
> -----Original Message-----
> From: Richard Mixon (qwest) [mailto:rnmixon@qwest.net]
> Sent: Saturday, April 24, 2004 1:54 AM
> To: Struts Users Mailing List
> Subject: RE: generate struts ActionForm & strut's jsp from hibernate's
> mapping
>
>
> Dion,
>
> This is possible to do using Xdoclet's templating language. I hacked 
> up a
> set of Xdoclet templates to create my form beans from the
> Hibernate Xdoclet markkup.
>
> For each entity object, it creates a JSP, form bean, action, manager 
> object
> (DAO) and the associated bits. Entity references have
> selection popups, and so on. It allowed us to get an application up and
> running very quickly. Granted working with a page/screen per
> entity object is not ideal and can be a little cumbersome when 
> configuring
> application entries - but it worked. We only had to
> create one custom screen for results entry and several to create the 
> charts
> our application produces. Since then we have slowly
> replace many of these basic forms with custom forms that update several
> related objects. But we still use the basic generated forms
> for rarely used configuration objects - it is just not worth the labor 
> to do
> a custom screen for them.
>
> BTW, I used Matt Raible's AppFuse application for inspiration and a 
> starting
> point, which also builds upon ideas Erik Hatcher's book
> Java Development with Ant.
>
> Now, the down side :)
>
> 1) I say "hacked" up, because the right way would have been to spend a
> little more time understanding Xdoclet and have written the
> correct Java support classes. Using just the template language, I have 
> much,
> much repetitious code.  My intention is to completely
> re-write the generation at some point in the future - but now sure 
> when. For
> now I've got a hacked up, working prototype that does
> what I need - but it would not work for others without a lot of work.
>
> 2) I made a lot of assumptions based on the limited set of data types 
> in my
> application and my application domain model. Its a very
> rich, multi-object domain with lots of inheritance - but I'm sure my
> assumptions do not apply to many, many situations - e.g. how I
> handle referenced collections, object selection, date choosers, etc.
>
> So, the point of my response is that this can be done, Xdoclet is a 
> very
> flexible tool. You'll get good results quickly, especially
> if you limit your scope and do not try to generate every possible 
> form, just
> the 80% that are really repetitive.
>
> I notice that some others have suggested other solutions - these may 
> be much
> closer to a ready-to-use solution. Good luck.
>
>  - Richard
>
> -----Original Message-----
> From: Dionisius Purba [mailto:Dionisius.Purba@mitrais.com]
> Sent: Thursday, April 22, 2004 10:21 PM
> To: 'Struts Users Mailing List'
> Subject: generate struts ActionForm & strut's jsp from hibernate's
> mapping
>
>
> Altough my question is related to hibernate, I hope it's still 
> relevant.
> Is anyone aware of tools, open source is better, that can generate
> ActionForm and the JSP's (containing struts's HTML Input tag)
> based on a hibernate's mapping (i.e. *.hmb.xml)?
>
> cheers,
> dion
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message