News for hackers. Stuff that matters.
Re:Modern Web Applications are Here by moonboots on Tuesday November 15, 2011 @01:29AM (#3237277)
What are some of the frameworks you've seen? I've been looking for frameworks that allow client-side javascript routing to be reused on the server. So far I've found two, both using a combination of backbone.js and jsdom to render pages on the server:

https://github.com/Morriz/backbone-everywhere https://github.com/developmentseed/bones

Re:Modern Web Applications are Here by jordow on Tuesday November 15, 2011 @02:44AM (#3237441)
Rendering arbitrarily on either the client or server is hard. Other solutions that I saw forced the developer to have to think about it, so I developed FaxJs which allows the system to handle that complexity for you.

https://github.com/jordow/FaxJs

The gist is that you just write standard declarative ui structures in pure javascript and the system disassembles the markup on the server, and reassembles it on the client with all the events still in tact. You wouldn't know all that is happening just by looking, though.

    ...
    var twoDivs = {
      className: 'outerDiv',
      onClick: this.outerDivClicked,
      innerDiv: {
        className: 'innerDiv',
        content: 'inner-most-div!'
      }.Div()
    }.Div();
Or you can just do it all on the client too, if that's your thing. You'll need to work to get this integrated into your routing technology as with any rendering system.
Re:Modern Web Applications are Here by pilgrim689 on Tuesday November 15, 2011 @07:34AM (#3238007)
Try this combo: Express(server routing), Sammy(client routing), Jsdom, Jsviews(templates).
Re:Modern Web Applications are Here by skeletonjelly on Tuesday November 15, 2011 @05:08AM (#3237726)
ASP.NET MVC does a really nice job. I have a pattern that detects whether the request is for JSON or HTML (via a GET or POST parameter) and return a user control (module or what have you) or the entire page respectively.
Re:Modern Web Applications are Here by rev087 on Tuesday November 15, 2011 @03:47AM (#3237573)
I'm mostly on the same page as you, trying to somehow integrate Backbone on the server side. In the end, the mess I was creating became really unmaintainable and I left the project on hold.