On Apr 8, 7:43 pm, Scott Newman <snewma...@gmail.com> wrote:
> > I've been looking at a couple of RIA frameworks, namely Sproutcore and
> > Cappuccino.  The feel a bit too heavy for me.  Sproutcore does not
> > integrate well with Django
> > The reason I'm posting is to ask the community if they have know of
> > anything that is at a higher level than jQuery + jQuery UI and a lower
> > level than Sproutcore/Cappuccino.  I'd like to find something that has
> > this kind of stuff in it:
> > - Client-side Javascript MVC implementation (Both Sproutcore and
> > Cappuccino have controllers and view)
> > - Easy layouts (I really 
> > likehttp://cappuccino.org/learn/tutorials/automatic-layout/)
> > - Data bindings (Step 4 
> > onhttp://www.sproutcore.com/documentation/hello-world-tutorial-2-your-f...)
>
> When I looked into some of the heavier JavaScript application
> frameworks such as SproutCore, Cappucino, and ExtJS, the biggest
> hurdle I faced was my own approach.
>
> These frameworks are designed to build complete web applications, not
> to be sprinkled within Django template files the way I might do with
> jQuery.

 yes - that's a fact.  pyjamas is no exception.  although gwt-ext
proves that you can mix extjs into GWT, extjs itself is several tens
of thousands of lines of custom-written javascript; gwt-ext itself is
tens of thousands of lines of java - just the integration/startup in
gwt-ext to plumb extjs into gwt is eight _thousand_ lines of
javascript, on its own.

so you _can_ plug in "other JS frameworks" into pyjamas but you end up
thinking, "why in god's name am i spending so much time converting
some ridiculous javascript widget set framework which i'm never going
to fully understand, never going to be able to debug, never going to
be able to extend; why am i going to make myself wholly dependent on
that javascript framework, when i could be writing my own widgets, in
python, writing my own easily customisable, easily understandable
python framework that will be compiled to javascript to run in the web
browser??"

we have several people asking e.g. "i want prototype to be compatible
with pyjamas!" and i warn them, "don't do it - convert the app from
javascript to python / pyjamas and start from there".

it's a different, _much_ easier paradigm.  imagine that python-gtk2
was available for running in _all_ web browsers - that's what it's
like, except the underlying widget set is far more flexible than
python-gtk2.


> Even with my jQuery projects, my initial results were a morass of
> spaghetti code because I was approaching my client-side projects as a
> web developer, relying on my experience with what I'd call "request
> and response" thinking. I had to study the practices of traditional
> stateful, event-driven desktop application development before my
> attempts at these projects went more smoothly. (and I'm still
> learning!)

 yeah - the design of pyjamas is much more along the lines of event-
driven interaction that you'd expect of python-qt4 and python-gtk2
apps.  you register for listening for click events with
"addClickListener()".  you register for keyboard events with
"addKeyboardListener()".  see http://pyjs.org/examples/helloworld/ for
an utterly simple example of this.

> If you settle on a client-side MVC framework, you'll probably want to
> keep the frontend and backend completely separate and use Django for
> web services calls to send and receive data to the frontend.

 yep.  that's the approach i take to every single project with
pyjamas, now - using JSONRPC it's just utterly trivial.  you have to
work _really_ hard to make life difficult for yourself - mostly in the
form of getting over sheer disbelief that it should be much much
harder than it is. see 
http://pyjs.org/examples/jsonrpc/output/JSONRPCExample.html
don't use the python cgi-bin service, use the php one or install the
examples on your own system and set up cgi-bin execution.

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