3 ms·
http://lanyrd.com/mobile/ http://lanyrd.com/mobile/ works offline, without JS, shares templates between the client and the server for updating pages async and r
by jaffathecake 13y ago
http://lanyrd.com/mobile/ http://lanyrd.com/mobile/ works offline, without JS, shares templates between the client and the server for updating pages async and rendering offline. Doesn't use a framework so it doesn't have a huge JS payload.
- kalms 13y agoFrameworks doesn't necessarily mean you're delivering a huge JS payload, but more to the point: How was that template sharing achieved? Would love some notes on the technical implementation.
- jaffathecake 13y agoThe templates are mustache, delivered via a single JSON file (https://m.lanyrd.com/templates.v356.js https://m.lanyrd.com/templates.v356.js). They're used on: * The server-rendered web (python) * The enhanced & offline web (javascript) * The ios app, where native views aren't used * The android app, as above The client code is pretty dumb, it knows how to turn a link into an API call, the api response basically says "Render template x or equivalent native view) with this data…"