You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2001/06/05 20:36:13 UTC

Why WebApp programming is harder than necessary with C2

There is one point in the webapp that makes WebApp developing
more difficult than necessary in Cocoon2.  This has to do with
redirects.  I was originally for not allowing redirects for
generators, transformers, and especially serializers.  However,
I always tried to advocate leaving that ability in Actions.
As a result, we have our Sitemap handle too many concerns.
NEVER should the sitemap handle WebApp LOGIC.  I don't mind
having it specify the Actions to use, or even rearrange their
order.  I do mind that I have to do some serious fenangling
with sitemap parameters and dynamic logic to embed program
logic in the sitemap.

I propose to allow the Environment object to be passed to
Actions in the objectModel.  That way, Actions can still do
redirects--easing program development.  This also simplifies
the site administrators duties in that they no longer have
to know the gory details of how the program logic works.
All the time, it also removes the ability for the other
sitemap components to perform redirects.

The current programming model is too restrictive--and I have
to do true HACKS to get around it.  I have a program to
release to a customer soon, and it would really simplify my
life if I can handle site security and redirects conveniently
in Actions.

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


Re: Why WebApp programming is harder than necessary with C2

Posted by giacomo <gi...@apache.org>.
On Tue, 5 Jun 2001, Berin Loritsch wrote:

>
>
> Davanum Srinivas wrote:
> >
> > Giacomo,
> > Please check if what i checked in is ok.
> >
> > Berin,
> > Please let me know if this works for you.
>
> It looks good so far.  I am home with a sick
> daughter, so I will test it in the office
> tomorrow.  Don't let that stop the release,
> though.  We can fine-tune the results post
> release if there are any bugs.
>
> BTW, if we have 2.0 Beta 1 release, what is
> in the 2.1 release?

Maybe your recent RT :)

Giacomo

>
> >
> > Thanks,
> > dims
> >
> > --- giacomo <gi...@apache.org> wrote:
> > > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> > >
> > > > There is one point in the webapp that makes WebApp developing
> > > > more difficult than necessary in Cocoon2.  This has to do with
> > > > redirects.  I was originally for not allowing redirects for
> > > > generators, transformers, and especially serializers.  However,
> > > > I always tried to advocate leaving that ability in Actions.
> > > > As a result, we have our Sitemap handle too many concerns.
> > > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > > having it specify the Actions to use, or even rearrange their
> > > > order.  I do mind that I have to do some serious fenangling
> > > > with sitemap parameters and dynamic logic to embed program
> > > > logic in the sitemap.
> > > >
> > > > I propose to allow the Environment object to be passed to
> > > > Actions in the objectModel.  That way, Actions can still do
> > > > redirects--easing program development.  This also simplifies
> > > > the site administrators duties in that they no longer have
> > > > to know the gory details of how the program logic works.
> > > > All the time, it also removes the ability for the other
> > > > sitemap components to perform redirects.
> > > >
> > > > The current programming model is too restrictive--and I have
> > > > to do true HACKS to get around it.  I have a program to
> > > > release to a customer soon, and it would really simplify my
> > > > life if I can handle site security and redirects conveniently
> > > > in Actions.
> > >
> > > I knew it will come sooner or later. Maybe we should have a Redirector
> > > interface that a concrete Environment should implement to enable an
> > > Action to do redirects only (I don't see the other methods of
> > > the Environment interface be relevant to an Action).
> > >
> > > As this is a change of an Interface (Action) this should be
> > > implemented VERY SOON as Carsten will do the dists tomorrow.
> > >
> > > Giacomo
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> >
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail - only $35
> > a year!  http://personal.mail.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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


Re: Why WebApp programming is harder than necessary with C2

Posted by Berin Loritsch <bl...@apache.org>.

Davanum Srinivas wrote:
> 
> Giacomo,
> Please check if what i checked in is ok.
> 
> Berin,
> Please let me know if this works for you.

It looks good so far.  I am home with a sick
daughter, so I will test it in the office
tomorrow.  Don't let that stop the release,
though.  We can fine-tune the results post
release if there are any bugs.

BTW, if we have 2.0 Beta 1 release, what is
in the 2.1 release?

