You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@apache.org> on 2005/10/17 13:05:32 UTC

Dependency between Ajax block and cforms block

I briefly looked at the Ajax and the cforms block and I think there are
two problems here:

a) cforms depends on ajax block (which is ok), so why is there a
"CForms: new Object()," in the cocoon-ajax.js? Shouldn't the ajax block
be independent of the cforms block?

b) If you're not using ajax (for example if you just upgrade your apps
to 2.1.8), you get a java script error ("Cocoon is not defined") if the
ajax js script can't be loaded by the browser - or if it is not included
in the page. Can we get rid of this js error? As I don't want to use
Ajax in my forms I don't want to have to download all those js just to
make the browser happy.

Carsten


-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Dependency between Ajax block and cforms block

Posted by Peter Hunsberger <pe...@gmail.com>.
On 10/18/05, Sylvain Wallez <sy...@apache.org> wrote:

<snip/>

>
> Yes! Basically, this is a "retro-factoring" of the JS library to the
> pre-Scriptaculous version.

I've been following your activities WRT to AJAX with some interest. 
We've got our own forms and screen management system that we are also
slowly migrating to have AJAX type capabilities.  After playing with
almost every one of the libraries and finding issues with each I'm
starting to wonder if perhaps Cocoon could not once more do this
"right".  In particular, why not exploit the server side capabilities
of Cocoon for generating only the client side scripting that is needed
instead of sending up monolithic client libraries that have tons of
conditional code in them?

This means, in essence, having separate libraries for each different
client (as needed), but if properly layered this doesn't become an
maintenance issue.  Abstractions are built on the client side to
encapsulate the client side specifics, just as the libraries do today.
Things like cForms only see the abstractions and still don't have to
be client specific. In fact, it might still be possible to use one the
 standard effects libraries if we pick the same low level
abstractions...

--
Peter Hunsberger

Re: Dependency between Ajax block and cforms block

Posted by Sylvain Wallez <sy...@apache.org>.
Bruno Dumon wrote:
> On Mon, 2005-10-17 at 14:01 +0200, Sylvain Wallez wrote:
>   
>> Carsten Ziegeler wrote:
>>     
>>> I briefly looked at the Ajax and the cforms block and I think there are
>>> two problems here:
>>>
>>> a) cforms depends on ajax block (which is ok), so why is there a
>>> "CForms: new Object()," in the cocoon-ajax.js? Shouldn't the ajax block
>>> be independent of the cforms block?
>>>
>>> b) If you're not using ajax (for example if you just upgrade your apps
>>> to 2.1.8), you get a java script error ("Cocoon is not defined") if the
>>> ajax js script can't be loaded by the browser - or if it is not included
>>> in the page. Can we get rid of this js error? As I don't want to use
>>> Ajax in my forms I don't want to have to download all those js just to
>>> make the browser happy.
>>>   
>>>       
>> I'm currently working on it as we found some problems with 
>> Scriptaculous. This afternoon or tomorrow I will commit changes that 
>> solve all this.
>>     
>
> But the appending of "-input" etc. to IDs will stay? Just asking because
> I'm soon going to start porting my app.
>   

Yes! Basically, this is a "retro-factoring" of the JS library to the 
pre-Scriptaculous version.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Re: Dependency between Ajax block and cforms block

Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2005-10-17 at 14:01 +0200, Sylvain Wallez wrote:
> Carsten Ziegeler wrote:
> > I briefly looked at the Ajax and the cforms block and I think there are
> > two problems here:
> >
> > a) cforms depends on ajax block (which is ok), so why is there a
> > "CForms: new Object()," in the cocoon-ajax.js? Shouldn't the ajax block
> > be independent of the cforms block?
> >
> > b) If you're not using ajax (for example if you just upgrade your apps
> > to 2.1.8), you get a java script error ("Cocoon is not defined") if the
> > ajax js script can't be loaded by the browser - or if it is not included
> > in the page. Can we get rid of this js error? As I don't want to use
> > Ajax in my forms I don't want to have to download all those js just to
> > make the browser happy.
> >   
> 
> I'm currently working on it as we found some problems with 
> Scriptaculous. This afternoon or tomorrow I will commit changes that 
> solve all this.

But the appending of "-input" etc. to IDs will stay? Just asking because
I'm soon going to start porting my app.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Re: Dependency between Ajax block and cforms block

Posted by Carsten Ziegeler <cz...@apache.org>.
Sylvain Wallez wrote:
> Carsten Ziegeler wrote:
> 
>>I briefly looked at the Ajax and the cforms block and I think there are
>>two problems here:
>>
>>a) cforms depends on ajax block (which is ok), so why is there a
>>"CForms: new Object()," in the cocoon-ajax.js? Shouldn't the ajax block
>>be independent of the cforms block?
>>
>>b) If you're not using ajax (for example if you just upgrade your apps
>>to 2.1.8), you get a java script error ("Cocoon is not defined") if the
>>ajax js script can't be loaded by the browser - or if it is not included
>>in the page. Can we get rid of this js error? As I don't want to use
>>Ajax in my forms I don't want to have to download all those js just to
>>make the browser happy.
>>  
> 
> 
> I'm currently working on it as we found some problems with 
> Scriptaculous. This afternoon or tomorrow I will commit changes that 
> solve all this.
> 
Great! Thanks, Sylvain!

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: Dependency between Ajax block and cforms block

Posted by Sylvain Wallez <sy...@apache.org>.
Carsten Ziegeler wrote:
> I briefly looked at the Ajax and the cforms block and I think there are
> two problems here:
>
> a) cforms depends on ajax block (which is ok), so why is there a
> "CForms: new Object()," in the cocoon-ajax.js? Shouldn't the ajax block
> be independent of the cforms block?
>
> b) If you're not using ajax (for example if you just upgrade your apps
> to 2.1.8), you get a java script error ("Cocoon is not defined") if the
> ajax js script can't be loaded by the browser - or if it is not included
> in the page. Can we get rid of this js error? As I don't want to use
> Ajax in my forms I don't want to have to download all those js just to
> make the browser happy.
>   

I'm currently working on it as we found some problems with 
Scriptaculous. This afternoon or tomorrow I will commit changes that 
solve all this.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director