Hi guys,


I actually use a mixture of both approaches.

Somehow, I like to reflect the Struts approach (MVC-ish) in the source code
organisation.
Basically, I have for example:
 com.mydomain.myapp.model.myfunctionality.* for model beans (DAO or EJB)
 com.mydomain.myapp.view.myfunctionality.* for ActionForm beans
 com.mydomain.myapp.controller.myfunctionality.* for the Action beans

Although, the fact that ActionForm is 'view' related or 'model' related can
be discussed.
In the struts docs they are considered 'model' items (cf. User Guide:
2.Building Model Components)... Although a small note in the document says
(I quote): "Note: ActionForm beans are actually closer to the View than the
Model"

As Gerbert said, there's always a factor of personal preference....
Nevertheless I would be interested to see if there is some kind of pattern
in the way that people organize their 'Struts' code.

Happy strutsing !

Patrick.


-----Original Message-----
From: Gerbert Nuijen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 13:43
To: [EMAIL PROTECTED]
Subject: RE: the directory structure of struts apps


Hi,
 
Well, personally I only make a functional and not a technical seperation of
packages, so I would put everything into one single package. It's usually
limited to about a maximum of 30 files (including ejb files etc.), I can
live with that. You never need to search for files.
 
I guess it's just a matter of personal taste.
 
Gerbert Nuijen.

-----Oorspronkelijk bericht-----
Van: Dave Van Even [mailto:[EMAIL PROTECTED]]
Verzonden: Tuesday, August 21, 2001 11:36 AM
Aan: [EMAIL PROTECTED]
Onderwerp: the directory structure of struts apps


hi,
 
i'm pretty new to struts and i have a question about the structure to put in
the various components that make up a struts application..
 
I'm currently putting it like this
 
 
com.business.section.view    <-- here i put ActionForm beans

com.business.section.model <-- here i put beans
com.business.section.controller <-- here i put Actions
 
is this a right way to think about it ? Are the ActionForms part of the view
??
 
what is your approach  on setting up the directory structure and package
names in a struts application ?
 
thanks!!
 
[EMAIL PROTECTED]
 


Reply via email to