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.html >From 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 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.
1st Byte Solutions
_______________________________________________ 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 )