|
|
|
|
|
by ben336
4426 days ago
|
|
Sure. And if you display a count of the number of items in the list, you can update that with jQuery too. Are there other dependencies? Maybe if the list gets too small there's supposed to be a warning message or something shown? I can check the list size each time with jQuery and display/hide the message if necessary. Eventually as these side effects pile up, jQuery by itself becomes a mess. You have a ton of checks and complex behaviors after each user event. Or I can provide some structure on the front end so that I can model my data in a reasonable way and have the DOM respond based on changes to that model. Obviously for stuff thats mostly static, server-side rendering is better. But when you're displaying stuff that includes complex relationships and behaviors, modeling it on the client side becomes an important part of maintainability. This doesn't have to be complicated. Backbone is certainly not complicated. But it is the best option if you want to have complex UI behavior tied to an underlying model and need responsive UI feedback. |
|