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 )
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
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
Have you looked at: http://zif.hill-street.net/jsonserver Jonathan - Original Message - From: Pascal Peregrina [EMAIL PROTECTED] To: zope@zope.org 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
--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
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
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
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
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
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 script and/or style tags into head before delivery to the client. The current implementation works in Zope 3. I have not experimented with Zope 2 on this, but it seems that with Zope 2's new WSGI-friendliness and Five, it is likely not too far from something usable in Zope 2. The Zope 3 implementation needs zope.paste and paste.deploy. The middleware app itself should work for anything WSGI. Code (Due credit: the Zope 3 infrastructure for this borrows heavily from zc.resourcelibrary) and instructions are at http://zif.hill-street.net/headincludes Development status: works for me. This is just a small piece of the AJAX puzzle for Zope, as I see it. -Jim Washington ___ 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 )