Ben Bangert wrote:
Eugene Lazutkin wrote:
A lot of people who use list boxes, radio buttons, and other widgets
don't know X11/Win32 graphics APIs and event systems. My point is there
are many ways to minimize exposure to js.

Agreed, I have yet to see anyone come up with clear cases for widgets
within web programming. Zope has some, and they're pretty decent I
believe, but there's a bit of a learning curve as usual.

Look at Dojo. I did a small how-to on creating widgets here: http://lazutkin.com/blog/2005/dec/24/live-filtering/. Some people, who read it, missed my point: it was not about Ajax functionality (you can do it with any library), it was about creation of self-contained generic widgets, which don't pollute your html code with unnecessary garbage. You can download LiveFilter.js (link in the tutorial) and use it literally without modifications with practically any form in your project to make it "live". All you have to do is to implement a relatively simple view to support it on Django's side (example included). No JavaScript knowledge is involved in actual use. But if you want to be fancy, you can create your own widgets, and reuse them across projects. Additional bonus (useful for medium-to-large projects): such widgets provide a clean separation between client-side programmers, server-side programmers, and (most importantly) designers --- everybody is doing stuff they are familiar with.

As soon as I deal with never-ending stuff on my plate (sigh), I plan to bundle some widgets and corresponding generic views to make it super simple to use for simple projects.

I'd suggest taking both approaches, RailsHelpers and something like RJS
now; new thing when its ready. The amount of effort required for
something like RJS is pretty minimal, for an AJAX widget system there
will likely be extensive planning, meetings, etc. As I plan on doing
something like the RJS stuff anyways, Django need only have a single
person who implements it for Django (like Louis did for the
RailsHelpers)

Agreed. "Let 1000 flowers bloom" (c) Chairman Mao. Like I said before you did fantastic work porting this stuff over to Django.

Thanks,

Eugene

Reply via email to