3 ms·
I think the most important, and often violated principle is to keep model and presentation code separated. If your widget has any kind of even slightly complex
by troels 16y ago
I think the most important, and often violated principle is to keep model and presentation code separated. If your widget has any kind of even slightly complex logic, don't rely on the dom to be your model, or you'll get into a mess quickly. The dom (and thus jquery) is presentation (controller/view). Create separate objects for your model and have your controller code (even handlers) update this and your view be updated from it.