TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Backbone that can run on both the Client and the Server

1 pointsby ameyakarveabout 12 years ago
So, I have been working on an implementation of Backbone that would work irrespective of whether you use it on Node or through a regular browser. What I have hacked together so far is similar in theory to Rendr by the AirBnB people. There are a few changes in the philosophy though. I want to be able to use the Model event bindings if possible on the client; it doesn't make too much sense using those server-side. Ideally, whatever I render through the server should contain no Javascript whatsoever; The same Backbone app should be runnable client-side too. Also, I will want to handle events on the client only, which won't be a part of the server implementation. Another concept I want to explore is API calls. On the server, I can simply connect to the database and fetch stuff; On the client, I will have to make an XHR call. Currently, I am thinking of using some conditional code mixed in to the custom Backbone objects. Would you have any good ideas for achieving this?

no comments

no comments