> 
> Thanks,
> dims
> 
> --- giacomo <gi...@apache.org> wrote:
> > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> >
> > > There is one point in the webapp that makes WebApp developing
> > > more difficult than necessary in Cocoon2.  This has to do with
> > > redirects.  I was originally for not allowing redirects for
> > > generators, transformers, and especially serializers.  However,
> > > I always tried to advocate leaving that ability in Actions.
> > > As a result, we have our Sitemap handle too many concerns.
> > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > having it specify the Actions to use, or even rearrange their
> > > order.  I do mind that I have to do some serious fenangling
> > > with sitemap parameters and dynamic logic to embed program
> > > logic in the sitemap.
> > >
> > > I propose to allow the Environment object to be passed to
> > > Actions in the objectModel.  That way, Actions can still do
> > > redirects--easing program development.  This also simplifies
> > > the site administrators duties in that they no longer have
> > > to know the gory details of how the program logic works.
> > > All the time, it also removes the ability for the other
> > > sitemap components to perform redirects.
> > >
> > > The current programming model is too restrictive--and I have
> > > to do true HACKS to get around it.  I have a program to
> > > release to a customer soon, and it would really simplify my
> > > life if I can handle site security and redirects conveniently
> > > in Actions.
> >
> > I knew it will come sooner or later. Maybe we should have a Redirector
> > interface that a concrete Environment should implement to enable an
> > Action to do redirects only (I don't see the other methods of
> > the Environment interface be relevant to an Action).
> >
> > As this is a change of an Interface (Action) this should be
> > implemented VERY SOON as Carsten will do the dists tomorrow.
> >
> > Giacomo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

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


Re: AW: Why WebApp programming is harder than necessary with C2

Posted by Berin Loritsch <bl...@apache.org>.
> > The redirector implementation known by the sitemap:
> >
> >    public class SitemapRedirector implements Redirector {
> >      private boolean hasRedirected = false;
> >      private Environment e;
> >      public SitemapRedirector (Environment e) {
> >        this.e = e;
> >      }
> >      public void redirect (String url) {
> >        e.redirect(url);
> >        this.hasRedirected = true;
> >      }
> >      protected boolean hasRedirected () {
> >        return this.hasRedirected;
> >      }
> >    }

This is now implemented, and works great.  In combination with
not cacheing the session object, redirects work as expected.

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


AW: Why WebApp programming is harder than necessary with C2

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
>
> Quoting Carsten Ziegeler <cz...@sundn.de>:
>
> > > Giacomo Pati wrote:
> > >
> > > On Wed, 6 Jun 2001, Berin Loritsch wrote:
> > >
> > > > giacomo wrote:
> > > > >
> > > > > On Tue, 5 Jun 2001, Davanum Srinivas wrote:
> > > > >
> > > > > > Giacomo,
> > > > > > Please check if what i checked in is ok.
> > > > >
> > > > > After thinking again we'd better extend the Environment
> > > interface with a
> > > > > method called getRedirector() as replacement for the redirect()
> > method
> > > > > (similar to getOutputStream()) and let the sitemap engine pass
> > that
> > > > > object to the Actions and of course use that for the
> > implementation of
> > > > > the map:redirect element as well. It seams a clearer approach to
> > me so
> > > > > implementors of an Environment are free how to implement a
> > Redirector.
> > >
> > > And here comes another way to do it:
> > >
> > > Let the sitemap have its own Redirector implementation which proxies
> > the
> > > Environments redirect method. This way the Environment interface
> > doesn't
> > > have to be changed and the sitemap can track redirection to break out
> > of
> > > the evaluation loop as it does for <map:redirect uri=.../>
> > >
> > > What do you all think?
> > >
> > Yes, this might be the way to go. We don't have to change interfaces!
> >
> > The current implementation has the problem that the evaluation loop
> > is not exited even when a redirect takes place in an action.
>
> Yes, exactly. This is one of the reasons why only the sitemap
> needs to do the
> redirect. Else new Exception had to be created to report
> redirections to the
> sitemap to have a possibility to break out of the evaluation
> loop. The latest
> proposal takes care of this as the sitemap can interact redirect calls.
>
> > But I am not quite sure how the sitemap can "remember" the state for one
> > single request if it has done a redirect or not.
>
> The redirector implementation known by the sitemap:
>
>    public class SitemapRedirector implements Redirector {
>      private boolean hasRedirected = false;
>      private Environment e;
>      public SitemapRedirector (Environment e) {
>        this.e = e;
>      }
>      public void redirect (String url) {
>        e.redirect(url);
>        this.hasRedirected = true;
>      }
>      protected boolean hasRedirected () {
>        return this.hasRedirected;
>      }
>    }
>
> The generated sitemap engine can create a SitemapRedirector for a
> request and
> pass it to the Actions. Afterwards a call to the hasRedirected
> method will
> indicate if the sitemap engine can break out or not.
>
> > But anyway, the current implementation should be changed as now is
> > assumed that the Environment always implements the Redirector interface
> > which is not true for the command line interface...
>
> Yup. The approach mentioned above will fix it again I think.
>
Ah ok, I see. You create an extra object which gets the state.
Yes, this looks good to me.
So, a +1 for this change.


