5 ms·
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
by moonboots 15y ago
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/Morriz/backbone-everywhere
https://github.com/developmentseed/bones https://github.com/developmentseed/bones
- jordow 15y agoRendering 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 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.
- rev087 15y agoI'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.
- skeletonjelly 15y agoASP.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.
- pilgrim689 15y agoTry this combo: Express(server routing), Sammy(client routing), Jsdom, Jsviews(templates).