Chris Nokleberg wrote:
If the URL hierarchy reflects the structure of the application(*),
Which it IMHO shouldn't.

I
think many cross-cutting aspects such as persistence and security will
be very cleanly expressed as URL patterns.
It may "kind of" work for those, but then there's the transactional aspect for example. Would you introduce a /tx part in the URL? And again, what if you first have a non-tx page and then decide to make it transactional, what happens then? "oh sorry, all bookmarks to this page broke because we decided to make it transactional". And how about if there are two apps on one page? What do you do then?

Nah. It's just a bad idea.

While we're on the subject of URL design, it is also bad to have every
action end in ".do" or whatever. This is an artificial requirement
imposed by the framework (and the sucky servlet 2.2 spec). At least a
Filter-based controller should be provided as an alternative to the
current Servlet one; this would allow servlet 2.3-compatible container
users to map actions to any URL.
I agree that using .action URL's as the top-level URL is a bad idea. It works quite ok for includes though, since it's hidden from the user.

And yes, a filter-based controller might be the right way to go in some cases, although only for read-only pages. E.g. if you have an action which can result in two different pages you need to refer to the ".action" URL which then can result in one of several pages to be included as the actuL HTML response.

/Rickard



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to