Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, I freely concede I am still missing the point. You use client-side javascript because that's what runs in the client. Whatever your server-side code does, why would you write it in javascript?


Here is an architecture that fits what the article is talking about:

    --------------------------
    | In-browser EmberJS app |------
    --------------------------     |
                |                  |
               HTML (1)            |
                |                  |
  -------------------------------  |
  | Same EmberJS app, running on|  |
  | server, generating HTML     |  |
  -------------------------------  |
                |         ----------
              JSON (2)  JSON (3)
                |         |
  ------------------------------------
  |JSON API server written in, eg. Go|
  ------------------------------------
You don't write any more javascript than you already would have for the client app, and you can write your API server however you want.


Because writing an app in one language is easier than writing it in two or more, and since JavaScript is the only language you can do client-side scripting in you're probably going to be writing some JavaScript no matter what. So if you want the ease of writing your whole app in one language, the only language that one language can possibly be is JavaScript.


As the post mentions, the node.js app that servers the initial HTML would be separate from the API server. The code in the API server can, as before, be implemented in whatever language you want.


I think the goal is to have FastBoot use your existing client-side javascript app, the idea being that one codebase in one language is simpler and better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: