Geert,
    Thanks for the help.  As for the centralization, I don't need it
but having one element for all entry points related to a particular
object type made sense.  I guess my last RIFE app ended up basically
with three elements per type (Add, Remove, View) and I started to
question my approach.  I do believe I can take some of the common code
from these three things and put them into a base element or some sort
but I'll still have three elements with very little code in them
sometimes.  Thanks again.

Take care,

Jeremy

On 8/29/07, Geert Bevin <[EMAIL PROTECTED]> wrote:
>
> Hi Jeremy,
>
> Not difficult at all, just declare a bunch of pathinfo mappings for
> the same element and detect which one is used. However, I have to say
> that it's recommended to not centralize all this in one element for
> maintenance, clarity and re-use purposes. It's better to extract the
> common code in a base class or a helper class than to bloat one
> element implementation with if-else statements.
>
> HTH,
>
> Geert
>
> On 28 Aug 2007, at 22:09, Jeremy Whitlock wrote:
>
> >
> > Geert,
> >     Thanks for the quick response.  How difficult would it be to have
> > these point to the same element?  From an XML stand point it would be
> > simple but is that possible?  I want all urls matching "users/*" to go
> > to the same element but I want the pathinfo to be able to handle the
> > situations I mentioned above where 2/3 urls include the url but the
> > third one does not.
> >
> > Take care,
> >
> > Jeremy
> >
> > On 8/28/07, Geert Bevin <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi Jeremy,
> >>
> >> I forgot to point you to this page too:
> >>
> >> http://rifers.org/wiki/display/RIFE/Strict+pathinfo+mapping
> >>
> >> Tell me if that's sufficient or if you need more info.
> >>
> >> Take care,
> >>
> >> Geert
> >>
> >> On 28 Aug 2007, at 21:42, Jeremy Whitlock wrote:
> >>
> >>>
> >>> Hi All,
> >>>     I'm trying to simplify my RIFE application right now by using
> >>> PathInfo Mappings:
> >>>
> >>> http://rifers.org/wiki/display/RIFE/Pathinfo+mapping+for+element
> >>> +inputs
> >>>
> >>> The idea would be to have one single Element per
> >>> displayable/modifiable application object and then use REST-ful urls
> >>> to tell that Element what it needed to get the job done.  For
> >>> example,
> >>> if I had a User object that I wanted to manage, I might expect URLs
> >>> like these:
> >>>
> >>> # Standard appraoch HOST/element/action...
> >>>
> >>> HOST/users/view/1 (Would display User information for the User with
> >>> an id of 1)
> >>> HOST/users/add (Would POST the form parameters to create a User
> >>> object.)
> >>> HOST/users/delete/1 (Would delete the User with an id of 1)
> >>> .....
> >>>
> >>> Based on the URL linked to above, the PathInfo Mappings are very
> >>> simple when you have a finite set of inputs but when you have
> >>> variable
> >>> inputs, which I would have above, things tend to go toward the
> >>> undocumented part of RIFE.  Now...I know I could easily add the
> >>> id to
> >>> the add url above but that id is not known at form submission
> >>> time so
> >>> that really isn't a possibility.  Any insight as to how I could
> >>> accomplish this would be great.
> >>>
> >>> Take care,
> >>>
> >>> Jeremy
> >>>
> >>>>
> >>
> >> --
> >> Geert Bevin
> >> Terracotta - http://www.terracotta.org
> >> Uwyn "Use what you need" - http://uwyn.com
> >> RIFE Java application framework - http://rifers.org
> >> Music and words - http://gbevin.com
> >>
> >>
> >>>
> >>
> >
> > >
>
> --
> Geert Bevin
> Terracotta - http://www.terracotta.org
> Uwyn "Use what you need" - http://uwyn.com
> RIFE Java application framework - http://rifers.org
> Music and words - http://gbevin.com
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to