Carsten

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de
================================================================

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


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


Re: AW: Why WebApp programming is harder than necessary with C2

Posted by Giacomo Pati <gi...@apache.org>.
Quoting Carsten Ziegeler <cz...@sundn.de>:

> > Giacomo Pati wrote:
> >
> > On Wed, 6 Jun 2001, Berin Loritsch wrote:
> >
> > > giacomo wrote:
> > > >
> > > > On Tue, 5 Jun 2001, Davanum Srinivas wrote:
> > > >
> > > > > Giacomo,
> > > > > Please check if what i checked in is ok.
> > > >
> > > > After thinking again we'd better extend the Environment
> > interface with a
> > > > method called getRedirector() as replacement for the redirect()
> method
> > > > (similar to getOutputStream()) and let the sitemap engine pass
> that
> > > > object to the Actions and of course use that for the
> implementation of
> > > > the map:redirect element as well. It seams a clearer approach to
> me so
> > > > implementors of an Environment are free how to implement a
> Redirector.
> >
> > And here comes another way to do it:
> >
> > Let the sitemap have its own Redirector implementation which proxies
> the
> > Environments redirect method. This way the Environment interface
> doesn't
> > have to be changed and the sitemap can track redirection to break out
> of
> > the evaluation loop as it does for <map:redirect uri=.../>
> >
> > What do you all think?
> >
> Yes, this might be the way to go. We don't have to change interfaces!
> 
> The current implementation has the problem that the evaluation loop
> is not exited even when a redirect takes place in an action.

Yes, exactly. This is one of the reasons why only the sitemap needs to do the 
redirect. Else new Exception had to be created to report redirections to the 
sitemap to have a possibility to break out of the evaluation loop. The latest 
proposal takes care of this as the sitemap can interact redirect calls.

> But I am not quite sure how the sitemap can "remember" the state for one
> single request if it has done a redirect or not.

The redirector implementation known by the sitemap:

   public class SitemapRedirector implements Redirector {
     private boolean hasRedirected = false;
     private Environment e;
     public SitemapRedirector (Environment e) {
       this.e = e;
     }
     public void redirect (String url) {
       e.redirect(url);
       this.hasRedirected = true;
     }
     protected boolean hasRedirected () {
       return this.hasRedirected;
     }
   }

The generated sitemap engine can create a SitemapRedirector for a request and 
pass it to the Actions. Afterwards a call to the hasRedirected method will 
indicate if the sitemap engine can break out or not.

> But anyway, the current implementation should be changed as now is
> assumed that the Environment always implements the Redirector interface
> which is not true for the command line interface...

Yup. The approach mentioned above will fix it again I think.

Giacomo

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


AW: Why WebApp programming is harder than necessary with C2

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
>
> On Wed, 6 Jun 2001, Berin Loritsch wrote:
>
> > giacomo wrote:
> > >
> > > On Tue, 5 Jun 2001, Davanum Srinivas wrote:
> > >
> > > > Giacomo,
> > > > Please check if what i checked in is ok.
> > >
> > > After thinking again we'd better extend the Environment
> interface with a
> > > method called getRedirector() as replacement for the redirect() method
> > > (similar to getOutputStream()) and let the sitemap engine pass that
> > > object to the Actions and of course use that for the implementation of
> > > the map:redirect element as well. It seams a clearer approach to me so
> > > implementors of an Environment are free how to implement a Redirector.
>
> And here comes another way to do it:
>
> Let the sitemap have its own Redirector implementation which proxies the
> Environments redirect method. This way the Environment interface doesn't
> have to be changed and the sitemap can track redirection to break out of
> the evaluation loop as it does for <map:redirect uri=.../>
>
> What do you all think?
>
Yes, this might be the way to go. We don't have to change interfaces!

