I was also thinking of something a whole lot more simplistic as well.
javascript-enabling some of the validators.

for example.. we have a URL field.. it would be nice if the javascript
did the same regex match that the server side did, so that people
wouldn't have to submit it in the first place, or have a calendar pop
up for a date box (it might already.. I hardly use dates)

This kind of thing would be relatively easy to 'plugin' i would
expect, and while not AJAX per se might make for a good first start.

and i agree with what Jacob said as well.

--Ian
On 11/15/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> Hey folks --
>
> Man, it's fun having such smart and passionate people on this list!
>
> I've been thinking about how Django might leverage DHTML^H^H^H^H^H
> AJAX a lot recently, and I think the framework I'll sketch out below
> should make a bunch of people happy.
>
> As I see it, there are three layers necessary for doing Django-AJAX:
>
> The first layer will be a package -- django.core.serializers, most
> likely -- which exports a set of serializer/unserializer libraries.
> These libraries will know how to convert Django objects to and from a
> specific format; we should most likely have XML and JSON serializers
> at first crack, and XML-RPC and SOAP serializers could be quite useful.
>
> The second layer will be a set of views not unlike the
> django.views.generic, except that they'll take and produce data in
> one of the formats defined by the serializer and be nicely RESTful
> (appropriate use of HTTP verbs and such).  So you'll be able to do
> something like::
>
>      urlpatterns = patterns('',
>          ('^rpc/', include('django.conf.urls.rpc')),
>      )
>
> and get slick web services for free.
>
> The third layer will be a toolkit that abstracts those views into
> Javascript.  I'm afraid that picking a Javascript framework is going
> to turn into a bikeshed argument, but as long as whatever we choose
> can seemlessly hook into the CRUD views, we should be OK.  The idea
> is that in Javascript I should be able to do::
>
>        entries = rpc.get_list('blogs.entries', {'limit' : 15})
>
> (or something) and have it Just Work™.
>
> As I see it, these three bits should be written in a way that's
> consistent with the rest of Django's philosophy: it should be very
> easy to use all four together, but they should be loosely coupled so
> that any layer could be used without the others.  That way if you
> don't like the JavaScript wrappers, you can always write your own.
> Or, if you don't like the way Django does CRUD, you could roll your
> own CRUD layer.
>
> How does this sound to everyone?
>
> Jacob


--
[EMAIL PROTECTED] -- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Reply via email to