You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Je...@nlgroup.ca on 2002/06/13 01:16:11 UTC

Struts Design/construction process. question


This is our *FIRST* Struts project and we are putting together a construction
plan.

I would like to find out how other projects divide the work between developers.
Our project management would like to see a developer pump out a list(s) of
disconnected components and have one person "connect" them together.

Our page layout is well in place, and I can create a list of form beans.
*note - we are not using dynabeans.

So... our HMTL guy can go ahead a create the 60 pages in one shot.
A junior developer can create 60 form beans....

If you are not using something like Junit, is it practical to design and create
many action classes ahead of time?

I have always assumed that the action classes would be completed at the same
time that the page is converted to jsp/struts.
I would have already created a generic template (that would compile and run ),
so it seems to me that the final code in the perform method
would be added while brining the page to life.

I would enjoy hearing other stories.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts Design/construction process. question

Posted by Ted Husted <hu...@apache.org>.
You might take a look at the Artimus example application. 

http://husted.com/struts/resources/artimus.zip

This doesn't use custom Actions classes for most operations, and the
ones I did use were mostly for show. There's a single framework Action
that calls a business operation, the same way the Struts ActionServlet
calls an Action. The difference is the business operation is not tied to
Struts or HTTP, and can be unit tested using conventional tools. These
business beans could be the "disconnected components" your project
manager wants people to pump out. 

Someone would then "connect the dots" in the Struts config by
associating URIs with the business operations.

I'd also recommend using a single coarse-grained ActionForm for all your
pages. Then subclass that for specific validations if needed. In a 1.0
team setting, this ActionForm can be maintained like the deployment
descriptor or struts-config (usually by a designated "guru"). In 1.1,
there can be a coarse-grained bean for each module, or you can switch
over to a Map-based ActionForm or a DynaBean.

The classes and architecture in Artimus is based on code developed for
the Adalon tool, which Synthis kindly donated back to the ASF.

http://synthis.com/

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Jeff_Mychasiw@nlgroup.ca wrote:
> 
> This is our *FIRST* Struts project and we are putting together a construction
> plan.
> 
> I would like to find out how other projects divide the work between developers.
> Our project management would like to see a developer pump out a list(s) of
> disconnected components and have one person "connect" them together.
> 
> Our page layout is well in place, and I can create a list of form beans.
> *note - we are not using dynabeans.
> 
> So... our HMTL guy can go ahead a create the 60 pages in one shot.
> A junior developer can create 60 form beans....
> 
> If you are not using something like Junit, is it practical to design and create
> many action classes ahead of time?
> 
> I have always assumed that the action classes would be completed at the same
> time that the page is converted to jsp/struts.
> I would have already created a generic template (that would compile and run ),
> so it seems to me that the final code in the perform method
> would be added while brining the page to life.
> 
> I would enjoy hearing other stories.
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Struts Design/construction process. question

Posted by Joseph Barefoot <jo...@hereuare.com>.
This reminds me of the adage a former professor of mine used to preach:
"It is much easier to build a program than to give birth to one."

The "pump out a list of components" and "while bringing the page to life"
parts of your message make it sound an awful lot like your project
management is involved in obstetrics in addition to software development. :)

Seriously, though, you *will* run into problems doing things this way.  For
instance, having a junior developer create 60 form beans for the expected
inputs on each page has several implications:

1.  Your action developers will have to modify the beans anyway most likely
because the form bean developer cannot know things like whether an array or
a List is more appropriate for collection data in a particular instance
(this usually depends on the Action).

2. A naming convention for the beans must be established or madness will
ensue.

3. It may make sense to re-use a form bean for different jsps, or nest form
beans depending on the implementation of the action classes.  The form bean
developer will not know the nature of this implementation ahead of time and
thus cannot make these decisions.

b.t.w., there are tools (or you can build your own) for generating basic
ActionForm beans, so this is not really an issue anyway.


> I have always assumed that the action classes would be completed
> at the same
> time that the page is converted to jsp/struts.

Add "ActionForm classes" to the above statement and you are entirely
correct.  We tend to view an Action, its ActionForm, and the presentation
logic (i.e., Struts tags) in their associated JSP(s) as an "action module"
of sorts, and a single developer is resonsible for these components.  Things
become very messy when you try to split the JSP, ActionForm, and Action work
to different developers, IMHO.


My $.02  ( more like $1.02?)


peace,

Joe Barefoot


> -----Original Message-----
> From: Jeff_Mychasiw@nlgroup.ca [mailto:Jeff_Mychasiw@nlgroup.ca]
> Sent: Wednesday, June 12, 2002 4:16 PM
> To: struts-user@jakarta.apache.org
> Subject: Struts Design/construction process. question
>
>
>
>
> This is our *FIRST* Struts project and we are putting together a
> construction
> plan.
>
> I would like to find out how other projects divide the work
> between developers.
> Our project management would like to see a developer pump out a list(s) of
> disconnected components and have one person "connect" them together.
>
> Our page layout is well in place, and I can create a list of form beans.
> *note - we are not using dynabeans.
>
> So... our HMTL guy can go ahead a create the 60 pages in one shot.
> A junior developer can create 60 form beans....
>
> If you are not using something like Junit, is it practical to
> design and create
> many action classes ahead of time?
>
> I have always assumed that the action classes would be completed
> at the same
> time that the page is converted to jsp/struts.
> I would have already created a generic template (that would
> compile and run ),
> so it seems to me that the final code in the perform method
> would be added while brining the page to life.
>
> I would enjoy hearing other stories.
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>