tag:blogger.com,1999:blog-5016251368610822667.post121991378183343358..comments2023-09-13T09:09:50.751+01:00Comments on SIGSTP: JS/HTML/CSS: A braindump from a backend guyjetevehttp://www.blogger.com/profile/10262102551420196339noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5016251368610822667.post-53982017708956511172012-09-17T19:50:21.525+01:002012-09-17T19:50:21.525+01:00Hehe, I knew HTML was the controversial bit :) Wel...Hehe, I knew HTML was the controversial bit :) Well, sometimes you want the initial load to be as fast as possible (meaning HTML), even if subsequent actions on the page are a little bit slower. I believe speed, specially time to first useful pixel is a key point in usability, and it's an essential component of SEO. At the end of the day, it all depends on your application viewing/cuding ratio. Here I had a typical site in mind, where users spend much more time browsing and looking at information, rather that changing it.jetevehttps://www.blogger.com/profile/10262102551420196339noreply@blogger.comtag:blogger.com,1999:blog-5016251368610822667.post-9153720761377257532012-09-15T19:59:33.096+01:002012-09-15T19:59:33.096+01:00This is how stuff is done in most places most of t...This is how stuff is done in most places most of the time. But this is only the RETRIEVE stage. What if you change the state of an object (let's say place an order for 100 shares of ACME with a max price of 4.55, and the order gets accepted and the deal is done). You have to update the view of your app. The choice you have is: make a couple of data requests and handle responses, then parse JSON and upadte the UI. Depending on the size and complexity of data you can choose to either exchange JSON/XML or accept HTML as a response and update the page with a HTML snippet. The price you pay for the latter is you might have to recreate event handlers (unless you use event delegation). Those tasks, are what MVC frameworks like Anglular.js (my recent favourite) or Backbone deal with. It is useful to think about the full CRUD lifecycle of an app, not only about the initial load.Karol Kowalskihttps://www.blogger.com/profile/01399001287576442372noreply@blogger.com