Ember 1.1 And Stitching Together An Ember App On The Server


I had to duck out before the end of the SF Ember meetup, but I was wondering if running an Ember App on the server and stitching the UI together will become technically possible when Ember 1.1 lands. I ask because Yehuda had mentioned that he had written a client side HTML parser so that bindAttr and metaphor tags will no long be needed.

If not, what are the technical problems in creating a rendr (serverside backbone) for ember?


I wasn’t at the meetup, but I don’t think HTMLBars (the lib Yehuda was referring to) will solve the problem of making it easy to render on the serverside, but maybe there’s something I’m not thinking of. HTMLBars will

  • Make certain in-tag helpers way more palatable, e.g. class="{{something}}" vs {{bindAttr class="something"}}
  • Make metamorph tags unnecessary
  • Improve the heck out of performance, largely due to the fact that script tags unnecessary

Whether that’ll make server-side rendering solutions more plausible remains to be seen, but I don’t think that’s the main focus of what Yehuda was talking about.


Right. I didn’t think that was the intention but because the metaphor tags won’t be needed for binding to a dynamic value it seems like you could write a piece of middleware that could stitch the UI together. The thing I’m wondering about is how you would put the javascript into the state that the assembled UI is in when the page is rendered. I think that is where the technical problems become pretty hairy.