Earlier quoted context omitted.
Can you please elaborate on this?
I imagine the parent means that building single-page apps that require a full DOM+JS implementation is bad for the Web, because it cuts content off from being accessed by anything other than a full modern browser running several million lines of C++. See also my answer to this question about single-page apps on Quora: http://www.quora.com/What-exactly-is-a-single-page-applicati...
Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
31–40 of 43 posts
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#32Having applied the same approach as LinkedIn on past projects and jobs (e.g. BN.com), there is definitely a lot to be gained if done right, and web workers, when available, ease some of the issues with rendering large templates and/or large datasets.
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#33Earlier quoted context omitted.
http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-1...
Nice link, thanks. It doesn't address the problem we bumped into though. When a page needs a significant amount of content updated, sending that as structured JSON to a low powered Android device (or sometimes even an iPhone2 or a non S 3G) and then parsing that JSON and updatng the DOM was _way_ slower than sending back HTML and just replacing an elements innerHtml. For small tasks (like the personalisation {'name':…
Are you perhaps constructing the nodes on the document, instead of doing them off the tree and then inserting/replacing them all at once?
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#34What about SEO and accessibility. If the content is sent via JSON it's relying on javascript, no?
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#35Does any know how is dust.js compared to Beebole PURE, an JS template engine too. They claim, PURE should be fastest JS template. ^^
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#36Doesnt this play havoc with caching - I mean if you had a single UI webapp (that in turn queries all other webservices to render a page), then you could simply heavily cache your UI webapp. But when your client side JS is directly querying individual web services, in that case you would have to cache each individual web service (not sure if this introduces inconsistencies vis-a-vis different web services). Is this ho…
Not only caching, but right now I suspect this approach could have _serious_ SEO implications. It seems to run directly against the guidelines against cloaking here: http://support.google.com/webmasters/bin/answer.py?hl=en&... (Not that I suppose LinkedIn are too worried about search engine discoverability of a lot of their "dynamic, login required" content, but I'll bet they're _not_ using this technique on all t…
https://twitter.com/#!/mattcutts/status/131425949597179904
There's also some speculation that googlebot actually runs Chrome and can render anything that Chrome does:
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#37> Once written, the same dust.js template can be rendered not only in the browser, but also on the server using node.js or Rhino. I'm relieved to see their staff know what they're doing, and even curl http://www.linkedin.com/in/example still yields content. An alarming fraction of devs and toolsets out there would have screwed this up so badly that their resources would be cut off from reuse by the rest of the web, t…
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#38Earlier quoted context omitted.
Can you please elaborate on this?
I imagine the parent means that building single-page apps that require a full DOM+JS implementation is bad for the Web, because it cuts content off from being accessed by anything other than a full modern browser running several million lines of C++. See also my answer to this question about single-page apps on Quora: http://www.quora.com/What-exactly-is-a-single-page-applicati...
Re: Leaving JSPs in the dust: moving LinkedIn to dust.js client-side templates
#39JSP is an archaic template language. I'm on a project with JSP on the front end; compared to Django, Jinja, or any of the other Python template languages it's really limited and verbose. It's interesting that LinkedIn chose dust.js as it doesn't get much attention compared to some of the other JS template languages (e.g. Mustache & Handlebars.js).
Are you using some old version of JSP? Not unlike many other mature technologies, many times people are just victims of some arbitrary corporate standard and not the tech itself. As far as limited, I looked at Django strictly for it's vaunted templating prowess and didn't see anything that isn't easily reproducible in JSP. There could be some magic there but I missed it. For verbosity, sure, fn:toLowerCase(string) is…
You mention an example where JSP fares best; there are a lot of examples that don't come out looking too great though, such as time/date/decimal conversion, the obnoxious syntax for if/else, etc. A lot of Django's other filters just don't exist in JSP.
But that aside, there are larger scale issues -- composition of templates via blocks in Django/Jinja, which is a lot easier and more flexible than Apache tiles; the lack of auto-escaping in JSP; and the forced XML syntax, even at the expense of valid HTML (see what it does to script includes or empty divs, without a in between).