Hoople is similar in that only ant knows.  Both XDoclet and Hoople store
the mappings outside the struts-config.xml and merges them all in during
the build with ant.

The difference is in where the mappings are stored.  With XDoclet they
are stored as attributes on the Action classes, with Hoople they are
stored within the document root.  We've found the Hoople location works
better because it's easier to know what URLs are available on the
system.  You simply look at your document root and see (besides your
JSPs, images, CSSs, etc):
        /index.do
        /news/index.do
        /news/news.search.do
        /news/news.submit.do
and know exactly what URLs are available.  This is especially true for
teams that have non-programmers creating the JSPs etc. and don't know
know what an Action class is.

Although version 1.0 focuses mainly on managing config files for Struts
and Spring, there are many other attributes that are good candidates for
declaring in a central location.  An example that is included in version
1.0 is the ability to generate Google Sitemaps.  It is nice to be able
to simply go to /index.do and see:

<?xml version='1.0'?>

<!DOCTYPE url PUBLIC "-//SUNDOG//DTD HOOPLE//EN"
    "http://www.sundog.net/hoople/dtd/hoople_1_0.dtd";>

<url>    
    <search 
                searchable="true" 
                lastmod="file" 
                changefreq="monthly" 
                priority="0.7"/>
    <struts>
        <action
type="net.sundog.hoople.example.struts.action.NewsListAction">
            <forward name="success"/>
            <forward name="failure" path="failure.jsp"/>
        </action>
    </struts>
</url>

It brings all the information/configuration for a particular URL into
one place, rather than having it scattered around Action classes and
whatever generates your site maps.  

Additional attributes that we plan on implementing would let you include
documentation about what that URL does, additional declarative security,
pre/post conditions such as a "need to have a "newsItem on the request
object" post condition.

-----Original Message-----
From: Monkeyden [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 3:14 PM
To: Struts Users Mailing List
Subject: Re: [ANN] Hoople 1.0

> managing the action mappings in the struts-config.xml file
> can be a big headache, especially with multiple developers.

And how!  That's why I use XDoclet.  Only Ant knows.



On 6/27/06, Nathan Voxland <[EMAIL PROTECTED]> wrote:
>
> The Hoople team just released the 1.0 version of Hoople.  We've been
> using Struts for a number of years and have found that managing the
> action mappings in the struts-config.xml file can be a big headache,
> especially with multiple developers.
>
>
>
> Hoople has worked well for us by allowing us to configure the action
> mappings in separate XML config files that are stored where the URL
> would be on the filesystem if Struts wasn't there.  There are also
> several other features that make working with the action mappings
> easier, like being able to use relative paths and assuming that
forwards
> have a path that is the same as the request URL but with a .jsp
> extension if the path is not specified.
>
>
>
> There is a lot more to Hoople beyond managing your struts config file
as
> well.  It's similar in theory to XDoclet and other attribute-oriented
> programming techniques.  Take a look:
> http://www.sundog.net/index.php/hoople/page/struts/
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to