The current implementation has the problem that the evaluation loop
is not exited even when a redirect takes place in an action.

But I am not quite sure how the sitemap can "remember" the state for one
single request if it has done a redirect or not.

But anyway, the current implementation should be changed as now is
assumed that the Environment always implements the Redirector interface
which is not true for the command line interface...

Carsten

> Giacomo
>
> > >
> > > But anyway, thanks for the quick solution :)
> > >
> > > Giacomo
> > >
> > > >
> > > > Berin,
> > > > Please let me know if this works for you.
> > > >
> > > > Thanks,
> > > > dims
> > > >
> > > > --- giacomo <gi...@apache.org> wrote:
> > > > > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> > > > >
> > > > > > There is one point in the webapp that makes WebApp developing
> > > > > > more difficult than necessary in Cocoon2.  This has to do with
> > > > > > redirects.  I was originally for not allowing redirects for
> > > > > > generators, transformers, and especially serializers.  However,
> > > > > > I always tried to advocate leaving that ability in Actions.
> > > > > > As a result, we have our Sitemap handle too many concerns.
> > > > > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > > > > having it specify the Actions to use, or even rearrange their
> > > > > > order.  I do mind that I have to do some serious fenangling
> > > > > > with sitemap parameters and dynamic logic to embed program
> > > > > > logic in the sitemap.
> > > > > >
> > > > > > I propose to allow the Environment object to be passed to
> > > > > > Actions in the objectModel.  That way, Actions can still do
> > > > > > redirects--easing program development.  This also simplifies
> > > > > > the site administrators duties in that they no longer have
> > > > > > to know the gory details of how the program logic works.
> > > > > > All the time, it also removes the ability for the other
> > > > > > sitemap components to perform redirects.
> > > > > >
> > > > > > The current programming model is too restrictive--and I have
> > > > > > to do true HACKS to get around it.  I have a program to
> > > > > > release to a customer soon, and it would really simplify my
> > > > > > life if I can handle site security and redirects conveniently
> > > > > > in Actions.
> > > > >
> > > > > I knew it will come sooner or later. Maybe we should have
> a Redirector
> > > > > interface that a concrete Environment should implement to
> enable an
> > > > > Action to do redirects only (I don't see the other methods of
> > > > > the Environment interface be relevant to an Action).
> > > > >
> > > > > As this is a change of an Interface (Action) this should be
> > > > > implemented VERY SOON as Carsten will do the dists tomorrow.
> > > > >
> >
> > Technically we could do this, as no CLIENT programming uses the
> Environment.
> > That is the sole realm of the Processors (AKA Cocoon and Sitemap).
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


Re: Why WebApp programming is harder than necessary with C2

Posted by giacomo <gi...@apache.org>.
On Wed, 6 Jun 2001, Berin Loritsch wrote:

> giacomo wrote:
> >
> > On Tue, 5 Jun 2001, Davanum Srinivas wrote:
> >
> > > Giacomo,
> > > Please check if what i checked in is ok.
> >
> > After thinking again we'd better extend the Environment interface with a
> > method called getRedirector() as replacement for the redirect() method
> > (similar to getOutputStream()) and let the sitemap engine pass that
> > object to the Actions and of course use that for the implementation of
> > the map:redirect element as well. It seams a clearer approach to me so
> > implementors of an Environment are free how to implement a Redirector.

And here comes another way to do it:

Let the sitemap have its own Redirector implementation which proxies the
Environments redirect method. This way the Environment interface doesn't
have to be changed and the sitemap can track redirection to break out of
the evaluation loop as it does for <map:redirect uri=.../>

What do you all think?

Giacomo

