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  >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 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 Fischer
1st Byte Solutions
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to