Over the last couple of years, the idiom of single-page web applications has gotten to be quite popular. This happened for several reasons, some technological, some driven by the demand for better user experience - but whatever the reason, it really changed the way web developers carry their work.
A lot of logic has been pushed up the stack, to the client, resulting in thinner server side code. In a single-page app, the server handles mostly authentication and persistence, while the business logic itself (or at least a big chunks of it) has moved to the client, along with the presentational logic.
This shift from backend to frontend naturally isn't always smooth. Client side code has a few different paradigms and uses a few principals less familiar to those coming from a server-side world (excluding maybe async environments such as node.js).
This post is a collection of things I generally learned the hard way. A collection of solutions to common problems: some were easier to solve, some less obvious - but I bet a lot of people still tackle them when making this transition. As you'll see, these are not specific to any single framework, library or browser, but ...read more →