> >
> > But anyway, thanks for the quick solution :)
> >
> > Giacomo
> >
> > >
> > > Berin,
> > > Please let me know if this works for you.
> > >
> > > Thanks,
> > > dims
> > >
> > > --- giacomo <gi...@apache.org> wrote:
> > > > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> > > >
> > > > > There is one point in the webapp that makes WebApp developing
> > > > > more difficult than necessary in Cocoon2.  This has to do with
> > > > > redirects.  I was originally for not allowing redirects for
> > > > > generators, transformers, and especially serializers.  However,
> > > > > I always tried to advocate leaving that ability in Actions.
> > > > > As a result, we have our Sitemap handle too many concerns.
> > > > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > > > having it specify the Actions to use, or even rearrange their
> > > > > order.  I do mind that I have to do some serious fenangling
> > > > > with sitemap parameters and dynamic logic to embed program
> > > > > logic in the sitemap.
> > > > >
> > > > > I propose to allow the Environment object to be passed to
> > > > > Actions in the objectModel.  That way, Actions can still do
> > > > > redirects--easing program development.  This also simplifies
> > > > > the site administrators duties in that they no longer have
> > > > > to know the gory details of how the program logic works.
> > > > > All the time, it also removes the ability for the other
> > > > > sitemap components to perform redirects.
> > > > >
> > > > > The current programming model is too restrictive--and I have
> > > > > to do true HACKS to get around it.  I have a program to
> > > > > release to a customer soon, and it would really simplify my
> > > > > life if I can handle site security and redirects conveniently
> > > > > in Actions.
> > > >
> > > > I knew it will come sooner or later. Maybe we should have a Redirector
> > > > interface that a concrete Environment should implement to enable an
> > > > Action to do redirects only (I don't see the other methods of
> > > > the Environment interface be relevant to an Action).
> > > >
> > > > As this is a change of an Interface (Action) this should be
> > > > implemented VERY SOON as Carsten will do the dists tomorrow.
> > > >
>
> Technically we could do this, as no CLIENT programming uses the Environment.
> That is the sole realm of the Processors (AKA Cocoon and Sitemap).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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


Re: Why WebApp programming is harder than necessary with C2

Posted by Berin Loritsch <bl...@apache.org>.
giacomo wrote:
> 
> On Tue, 5 Jun 2001, Davanum Srinivas wrote:
> 
> > Giacomo,
> > Please check if what i checked in is ok.
> 
> After thinking again we'd better extend the Environment interface with a
> method called getRedirector() as replacement for the redirect() method
> (similar to getOutputStream()) and let the sitemap engine pass that
> object to the Actions and of course use that for the implementation of
> the map:redirect element as well. It seams a clearer approach to me so
> implementors of an Environment are free how to implement a Redirector.
> 
> But anyway, thanks for the quick solution :)
> 
> Giacomo
> 
> >
> > Berin,
> > Please let me know if this works for you.
> >
> > Thanks,
> > dims
> >
> > --- giacomo <gi...@apache.org> wrote:
> > > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> > >
> > > > There is one point in the webapp that makes WebApp developing
> > > > more difficult than necessary in Cocoon2.  This has to do with
> > > > redirects.  I was originally for not allowing redirects for
> > > > generators, transformers, and especially serializers.  However,
> > > > I always tried to advocate leaving that ability in Actions.
> > > > As a result, we have our Sitemap handle too many concerns.
> > > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > > having it specify the Actions to use, or even rearrange their
> > > > order.  I do mind that I have to do some serious fenangling
> > > > with sitemap parameters and dynamic logic to embed program
> > > > logic in the sitemap.
> > > >
> > > > I propose to allow the Environment object to be passed to
> > > > Actions in the objectModel.  That way, Actions can still do
> > > > redirects--easing program development.  This also simplifies
> > > > the site administrators duties in that they no longer have
> > > > to know the gory details of how the program logic works.
> > > > All the time, it also removes the ability for the other
> > > > sitemap components to perform redirects.
> > > >
> > > > The current programming model is too restrictive--and I have
> > > > to do true HACKS to get around it.  I have a program to
> > > > release to a customer soon, and it would really simplify my
> > > > life if I can handle site security and redirects conveniently
> > > > in Actions.
> > >
> > > I knew it will come sooner or later. Maybe we should have a Redirector
> > > interface that a concrete Environment should implement to enable an
> > > Action to do redirects only (I don't see the other methods of
> > > the Environment interface be relevant to an Action).
> > >
> > > As this is a change of an Interface (Action) this should be
> > > implemented VERY SOON as Carsten will do the dists tomorrow.
> > >

Technically we could do this, as no CLIENT programming uses the Environment.
That is the sole realm of the Processors (AKA Cocoon and Sitemap).

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


Re: Why WebApp programming is harder than necessary with C2

Posted by giacomo <gi...@apache.org>.
On Tue, 5 Jun 2001, Davanum Srinivas wrote:

> Giacomo,
> Please check if what i checked in is ok.

After thinking again we'd better extend the Environment interface with a
method called getRedirector() as replacement for the redirect() method
(similar to getOutputStream()) and let the sitemap engine pass that
object to the Actions and of course use that for the implementation of
the map:redirect element as well. It seams a clearer approach to me so
implementors of an Environment are free how to implement a Redirector.

But anyway, thanks for the quick solution :)

Giacomo

>
> Berin,
> Please let me know if this works for you.
>
> Thanks,
> dims
>
> --- giacomo <gi...@apache.org> wrote:
> > On Tue, 5 Jun 2001, Berin Loritsch wrote:
> >
> > > There is one point in the webapp that makes WebApp developing
> > > more difficult than necessary in Cocoon2.  This has to do with
> > > redirects.  I was originally for not allowing redirects for
> > > generators, transformers, and especially serializers.  However,
> > > I always tried to advocate leaving that ability in Actions.
> > > As a result, we have our Sitemap handle too many concerns.
> > > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > > having it specify the Actions to use, or even rearrange their
> > > order.  I do mind that I have to do some serious fenangling
> > > with sitemap parameters and dynamic logic to embed program
> > > logic in the sitemap.
> > >
> > > I propose to allow the Environment object to be passed to
> > > Actions in the objectModel.  That way, Actions can still do
> > > redirects--easing program development.  This also simplifies
> > > the site administrators duties in that they no longer have
> > > to know the gory details of how the program logic works.
> > > All the time, it also removes the ability for the other
> > > sitemap components to perform redirects.
> > >
> > > The current programming model is too restrictive--and I have
> > > to do true HACKS to get around it.  I have a program to
> > > release to a customer soon, and it would really simplify my
> > > life if I can handle site security and redirects conveniently
> > > in Actions.
> >
> > I knew it will come sooner or later. Maybe we should have a Redirector
> > interface that a concrete Environment should implement to enable an
> > Action to do redirects only (I don't see the other methods of
> > the Environment interface be relevant to an Action).
> >
> > As this is a change of an Interface (Action) this should be
> > implemented VERY SOON as Carsten will do the dists tomorrow.
> >
> > Giacomo
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
>
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


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


Re: Why WebApp programming is harder than necessary with C2

Posted by Davanum Srinivas <di...@yahoo.com>.
Giacomo,
Please check if what i checked in is ok.

Berin,
Please let me know if this works for you.

Thanks,
dims

--- giacomo <gi...@apache.org> wrote:
> On Tue, 5 Jun 2001, Berin Loritsch wrote:
> 
> > There is one point in the webapp that makes WebApp developing
> > more difficult than necessary in Cocoon2.  This has to do with
> > redirects.  I was originally for not allowing redirects for
> > generators, transformers, and especially serializers.  However,
> > I always tried to advocate leaving that ability in Actions.
> > As a result, we have our Sitemap handle too many concerns.
> > NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> > having it specify the Actions to use, or even rearrange their
> > order.  I do mind that I have to do some serious fenangling
> > with sitemap parameters and dynamic logic to embed program
> > logic in the sitemap.
> >
> > I propose to allow the Environment object to be passed to
> > Actions in the objectModel.  That way, Actions can still do
> > redirects--easing program development.  This also simplifies
> > the site administrators duties in that they no longer have
> > to know the gory details of how the program logic works.
> > All the time, it also removes the ability for the other
> > sitemap components to perform redirects.
> >
> > The current programming model is too restrictive--and I have
> > to do true HACKS to get around it.  I have a program to
> > release to a customer soon, and it would really simplify my
> > life if I can handle site security and redirects conveniently
> > in Actions.
> 
> I knew it will come sooner or later. Maybe we should have a Redirector
> interface that a concrete Environment should implement to enable an
> Action to do redirects only (I don't see the other methods of
> the Environment interface be relevant to an Action).
> 
> As this is a change of an Interface (Action) this should be
> implemented VERY SOON as Carsten will do the dists tomorrow.
> 
> Giacomo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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


Re: Why WebApp programming is harder than necessary with C2

Posted by giacomo <gi...@apache.org>.
On Tue, 5 Jun 2001, Berin Loritsch wrote:

