You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by wb...@Ensign-BickfordInd.com on 2002/06/21 16:33:36 UTC
UML? File organization?
I have been playing with UML and trying to find a good way to do the
upfront design of a struts based application. Has anyone done this
already and have any suggestions? I know the use-cases can pretty much
stay the same...
I am also putting together a document on the best way to go about
struturing your directories under struts... If anyone has any
suggestions I would love to hear it...
I already have stuff like JSPs under the WEB-INF and stuff. I am trying
to work out the best way to organize all the packages in the src
directory...
Should they be by purpose of the objects like (conventional theory)
com.ebind.hrdata.people;
com.ebind.hrdata.companies;
com.ebind.struts.create;
com.ebind.struts.search;
or more along the lines of struts:
com.ebind.peoplefinder.search;
com.ebind.peoplefinder.create;
We've got two small projects done wth struts and the next ones will be
more complex so I want to get the best practices down (I've printed and
read the husted site a few times already)
Any thoughts would be great - and I will drop the document out here when
its done
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
UML stereotypes for Struts (Re: UML? File organization?)
Posted by Joe Germuska <Jo...@Germuska.com>.
I think this is a great topic for discussion, but I haven't thought
too far about it. I would think the route would be simply to agree
on a few stereotypes, and perhaps some standard names for tagged
values.
Are you familiar with WebUML?
<http://www.conallen.com/whitepapers/webapps/ModelingWebApplications.htm >
It might be a useful reference/counterpart to defining UML for struts.
One of the future features we have in mind for StrutsBuilder would be
import from XMI, which you could export from most UML tools. I don't
know XMI syntax at all, but conceptually, it's not much different
from importing from a struts-config file. But we wouldn't want to do
that until there was a Struts community consensus on UML notation.
<http://sourceforge.net/projects/rivernorth/>
Joe
At 10:33 AM -0400 2002/06/21, wbchmura@Ensign-BickfordInd.com wrote:
>I have been playing with UML and trying to find a good way to do the
>upfront design of a struts based application. Has anyone done this
>already and have any suggestions? I know the use-cases can pretty much
>stay the same...
>
>I am also putting together a document on the best way to go about
>struturing your directories under struts... If anyone has any
>suggestions I would love to hear it...
>
>I already have stuff like JSPs under the WEB-INF and stuff. I am trying
>to work out the best way to organize all the packages in the src
>directory...
>
>Should they be by purpose of the objects like (conventional theory)
>
>com.ebind.hrdata.people;
>com.ebind.hrdata.companies;
>com.ebind.struts.create;
>com.ebind.struts.search;
>
>
>or more along the lines of struts:
>
>com.ebind.peoplefinder.search;
>com.ebind.peoplefinder.create;
>
>We've got two small projects done wth struts and the next ones will be
>more complex so I want to get the best practices down (I've printed and
>read the husted site a few times already)
>
>
>Any thoughts would be great - and I will drop the document out here when
>its done
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
--
* Joe Germuska { joe@germuska.com }
"It's pitiful, sometimes, if they've got it bad. Their eyes get
glazed, they go white, their hands tremble.... As I watch them I
often feel that a dope peddler is a gentleman compared with the man
who sells records."
--Sam Goody, 1956
tune in posse radio: <http://www.live365.com/stations/289268>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: UML? File organization?
Posted by Ted Husted <hu...@apache.org>.
Personaly, I find it most useful to organize everything along
conventional functional module or package lines. Things that are used
together should be packaged together.
At some point, these functional divisions might also made into actual
Struts modules and developed independantly. (This prospect should figure
highly in any organizational scheme.)
Within any application, there are tasks that are used together and tend
to form subsystems. Often, these tasks are handled by the same
developer(s) within a larger team, and also tie into the applications
life-cycle and overall organization. For example, an auction application
might have a registeration package, a searching package, a bidding
package, and a fulfillment package.
For the JSPs, I generally use a /pages folder off the root, and then
organize by package beneath that. Something like
/pages
./reg
./bid
./find
./buy
On the Java source side, there would be corresponding .reg, .bid, .find,
and .buy packages
Which I think might all fall under your Conventional Theory category.
I believe this is also the way the Struts source files are organized.
The Action classes are all kept together, since they all work together
to form the control layer. Other classes were dispatched to the util
package (and then off to the commons). The validator has it own pacakge,
as does tiles.
We tend to put suffixes like *Action and *Form on classes, but that
stems from the *Bean naming approach, rather than the package.
Also keep in mind that organizing files for Struts is not any different
than organizing them for any Model 2/MVC architecture.
BTW, whether putting pages under is WEB-INF is "best" or not may depend
on what container you are using. It is *not* always an option. It also
means that you might have to separate your JSPs from other assets that
need to be outside of WEB-INF, like HTML files, images, and stylesheets.
Like any strategy, this approach has consequences, both good and bad.
-- Ted Husted, Husted dot Com, Fairport NY US
-- Java Web Development with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services
wbchmura@Ensign-BickfordInd.com wrote:
>
> I have been playing with UML and trying to find a good way to do the
> upfront design of a struts based application. Has anyone done this
> already and have any suggestions? I know the use-cases can pretty much
> stay the same...
>
> I am also putting together a document on the best way to go about
> struturing your directories under struts... If anyone has any
> suggestions I would love to hear it...
>
> I already have stuff like JSPs under the WEB-INF and stuff. I am trying
> to work out the best way to organize all the packages in the src
> directory...
>
> Should they be by purpose of the objects like (conventional theory)
>
> com.ebind.hrdata.people;
> com.ebind.hrdata.companies;
> com.ebind.struts.create;
> com.ebind.struts.search;
>
> or more along the lines of struts:
>
> com.ebind.peoplefinder.search;
> com.ebind.peoplefinder.create;
>
> We've got two small projects done wth struts and the next ones will be
> more complex so I want to get the best practices down (I've printed and
> read the husted site a few times already)
>
> Any thoughts would be great - and I will drop the document out here when
> its done
>
> --
> 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>