You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Manish Singla <Ma...@Sun.COM> on 2003/09/19 04:51:59 UTC
Multiple modules
What are the advantages of having multiple struts-config modules defined in
web.xml vs comma separated struts-config.xml from design point of view.
I am ok with slight overhead of multiple struts-config file (in web.xml
approach).
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Multiple modules
Posted by Manish Singla <Ma...@Sun.COM>.
> What are the advantages of having multiple struts-config modules defined in
> web.xml vs comma separated struts-config.xml from design point of view.
>
> I am ok with slight overhead of multiple struts-config file (in web.xml
> approach).
>
Again, what design problem multiple struts-config problem is solving.
(Scalability and Separation of Concerns can be solved by comma separated
struts-config.xml)
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Multiple modules
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 18 Sep 2003, Manish Singla wrote:
> Date: Thu, 18 Sep 2003 20:51:59 -0600
> From: Manish Singla <Ma...@Sun.COM>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Multiple modules
>
> What are the advantages of having multiple struts-config modules defined in
> web.xml vs comma separated struts-config.xml from design point of view.
>
In my opinion, the largest single difference between the approaches is
really "namespace collisions". Consider what happens if two different
struts-config.xml files (developed by two independent teams of developers
working on portions of your overall application) both try to define an
<action> named "/foo", or a global <forward> named "success":
* If you are using a single module (one config file or
multiple config files isn't relevant -- internally they
are all combined into a single set of config entries), the last
definition wins -- so someone's code doesn't work correctly
unless the identifier is changed.
* If you are using multiple modules, each module has its own
namespace for actions, forwards, and so on -- so the fact that
they share the same identifier doesn't matter.
So, multiple modules gives you some protection against this problem, at
the (slight) cost that it's a little funky to switch between modules.
> I am ok with slight overhead of multiple struts-config file (in web.xml
> approach).
>
I agree that any overhead difference here wouldn't matter (it all happens
only once, before the first user request is processed). However, because
modules are going to need separate config files anyway, any difference
here is vanishingly small.
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org