title: How to build Modern front-end with non-Node.js backend?
body: <p>Generally I am backend and fullstack developer and a tech-lead. I am choosing dev tools over the years.</p>
  
  <p>For back-end, I've chosen Typesafe Stack. It makes apps reactive and relatively easy to scale and maintain. And it's fun to code in Scala.</p>
  
  <p>For front-end, I use Angular.js, previously it was knockout.js, YUI, Mootools, jquery, vanilla.</p>
  
  <p>But with Angular.js I am really confused. Problem is not in a tool itself, but in the way the Web evolves.</p>
  
  <p>The aim is to fasten application, make it more responsive, reactive, interactive. It leads us to single-page apps. Angular.js is good for it.</p>
  
  <h2>But.</h2>
  
  <p>For a modern app, it is extremely important to render first page ASAP. For single-page app, it cannot happen before resolving main template, then loading all the scripts, then launching app, routing request, then asking server for some REST resources, binding it into templates, and then showing it to the user.</p>
  
  <p>A lot of network latency to wait for! A lot of sequential requests coming one after another.</p>
  
  <p>So it takes looong time to see the content. Also it makes it hard to be indexed via search engines, and limits accessibility (Reader mode in Safari usually doesn't respect markup generated by angular.js).</p>
  
  <p>Well, one can solve the problem of searchability by tools like prerender.io. Ok, even if it looks ugly, but what's about the first page load?</p>
  
  <p>I've heard that Twitter finally became to render content on back-end, and then wrap it with scripts. How?</p>
  
  <p>I've seen some projects on node.js with the same purpose. They renders content with the same javascript that client actually gets, and fed it the result html. Then wraps it with, say, React.js triggers and codes, or even angular.js. But what if Node.js backend is not our choice?</p>
  
  <p>So the requirements are very natural:</p>
  
  <ul>
  <li>Ability to (pre)render content on back-end</li>
  <li>Wire scripts on the page after it was loaded</li>
  <li>Do not replace page content with something generated by scripts</li>
  <li>Use html5 routing for all other page views</li>
  <li>Avoid node.js, at least don't use it as the main back-end technology</li>
  </ul>
  
  <p>Am I alone against this problem? How do you think of it?</p>