cocoon-dev mailing list archives

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


On Wed, 18 Apr 2001, Carsten Ziegeler wrote:

> > 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 ;-)
> >
> > > 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.
> >
> Ok, than we should perhaps start a "migration from c1" document.
>
> > > > 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.
> >
> Yes, you are right - I think most of this can be solved by more documentation
> and perhaps examples.
>
> > 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.
> >
> > 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?
> >
> Yes, indeed this is the biggest problem. I think the Script Action (suggested
> by Jason) could solve this in a very comfortable way.
> The only solution right now is to write a custom Action just for this purpose
> (which might get some configuration, like database connection etc.).
>
> > 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.
> >
> Absolutely right. What is missing are more components for users to build
> easier web applications. So we can use threads like these to see what is
> missing in the documentation (a lot right now...) and which components are
> useful. I think the user create the demand for these components and we
> can try to solve it.

C1 was *never* meant to be usefull in the web app arena and people doing
that are abusing it, point. If you like to use C2 as a "publishing
framework" only as C1 was meant you will not likely have the problem you
trying to make us belive they are.

Giacomo (grin)


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


Mime
View raw message