Re: [Zope] AJAX and Zope
The one thing I have found about Ajax and Zope (Ajax and anything really) is that your returned scripts are typically so customized to your web page DOM and your application logic. So, as someone else posted, Zope handles everything in it's own separate objects anyway, so no need for a special server side processing system. This is just my limited experience though. I found it was just as easy to use Dojo Toolkit and my plain old DTML objects on Zope2 for my app server. You could just as easily use PT and Python scripts. Have a look at this site I did as a demo last fall. http://www.zajax.net I was first asking the same things you were. I wanted a library or some other way to handle the Ajax calls, but found it was so simple to just use Dojo and let it do asynchronous calls to Zope DTML objects. What I have is uber simple, but that's all I wanted. I can't remember if in that demo I returned javascripts or html, but I do know that with Dojo you can do either one. I built another small Ajax app later, and it does return javascripts. (very fast updates that way) On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. Then another thing would be something like a PythonScript object (so you define python code and return python structures) and get it rendered as javascript to be included in somepage for processing the data returned by an asynchronous XML-RPC call to Zope within the browser. Does it make more sense now? Pascal -Message d'origine- De: Lennart Regebro [mailto:[EMAIL PROTECTED] Envoyé: mercredi 24 mai 2006 14:56 Ŕ: Pascal Peregrina Cc: zope@zope.org Objet: Re: [Zope] AJAX and Zope On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: > I was wondering if there is any plan to have built-in support (i.e. > helpers, built-in Zope objects, etc) in order to support AJAX in Zope at > some point. The helpers would then be some sort of Ajax JS library. I think that at this time it makes more sense to let people choose for themselves. If one turns out to be better than the others, it will spread around the community and become a "default" standard, and then maybe it's interesting to include as a standard package, but thats a big maybe and a big if. I don't know what any built-in Zope-objects would do for Ajax. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Greg Fischer 1st Byte Solutions http://www.1stbyte.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
Lennart Regebro wrote: On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. That is a macro call. There is no difference. It just that the macro includes the HTML needed to suck in the JS library you use. I have been working on a simple WSGI middleware filter that handles js library insertion pretty well, without complicated macros that assure that a javascript library gets included only once. It works by creating a WSGI environ variable for desired includes. Individual widgets ask a utility to register their need for a particular javascript or css resource into that environ variable. After Zope is finished generating the page, the middleware inserts the appropriate
Re: [Zope] AJAX and Zope
On 5/24/06, Tarek Ziadé <[EMAIL PROTECTED]> wrote: You might want to look at Azax approach as well: besides the way it works (you define behaviors in XML files, that get processed by a js engine) it gathers Zope 3 help views, that let the developer define the behavior in Python I think the stuff lennart talks about is CrackAjax, but IIRC it is not really maintained and let you kinda write javascript in Python: the python code is not valid (can't be tested, etc..), but translated to valid javascript I was thinking loosely about both approaches, as I'm not fully up to date about the progress in these areas. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] AJAX and Zope
Well, that's why I mentioned this in my initial mail: http://jtauber.com/blog/2006/05/23/primitive_python_version_of_gwt_working (the python to javascript translator part) Of course I know how to make some AJAX to in Zope for some specific application. But I wanted to know if some of the core Zope developers had ever thought about a more generic approach. For example I am sure that having this "python to javascript translator" and objects like PythonScripts that would have a "javascript" view is something that would make AJAX enabled pages development on Zope much easier (just a matter of including the JS library and then make some python code). Pascal -Message d'origine- De : Lennart Regebro [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 mai 2006 15:27 À : Pascal Peregrina Cc : zope@zope.org Objet : Re: [Zope] AJAX and Zope On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: > By Zope objects I meant: > > You've got a page template for example, and you include such an "AJAX enabled > object", basically rendering an HTML fragment, and the resulting page will > include the page template code + the fragment (similar to a macro call), but > will also include the needed javascript code to handle the asynchronous > communication. That is a macro call. There is no difference. It just that the macro includes the HTML needed to suck in the JS library you use. > Then another thing would be something like a PythonScript object (so you > define python code and return python structures) and get it rendered as > javascript to be included in somepage for processing the data returned by an > asynchronous XML-RPC call to Zope within the browser. Thare has been discussions and efforts to make a library where you can write python code and get Ajax out, yes. It is very non-trivial. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
Lennart Regebro wrote: > On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: > >> By Zope objects I meant: >> >> You've got a page template for example, and you include such an "AJAX >> enabled object", basically rendering an HTML fragment, and the >> resulting page will include the page template code + the fragment >> (similar to a macro call), but will also include the needed >> javascript code to handle the asynchronous communication. > > > That is a macro call. There is no difference. It just that the macro > includes the HTML needed to suck in the JS library you use. > >> Then another thing would be something like a PythonScript object (so >> you define python code and return python structures) and get it >> rendered as javascript to be included in somepage for processing the >> data returned by an asynchronous XML-RPC call to Zope within the >> browser. > > > Thare has been discussions and efforts to make a library where you can > write python code and get Ajax out, yes. It is very non-trivial. :) You might want to look at Azax approach as well: besides the way it works (you define behaviors in XML files, that get processed by a js engine) it gathers Zope 3 help views, that let the developer define the behavior in Python I think the stuff lennart talks about is CrackAjax, but IIRC it is not really maintained and let you kinda write javascript in Python: the python code is not valid (can't be tested, etc..), but translated to valid javascript Tarek ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. That is a macro call. There is no difference. It just that the macro includes the HTML needed to suck in the JS library you use. Then another thing would be something like a PythonScript object (so you define python code and return python structures) and get it rendered as javascript to be included in somepage for processing the data returned by an asynchronous XML-RPC call to Zope within the browser. Thare has been discussions and efforts to make a library where you can write python code and get Ajax out, yes. It is very non-trivial. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] AJAX and Zope
--On 24. Mai 2006 14:18:34 +0100 Pascal Peregrina <[EMAIL PROTECTED]> wrote: By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. Then another thing would be something like a PythonScript object (so you define python code and return python structures) and get it rendered as javascript to be included in somepage for processing the data returned by an asynchronous XML-RPC call to Zope within the browser. You can do this already in Zope now in some way. Since AJAX requirements for an app are usually highly specific it does not make much sense to support a particular usecase. Zope is open and flexible enough to implement everything you need on top of it. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting pgpJNxaVvlMX4.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
Have you looked at: http://zif.hill-street.net/jsonserver Jonathan - Original Message - From: "Pascal Peregrina" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 24, 2006 9:18 AM Subject: RE: [Zope] AJAX and Zope By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. Then another thing would be something like a PythonScript object (so you define python code and return python structures) and get it rendered as javascript to be included in somepage for processing the data returned by an asynchronous XML-RPC call to Zope within the browser. Does it make more sense now? Pascal -Message d'origine- De : Lennart Regebro [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 mai 2006 14:56 À : Pascal Peregrina Cc : zope@zope.org Objet : Re: [Zope] AJAX and Zope On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: I was wondering if there is any plan to have built-in support (i.e. helpers, built-in Zope objects, etc) in order to support AJAX in Zope at some point. The helpers would then be some sort of Ajax JS library. I think that at this time it makes more sense to let people choose for themselves. If one turns out to be better than the others, it will spread around the community and become a "default" standard, and then maybe it's interesting to include as a standard package, but thats a big maybe and a big if. I don't know what any built-in Zope-objects would do for Ajax. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] AJAX and Zope
By Zope objects I meant: You've got a page template for example, and you include such an "AJAX enabled object", basically rendering an HTML fragment, and the resulting page will include the page template code + the fragment (similar to a macro call), but will also include the needed javascript code to handle the asynchronous communication. Then another thing would be something like a PythonScript object (so you define python code and return python structures) and get it rendered as javascript to be included in somepage for processing the data returned by an asynchronous XML-RPC call to Zope within the browser. Does it make more sense now? Pascal -Message d'origine- De : Lennart Regebro [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 mai 2006 14:56 À : Pascal Peregrina Cc : zope@zope.org Objet : Re: [Zope] AJAX and Zope On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: > I was wondering if there is any plan to have built-in support (i.e. > helpers, built-in Zope objects, etc) in order to support AJAX in Zope at > some point. The helpers would then be some sort of Ajax JS library. I think that at this time it makes more sense to let people choose for themselves. If one turns out to be better than the others, it will spread around the community and become a "default" standard, and then maybe it's interesting to include as a standard package, but thats a big maybe and a big if. I don't know what any built-in Zope-objects would do for Ajax. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
On 5/24/06, Pascal Peregrina <[EMAIL PROTECTED]> wrote: I was wondering if there is any plan to have built-in support (i.e. helpers, built-in Zope objects, etc) in order to support AJAX in Zope at some point. The helpers would then be some sort of Ajax JS library. I think that at this time it makes more sense to let people choose for themselves. If one turns out to be better than the others, it will spread around the community and become a "default" standard, and then maybe it's interesting to include as a standard package, but thats a big maybe and a big if. I don't know what any built-in Zope-objects would do for Ajax. :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX and Zope
--On 24. Mai 2006 13:43:27 +0100 Pascal Peregrina <[EMAIL PROTECTED]> wrote: Hi, I was wondering if there is any plan to have built-in support (i.e. helpers, built-in Zope objects, etc) in order to support AJAX in Zope at some point. Zope is already XML-RPC compliant, so it should not be very difficult to do so... I don't know why and where Zope itself as application server should support AJAX? AJAX support makes sense on a higher application level like schema (Archetypes, Z3 schemas etc.). Zope provides enough infrastructure to build anything to deal with Ajax in *some way* (what do you mean with "some point*?). But I doubt that Zope must deal with Ajax on the application server level. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting pgpDHkrq1L8j3.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] AJAX and Zope
Hi, I was wondering if there is any plan to have built-in support (i.e. helpers, built-in Zope objects, etc) in order to support AJAX in Zope at some point. Zope is already XML-RPC compliant, so it should not be very difficult to do so... Has anyone seen this? http://jtauber.com/blog/2006/05/23/primitive_python_version_of_gwt_worki ng Pascal ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ** ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )