Hacker News new | past | comments | ask | show | jobs | submit login

In my head it's much easier to imagine manipulating a UI based on objects and their state, rather than partial snippets of HTML. It seems like it would get complicated to track the pieces of html you needed to request in order to redraw only portions of the UI. Wouldn't there still be a lot of javascript involved with that logic?



Normally that basic cycle would go: 1. I need to view some data, if I do not already have it, request it. 2. Generate html from data 3. Take generated html and place in appropriate place on page.

This skips step 2 by requesting the required html rather then the raw data. Step 2 is the part that would require the most code.


I disagree. I work on an app that is entirely client side rendered. We use the JSON data approach. Step 2 is trivial. There are many JS templating engines out there. It takes almost no code. The part that's hard is step 1, figuring out if you have the right data or whether your data is stale. And then, to figure out which part of the UI needs to be redrawn. This is where frameworks like Backbone can come in handy.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: