cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject RE: cvs commit: xml-cocoon/webapp/docs/samples/xsp cookie.xsp
Date Wed, 18 Apr 2001 16:24:44 GMT


On Wed, 18 Apr 2001, Colin Britton wrote:

> > > I think that removing this without showing how people are
> > meant to work
> > > is like chopping off someones legs.
> > Hm, nice comparison...
>
> I like it ;-)

C'one, if redirect are the legs of you app IMHO you've done
something wrong at the design phase, right ;)

> > The sitemap is the only place for the workflow of your
> > application, thus
> > redirects belong to the sitemap and not to the XML (XSP)
> > level. That is
> > only content - and a redirect is not content at all. So we
> > have here again
> > SoC: sitemap for workflow and the pipeline-processing for content.
>
> Oh don't get me wrong, I am all for it but we need to make it crystal
> clear to new C2 users how this stuff is meant to go together or else we
> will be answering a million emails on how to do old habits in this new
> technology.

I'm absolutely aware of the fact that C2 LACKS DOCS. But I'm sure as
soon as the pressure from going beta releases and more people use C2 we
hopefully see contributions of docs (not technical ones but User Guides)

>
> > > A good scenario to make clear the usage for xsp would be for a user
> > > login, lets say we have a form which checks a user name and
> > password in
> > > a database, this form is processed by an xsp (I know you
> > could do it in
> > > actions but a lot of people do this in XSP with C1). The
> > result is is
> > > the person is allowed in they get redirected to welcome.xsp
> > or if false
> > > get redirected to login_failed.xsp. You may have a better example in
> > > which case great.
> > >
> > No this example is absolutely perfect - we do exactly this many times,
> > and guess how: with Actions. XSP was the solution for C1 as
> > there weren't
> > any actions, now we have the better (?) solution: Actions.
> > So what you would do, is instead of creating an XSP page
> > which does the
> > evaluation of the form, you would simply write an action which does
> > the same, and then you could use the following sitemap fragment:
> >
> > <map:match pattern="test-page">
> > <map:act type="UserValidationAction"> <!-- returns a map if
> > the user is allowed -->
> >   <map:redirect-to uri="welcome.xsp"/>
> > </map:act>
> > <map:redirect-to uri="login_failed.xsp"/>
> > </map:match>
>
> OK so my example was best dealt with using an action - is there a
> UserValidationAction (not today) to show people...... how does the map
> object get passed back.... etc.... I know this may be obvious to people
> familliar with C2 but to newbies this stuff is going to fill our email
> box.

How about you writing some Guide lines on "how to use C2" :)

> We need to make this VERY clear. For a user writing
> <xsp-response:send-redirect location="http://foo.com"/> is simple,
> taking something that simple away and not having an equivelent method is
> a problem in my book.

We have an equivalent method in the sitemap!

> So as another example what if we want to redirect to a value that is
> returned from a database call... where the user wants to use esql
> (beacuse it is *simple*) to retirve the value from the database? how is
> that redirect passed back to the sitemap?

Never! It's a bad use case IMHO. Use an action to handle you DB-redirect
stuff with the help of the sitemap.

> I hope this thread is helping people think about the users, not
> developers, because at the end of the day we want more users than
> developers using this solution.

Thats for sure.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message