3 ms·
How can we use this to make our applications better? Could anybody explain please :-)
by arrowgunz 14y ago
How can we use this to make our applications better? Could anybody explain please :-)
- aakilfernandes 14y agoInstead of generating markup on the server side, generate it on the client side. Why? 1) The client side knows more about the client (screen width, device, scroll position) 2) Save yourself an AJAX call 3) Make your code more modular by templating jQuery and HTML at the same time. I plan on writing a whole blog post about this, but currently writing web apps seems to follow 1)Create DOM, 2) find relevant DOM with jQuery, 3) apply jQuery. This will combine steps 1 and 3 into the same template, and make 2 unnecessary.