TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Backbone that can run on both the Client and the Server

1 点作者 ameyakarve大约 12 年前
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?

暂无评论

暂无评论