the basic plan is to provide a generic JSONRPC front-end to Django
forms which could conceivably become a de-facto interoperability
standard for web 2.0 applications to create, validate and store data
in "forms".

i've just added "describe" and "describe_errors".

http://pyjamas.svn.sourceforge.net/viewvc/pyjamas/trunk/pyjs/jsonrpc/django/jsonrpc.py?view=markup

the basic idea, as mentioned previously, is to allow an AJAX
application, using JSONRPC, to interact fully with Django Forms. i.e.
*without* forcing the server to generate some dumb bit of HTML which
you are forced to use, forced to perform HTTP POSTs on etc. etc.

now that "describe" has been added, the next step will be to create an
http://pyjs.org AJAX form "widget" that uses the "describe" command to
find out what fields to build into the form.

* CharField, FloatField, DecimalField etc. will result in a pyjamas
TextBox, with the option for a TextArea being a user-defined option.

* DateField, TimeField etc. will result in a calendar widget popping
up, there's one i've found at:
http://pyjamas-utils.googlecode.com/svn/trunk/examples/calendar/index.py

* FilePathField will be interesting because it implies a level of
interaction with the server: the most sensible widget to use here
would be a recursive / interactive Tree Widget that performs further
JSONRPC function calls to obtain subdirectory contents, on request.

exactly what these fields will go in to, and what CSS style names will
be attached to them, will be entirely up to the user, with sensible
defaults provided.  a Grid seems the most sensible, with the names on
the left, and fields on the right, springs to mind, resulting in the
construction of something similar to the "as_table" method of Django
Forms.  except pure AJAX. no HTML in sight.

interestingly, i can't find anything in Django Forms which tells you
how to specify "password" input boxes.  also, RegexField's design
destroys the possibility for finding out what the regex is (in string
form), thus making it very difficult to perform client-side validation
(using the ECMAScript Regex object).

so there are a few hurdles yet to be overcome.

the above can also be implemented in GWT, using exactly the same
JSONRPC service, which is why i describe the API as being a de-facto
standard.  in fact, if you were feeling particularly masochistic (i.e.
a PHP programmer) you could implement this in PHP, both client or
server.

anyone who would like to collaborate or contribute please do join the
pyjamas-dev list.

l.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to