Re: [Zope] ZAjax anyone?

2005-10-08 Thread Peter Bengtsson
2005/10/8, Chris McDonough <[EMAIL PROTECTED]>:
>
> 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
___
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] ZAjax anyone?

2005-10-08 Thread Greg Fischer
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.

GregOn 10/8/05, Chris McDonough <[EMAIL PROTECTED]> 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 Fischer1st Byte Solutionshttp://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] ZAjax anyone?

2005-10-08 Thread Chris McDonough


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

___
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] ZAjax anyone?

2005-10-08 Thread Greg Fischer
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.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.
Greg
-- Greg Fischer1st Byte Solutionshttp://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 )