So I have been reading and learning a lot the last couple days about this whole AJAX thing. I really think it is something I am going to move towards for web apps. However, I don't want to lose Zope. I wonder if any of you would be willing to comment on this? I quickly tested Ruby on Rails, given all it's hype lately. It's a nice setup, but I kept using it thinking, "I can do that in DTML quite easy." I just don't have the XMLHttpRequest going, or the Javascript client libraries that make the interface improvements. The tutorials I followed mentioned that you have this nice recipe app in a half hour. I thought again, "So, I can do that in a half hour in Zope." It's not the speed that appealing, it's the XMLHTTP requests without page reloads that is appealing. If I can just do this in Zope, wow! (There were some things in Rails that I liked, like the whole Model/Controller/View thing. But, really, we could implement that type of scenareo in Zope apps too, I would think.) I did it. (at a very simple/small level) Though it's not automated like in Rails, but it's not that hard. I used Prototype.js and Rico.js for the Ajax client libs. Then I simply setup a generic/non-css Rolodex page like the one for Rico http://openrico.org/rico/demos.page?demo=ricoAjaxInnerHTML.htmlFrom here, I made a simple DTML Method, getPersonInfo.xml. It had DTML to check for request objects passed in from the Rolodex ajax objects, and then send back the particular record. Pretty simple, but quite an eye opener for me. It really got me thinking. We need, for those of us who would like to pursue this development, a Zope/Ajax backend. There's a bunch of others for PHP, .NET, and whatever else. We need ZAjax! I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format. Maybe make it so, in my client script, I can call the python class with arguments of, zsql method name, zsql method args. Doing it this way would keep things database platform independent. (more so than Rails) Also, it would give you control of the SQL, and make our table space indiferent to the python or client engine. And, it would still keep it simple, or at least, not really any more complicated than doing zpt or dtml. IMHO. What do you guys think? One of the things that bugged me about Rails was the fact that you have to name your table primary keys "id". And you have to call them a plural name. (like contacts) And in the ruby code, you refer to your classes singularly. (contact) Plus, foreign keys had to be named, othertable_id. This whole thing really messed me up, and turned me off to it. Then, I found out that using stored procedures was shunned upon. LOL! Yeah right! I can totally see the arguments they have though, but to me it's a matter of preference. I like sprocs for certain things, whether or not I am using a whole new style of web programming. And, I love Zope. Can't do without it. So, after reading all that, I have on last thought. Is it really best to even use Zope in an AJAX-style application? Maybe it's best to use mod-python in Apache? And if I am doing that, then there's always DJango. Well, for me, I have a hunch, that at some point the ability to use your Ajax app with the existing ZODB (and all the other Zope niceties) will be huge benefit and a powerful platform. OMG, long email... I am going to spend a little more time practicing this new development and testing it. Probably I will move to script.aculo.us <http://script.aculo.us>for the extension to prototype.js because of the nice interface elements. However, I don't know how to build a Zope product yet. So, if there's nothing available in the next few months, I guess I'll start working on it. (IF I decide it really is best to stick with Zope, which I think it is.) BTW, I know about the Json thing too, but I prefer to stick with same methods and objects already used, like prototype. (used by Rails) Is there an sql to xml product for zope that would do this already? Thanks for listening... and I'll have more to say. Greg -- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC. - C
Oh, that's cool! The naming "RPC" threw me off. I knew that was there, but I guess my assumptions (I know , bad) were that it communicated over a different protocol, not using port 80. But, I suppose, tcp over port 80, spewing out xml is good. Probably just what I need. I'll look into that and get a better understanding. Thanks Chris. Greg On 10/8/05, Chris McDonough <chrism@plope.com> wrote:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
- C
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
Greg Fischer wrote:
Oh, that's cool! The naming "RPC" threw me off. I knew that was there, but I guess my assumptions (I know , bad) were that it communicated over a different protocol, not using port 80. But, I suppose, tcp over port 80, spewing out xml is good. Probably just what I need. I'll look into that and get a better understanding. Thanks Chris.
Hi, you can also study Epoz (=>EpozPostTidy-call), which calls a server-side Tidy-function via vcXMLRPC from the JavaScript-Wyswyig-Editor-Area. Epoz uses a fixed version of vcXMLRPC (it was damn hard to debug this issue, believe me), the original vcXMLRPC has a bug regarding long requests which shows only up in Moz/Firefox. Cheers, Maik
Sat, 08 Oct 2005 11:21:07 -0700 keltezéssel Greg Fischer azt írta:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
or you might also want to have a look at jsonserver2, which is an out-of-the box solution for asynchronous communication between zope and the javascript client. It uses JSON-RPC which is in usage similar to xml-rpc. Basically you map the zope object that produces the dynamic data via url to a javascript method. This method is then called synchronously or used asynchronously via a callback. Whatever the zope object returns, should it be a html snippet rendered out by zpt, or raw data (all python builtin data types and lists, dicts etc) becomes the return value of the remote method. http://www.zope.org/Members/ree/jsonserver2 How you inject the received into your page or manipulate this data afterwards is out of the scope of JSON: you can use your well known libraries for this, or you can use some other functionality of the included JSOLAIT library: it is your choice. Point is, at this point you don't need to parse the received data from XML or whatever: it arrives in a native javascript structure. (Of course you can also generate XML with say, ZPT on the server side, and transfer it as a string, would that be your purpose, but that's usually out of point in this case.) In the above link there are also some simple examples included for your experimentation right away. -- Bala'zs REE' jabber + email: ree@ree.hu ICQ: 75955071 AIM + skype: reebalazs
2005/10/8, Chris McDonough <chrism@plope.com>:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
Personally I recommend tw-sack from http://smurl.name/wg5 It's implemented in many of the AJAX features of the IssueTrackerProduct (http://smurl.name/8k) which cangive you zope code to show how to use ajax in zope.
- C
_______________________________________________ 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 )
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
Chris McDonough wrote:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope. Michael -- http://zope.org/Members/d2m http://planetzope.org
Thank you everyone! I really appreciate all the input. It's amazing what you find by doing a little more thorough searching... here's more of what I am looking for: http://timmorgan.org/wiki/ReactFrameworkForZope Tim Morgan has put together what I would call Zajax from the looks of it. I am going to start playing around with it, and see how it fits my needs. On a side note, I have put together a quick 'n' dirty blog about the things I am finding, particularly for XMLHTTP, not JSON or XML-RPC. www.zajax.net<http://www.zajax.net>- (I liked the name so much, I had to register the domain! :) On 10/9/05, Michael Haubenwallner <michael@d2m.at> wrote:
Chris McDonough wrote:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope.
Michael
-- http://zope.org/Members/d2m http://planetzope.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 )
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
Ok, after further investigation, Tim Morgan's React is not exactly what I am looking for. That said, his work is outstanding, and I think it's awesome! It's like Ruby On Rails implemented (better IMHO) in Zope! Very cool! However, I think what I want to work with is just a Zope product without the MVC stuff. Thanks again everyone! Greg On 10/9/05, Greg Fischer <retheoff@gmail.com> wrote:
Thank you everyone! I really appreciate all the input. It's amazing what you find by doing a little more thorough searching... here's more of what I am looking for: http://timmorgan.org/wiki/ReactFrameworkForZope
Tim Morgan has put together what I would call Zajax from the looks of it. I am going to start playing around with it, and see how it fits my needs.
On a side note, I have put together a quick 'n' dirty blog about the things I am finding, particularly for XMLHTTP, not JSON or XML-RPC. www.zajax.net <http://www.zajax.net> - (I liked the name so much, I had to register the domain! :)
On 10/9/05, Michael Haubenwallner <michael@d2m.at> wrote:
Chris McDonough wrote:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply receives a request from the client and spits out xml. To be more specific, a set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC
client, the best in my recollection being vcXMLRPC.
http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope.
Michael
-- http://zope.org/Members/d2m http://planetzope.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 )
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
On 10/10/05, Greg Fischer <retheoff@gmail.com> wrote:
Ok, after further investigation, Tim Morgan's React is not exactly what I am looking for. That said, his work is outstanding, and I think it's awesome! It's like Ruby On Rails implemented (better IMHO) in Zope! Very cool!
However, I think what I want to work with is just a Zope product without the MVC stuff.
here's how i look at it we have zope (dtml/script/zsql-method) that do specific calls that spits out results via xmlrpc. on the browser side, we have all these ajax libs - openrico, dojo, mochikits, azax, DataRequestor, jsolait, tim morgan's mini, etc we just need to connect the dots. the ajax lib + our java functions/etc will call dtml/script/sql-method via xmlrpc(builtin) or jasonrpc(with the jsonrpc product) and page will be updated inline(?) not much voodo involved. everything is there already. a simple demo is at http://myzope.kedai.com.my/blogs/kedai/demo/; a script python that just spits out DateTime().pCommon(), and the other, a script python tah calls html file randomly. replace that with anythin we want. zope rox! but i guess we all know that Thanks again everyone!
Greg
On 10/9/05, Greg Fischer <retheoff@gmail.com> wrote:
Thank you everyone! I really appreciate all the input. It's amazing what you find by doing a little more thorough searching... here's more of what I am looking for: http://timmorgan.org/wiki/ReactFrameworkForZope
Tim Morgan has put together what I would call Zajax from the looks of it. I am going to start playing around with it, and see how it fits my needs.
On a side note, I have put together a quick 'n' dirty blog about the things I am finding, particularly for XMLHTTP, not JSON or XML-RPC. www.zajax.net <http://www.zajax.net> - (I liked the name so much, I had to register the domain! :)
On 10/9/05, Michael Haubenwallner < michael@d2m.at> wrote:
Chris McDonough wrote:
On Oct 8, 2005, at 6:54 AM, Greg Fischer wrote:
I would love to have a product (called ZAjax :) that simply
receives
a request from the client and spits out xml. To be more specific, a
set of classes that call ZSQL methods and retrieve records, then send that back in xml format.
We've had this built in to Zope for a long time in the form of XML- RPC. There are several JavaScript libraries that implement an XML- RPC client, the best in my recollection being vcXMLRPC.
http://myzope.kedai.com.my/blogs/kedai/49 shows a few different ways to do Ajax and Zope.
Michael
-- http://zope.org/Members/d2m http://planetzope.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 )
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
-- 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 )
-- http://myzope.kedai.com.my - my-zope org
On Mon, 10 Oct 2005 23:28:03 +0800 Bakhtiar A Hamid wrote:
we have zope (dtml/script/zsql-method) that do specific calls that spits out results via xmlrpc.
on the browser side, we have all these ajax libs - openrico, dojo, mochikits, azax, DataRequestor, jsolait, tim morgan's mini, etc
we just need to connect the dots. the ajax lib + our java functions/etc will call dtml/script/sql-method via xmlrpc(builtin) or jasonrpc(with the jsonrpc product) and page will be updated inline(?)
not much voodo involved. everything is there already.
a simple demo is at http://myzope.kedai.com.my/blogs/kedai/demo/; a script python that just spits out DateTime().pCommon(), and the other, a script python tah calls html file randomly. replace that with anythin we want.
zope rox! but i guess we all know that
Thanks, this was a nice briefing. I like the demos, and as a single additional comment I would add that for json-rpc I myself too made some (although more crude looking) simple demos, that do not have a live server but that are installable: so that you can start playing with it on your own server and modify any client or server scripts, if you install the demo + jsonserver2 into Zope as two individual products. Downloads: http://www.zope.org/Members/ree/jsonserver2_pkg/ Guide for the demos: http://www.zope.org/Members/ree/jsonserver2_exa -- Balazs Ree
Ah even better! Thanks guys. I was going to reply just to mention I have a "not as cool" way of using Zope with Ajax at my site now too. www.zajax.net <http://www.zajax.net/> Seems every rock I turn over, I find 3 others worth investigating. Lots of cool stuff going on out there. I put up my own demo, but it's not nearly the prefered way of doing things by most people. I myself, prefer DTML over ZPT, so my demo is based on that. I also am using one of the larger client frameworks available, Dojo Toolkit. The js file is around 130k if I remember. The smaller ones are great and do the job, but I wanted something larger and more widely used like Dojo to build off of. I know eventually I'll look at the JSON stuff too. Sound interesting. Greg On 10/11/05, Balazs Ree <ree@ree.hu> wrote:
On Mon, 10 Oct 2005 23:28:03 +0800 Bakhtiar A Hamid wrote:
we have zope (dtml/script/zsql-method) that do specific calls that spits out results via xmlrpc.
on the browser side, we have all these ajax libs - openrico, dojo, mochikits, azax, DataRequestor, jsolait, tim morgan's mini, etc
we just need to connect the dots. the ajax lib + our java functions/etc will call dtml/script/sql-method via xmlrpc(builtin) or jasonrpc(with the jsonrpc product) and page will be updated inline(?)
not much voodo involved. everything is there already.
a simple demo is at http://myzope.kedai.com.my/blogs/kedai/demo/; a script python that just spits out DateTime().pCommon(), and the other, a script python tah calls html file randomly. replace that with anythin we want.
zope rox! but i guess we all know that
Thanks, this was a nice briefing.
I like the demos, and as a single additional comment I would add that for json-rpc I myself too made some (although more crude looking) simple demos, that do not have a live server but that are installable: so that you can start playing with it on your own server and modify any client or server scripts, if you install the demo + jsonserver2 into Zope as two individual products.
Downloads:
http://www.zope.org/Members/ree/jsonserver2_pkg/
Guide for the demos:
http://www.zope.org/Members/ree/jsonserver2_exa
-- Balazs Ree
_______________________________________________ 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
Greg Fischer wrote:
Ah even better! Thanks guys.
I was going to reply just to mention I have a "not as cool" way of using Zope with Ajax at my site now too.
www.zajax.net <http://www.zajax.net/>
Seems every rock I turn over, I find 3 others worth investigating. Lots of cool stuff going on out there. I put up my own demo, but it's not nearly the prefered way of doing things by most people. I myself, prefer DTML over ZPT, so my demo is based on that. I also am using one of the larger client frameworks available, Dojo Toolkit. The js file is around 130k if I remember. The smaller ones are great and do the job, but I wanted something larger and more widely used like Dojo to build off of.
I know eventually I'll look at the JSON stuff too. Sound interesting.
Hi, Greg Cool! I like the way you do the how-to. Do you plan similar how-tos for other JS libraries/techniques? Would you accept contributions? I find myself looking at mochikit (http://mochikit.com) occasionally. In its ajax-tables demo, it uses a tal(esque) syntax for dom manipulation in client javascript, which could be interesting for fans of page templates. For the future, dare I ask, maybe some zope3 stuff? I think the zope community really needs zope-oriented how-tos and evaluations of the various AJAX libraries. zajax.net has the right name to be a prime focus of such activities, should you be willing to do that. Thanks! -Jim Washington
Jim, I am more than happy to take contributions from others. Using other libs or maybe even just some Zope techniques in general is great. Right now, I just loaded that stuff up over the last few days, so it's quite limited. But, if you have anything you would like to share, please zip it up and email it over to me. Just put together all the html for the body, I'll post it for ya, with credit to you of course. I am sure that if I get a bunch of other how-tos to post, I will probably have to grow things a bit, but it will evolve over time. All of this stuff is a learning process for me, so I wanted to put up that site to share my experiences in hopes that others could benefit. Zope 3, I would love to put stuff up for that, but I havent even touched Zope 3 yet. I am more than happy to put of info on that as well. Thanks! Greg On 10/11/05, Jim Washington <jwashin@vt.edu> wrote:
Greg Fischer wrote:
Ah even better! Thanks guys.
I was going to reply just to mention I have a "not as cool" way of using Zope with Ajax at my site now too.
www.zajax.net <http://www.zajax.net> <http://www.zajax.net/>
Seems every rock I turn over, I find 3 others worth investigating. Lots of cool stuff going on out there. I put up my own demo, but it's not nearly the prefered way of doing things by most people. I myself, prefer DTML over ZPT, so my demo is based on that. I also am using one of the larger client frameworks available, Dojo Toolkit. The js file is around 130k if I remember. The smaller ones are great and do the job, but I wanted something larger and more widely used like Dojo to build off of.
I know eventually I'll look at the JSON stuff too. Sound interesting.
Hi, Greg
Cool! I like the way you do the how-to. Do you plan similar how-tos for other JS libraries/techniques? Would you accept contributions? I find myself looking at mochikit (http://mochikit.com) occasionally. In its ajax-tables demo, it uses a tal(esque) syntax for dom manipulation in client javascript, which could be interesting for fans of page templates.
For the future, dare I ask, maybe some zope3 stuff?
I think the zope community really needs zope-oriented how-tos and evaluations of the various AJAX libraries. zajax.net <http://zajax.net>has the right name to be a prime focus of such activities, should you be willing to do that.
Thanks!
-Jim Washington
-- Greg Fischer 1st Byte Solutions http://www.1stbyte.com
participants (8)
-
Bakhtiar A Hamid -
Balazs Ree -
Chris McDonough -
Greg Fischer -
Jim Washington -
Maik Jablonski -
Michael Haubenwallner -
Peter Bengtsson