Louis wrote:

Ben, Eugene: I think one of the difference between "helper" approach
and "widget" (especially dojo.widget) approach is whether you want to
specify "parameters or  behaviors" of elements in the page using
(proprietary) DOM attributes or using parameters to helper tags. So

Widgets accept parameters and it may make sense to have helper tags as well. The real difference is in how (and where) to handle presentation logic, user's interaction, and back store. AFAIR RoR's helpers define callbacks for primitive operations (like "drop" in drag-n-drop operation), which introduce unnecessary overhead and invite spaghettis code on client and server sides to handle a presentation logic. By substituting client side code with helpers we may even have the "X over Internet" scenario: everything is driven from server, while helpers dispatch events from client's objects to server, and dispatch AHAH from server to client's objects. This design opens a can of worms: overloaded servers, clients will hit bandwidth bottlenecks all the way from our servers to their ISPs, to their pipes. Sometimes you have to design this way, but in many cases it can be (and should be) avoided.

Thanks,

Eugene

Reply via email to