You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Van Riper, Mike" <mv...@verisign.com> on 2003/08/13 20:02:04 UTC

RE: using modules versus simply using multiple struts-config file s

> -----Original Message-----
> From: Van Riper, Mike 
> Sent: Tuesday, August 12, 2003 5:55 PM
> To: List Struts-User (E-mail)
> Subject: using modules versus simply using multiple 
> struts-config files
> 
> 
> I did search the archives and there is information about 
> using multiple
> config files and separately about using full-blown modules 
> too. There may
> have been a comparison of the two approaches somewhere in the 
> archives too,
> but, I was not able to find it. Thus, my reason for posting 
> this to the
> group.
> 
> I'm setting up the webapp infrastructure for a new project. 
> This is the
> first opportunity I have to use the new module support in 
> Struts 1.1. As I
> am investigating it, it seems like the new capability to 
> specify multiple
> struts-config files in your default module configuration in 
> the web.xml file
> gets you most of the modularity advantages that multiple 
> modules provide.
> 
> Sure, you do get to leave the module leading subdirectory out 
> of your action
> mapping definitions when you define separate modules in 
> web.xml for each
> struts-config file. Other than that, I'm not seeing the 
> advantages of using
> full-blown modules when I could just setup separate 
> struts-config files for
> each logical module. On the flip side, you have to deal with properly
> switching between modules when you use modules. Also, every 
> request must go
> through an action mapping to use modules.
> 
> Right now, I'm leaning towards setting up separate 
> struts-config files for
> each logical module and simply specifying them as a comma 
> separated list in
> the default module configuration in my web.xml. This is a 
> relatively small
> webapp which can be logically partitioned in to about 5 
> areas. Also, there
> will be three of us working in parallel on a tight schedule. 
> So, it seems to
> me that I get the modularity benefits without the module 
> restrictions by
> simply setting up separate struts-config files.
> 
> Before going too far down this path, I was interested in any 
> feedback from
> others on the list about this approach. Am I missing 
> something about the
> differences between these two approaches?

I love talking to myself. ;-)

I know that setting it up with separate modules in web.xml can be made to
work, but, I've also seen recent postings about difficulties using tiles and
difficulties switching between modules by other module newbies. I'd rather
not have to deal with that myself let alone training the other Struts
newbies on my current tightly scheduled project. So, I guess I'll go ahead
with my current plan to use multiple struts-config files associated with one
entry in my web.xml file. The way I'll be setting it up makes it easy to
switch to true separate module definitions later on anyway. Each logical
module will already have its own subdirectory below the web root.

Based on other suggestions I've seen, I'll have a default struts-config file
for shared configuration of plug-ins (e.g., tiles), global forwards,
controller, etc... In addition, a separate struts-config file for each
logical module.

> 
> - Van
> 
> Mike Van Riper
> mailto:mike.vanriper@baychi.org
> http://www.baychi.org/bof/struts

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