> There is one point in the webapp that makes WebApp developing
> more difficult than necessary in Cocoon2.  This has to do with
> redirects.  I was originally for not allowing redirects for
> generators, transformers, and especially serializers.  However,
> I always tried to advocate leaving that ability in Actions.
> As a result, we have our Sitemap handle too many concerns.
> NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> having it specify the Actions to use, or even rearrange their
> order.  I do mind that I have to do some serious fenangling
> with sitemap parameters and dynamic logic to embed program
> logic in the sitemap.
>
> I propose to allow the Environment object to be passed to
> Actions in the objectModel.  That way, Actions can still do
> redirects--easing program development.  This also simplifies
> the site administrators duties in that they no longer have
> to know the gory details of how the program logic works.
> All the time, it also removes the ability for the other
> sitemap components to perform redirects.
>
> The current programming model is too restrictive--and I have
> to do true HACKS to get around it.  I have a program to
> release to a customer soon, and it would really simplify my
> life if I can handle site security and redirects conveniently
> in Actions.

I knew it will come sooner or later. Maybe we should have a Redirector
interface that a concrete Environment should implement to enable an
Action to do redirects only (I don't see the other methods of
the Environment interface be relevant to an Action).

As this is a change of an Interface (Action) this should be
implemented VERY SOON as Carsten will do the dists tomorrow.

Giacomo


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


Re: Why WebApp programming is harder than necessary with C2

Posted by Martin Man <Ma...@seznam.cz>.
hiall,

+1 for redirects from actions but, from the SoC point of view, if the sitemap
is the only tool to manage URI space of the webapp, and you do direct redirect
from action you break this, e.g, allowing redirect from action you can break
the application from working because sitemap admin will not work with action's
source code.

the other way around, you have to be able to control redirects via runtime
parameters given to actions upon invocation and it is IMO the same as doing
sitemap-only redirects, 

we have to more think about previously proposed flowmap, I'll throw out RT
that I prepared for my final project soon...

rgds,
martin


On Tue, Jun 05, 2001 at 02:36:13PM -0400, Berin Loritsch wrote:
> There is one point in the webapp that makes WebApp developing
> more difficult than necessary in Cocoon2.  This has to do with
> redirects.  I was originally for not allowing redirects for
> generators, transformers, and especially serializers.  However,
> I always tried to advocate leaving that ability in Actions.
> As a result, we have our Sitemap handle too many concerns.
> NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> having it specify the Actions to use, or even rearrange their
> order.  I do mind that I have to do some serious fenangling
> with sitemap parameters and dynamic logic to embed program
> logic in the sitemap.
> 
> I propose to allow the Environment object to be passed to
> Actions in the objectModel.  That way, Actions can still do
> redirects--easing program development.  This also simplifies
> the site administrators duties in that they no longer have
> to know the gory details of how the program logic works.
> All the time, it also removes the ability for the other
> sitemap components to perform redirects.
> 
> The current programming model is too restrictive--and I have
> to do true HACKS to get around it.  I have a program to
> release to a customer soon, and it would really simplify my
> life if I can handle site security and redirects conveniently
> in Actions.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

-- 
-------------------------------------------------------------------------------
"Only dead fish swims with a stream"
gpg_key_available: http://globales.cz/~mman/martin.man.gpg
gpg_key_fingerprint: 2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223

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


Re: Why WebApp programming is harder than necessary with C2

Posted by Davanum Srinivas <di...@yahoo.com>.
Agreed. +1 from me.  

Thanks,
dims

--- Berin Loritsch <bl...@apache.org> wrote:
> There is one point in the webapp that makes WebApp developing
> more difficult than necessary in Cocoon2.  This has to do with
> redirects.  I was originally for not allowing redirects for
> generators, transformers, and especially serializers.  However,
> I always tried to advocate leaving that ability in Actions.
> As a result, we have our Sitemap handle too many concerns.
> NEVER should the sitemap handle WebApp LOGIC.  I don't mind
> having it specify the Actions to use, or even rearrange their
> order.  I do mind that I have to do some serious fenangling
> with sitemap parameters and dynamic logic to embed program
> logic in the sitemap.
> 
> I propose to allow the Environment object to be passed to
> Actions in the objectModel.  That way, Actions can still do
> redirects--easing program development.  This also simplifies
> the site administrators duties in that they no longer have
> to know the gory details of how the program logic works.
> All the time, it also removes the ability for the other
> sitemap components to perform redirects.
> 
> The current programming model is too restrictive--and I have
> to do true HACKS to get around it.  I have a program to
> release to a customer soon, and it would really simplify my
> life if I can handle site security and redirects conveniently
> in Actions.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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