Michael Brickenstein wrote: > Hi! > > I read your post now, several times: > I know, that every answer, I can give now, to such a long, well > thought mail, > can't really give it the appreciation, it deserves. > > Basically, I think that you have some valid points. > In particular, I think, TW is great, but not the way to write > a rich client application. > > But if you need something for that, is it really a TurboGears > problem: TG can be used excellently as server side component of a rich > client app. > The widget problem for this kind application: isn't it solved better > by JS widget libraries like dojo's Dijit? > http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit-0 > My thoughts exactly.
TW, as a port of TG widgets, shares the scope of being a tool to create *server-side* components (eggs) which bundle markup generating logic, css, javascript and a thin interface between python and js to initialize the client-side part of a widget. These widgets are more suitable for pages which don't *require* javascript to be usable but that can be progressively enhanced with its use (eg: the calendar widget from tw.forms...) It wasn't designed to build "one-page" rich client apps or handle module dependencies on the client so it naturally falls short on this tasks. In fact, I've considered once considered factoring out the resource injection functionality from TW into a smaller lib to feed js "modules" to the client, with the possibility of compressing them on production (see the half-baked attempt at [1]), and in the future bundle them into less files to optimize load time. But then I (finally) discovered dojo :) What you're describing here, as Michael has pointed out, sounds very much like what Dojo already does. Like how it handles loading modules (dojo.require) on demand from the client side and the toolchain it provides to "pack" everything into less files, including the html templates used by dijit widgets (which can even be written in Django template language and processed on the client!) , to optimize load time on production. What has really impressed me is that using the optimized packages, if planned well into the build-chain, doesn't require any change in the existing code (eg: to conditionally include one file or another, etc...) To sum up, I think these are great ideas but following them will probably lead to reinventing the dojo wheel. Incorporating them into TW doesn't make much sense either IMHO since pure-javascript rich client apps were never really TW's scope. I think Dojo or ExtJS or others are much better suited for this task. Alberto [1] *http://toscawidgets.org/documentation/ToscaWidgets/deploy.html* --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
