spine.js

How should I go about writing a node.js web application with both server and client side code?

可紊 提交于 2019-12-22 07:05:31
问题 I'm planning on writing a spine/backbone.js style web application which basically just transfers a large application.js file to the client's browser that communicates with the node.js backend using ajax. The problem is that I don't know how to structure such a project, since I've never seen examples of such an application. I can picture some pros and cons with different ways of doing this Keep everything in one project folder. Both the server side and client side code resides in the same

How should I go about writing a node.js web application with both server and client side code?

帅比萌擦擦* 提交于 2019-12-22 07:02:40
问题 I'm planning on writing a spine/backbone.js style web application which basically just transfers a large application.js file to the client's browser that communicates with the node.js backend using ajax. The problem is that I don't know how to structure such a project, since I've never seen examples of such an application. I can picture some pros and cons with different ways of doing this Keep everything in one project folder. Both the server side and client side code resides in the same

spine, node.js (express) and Access-Control-Allow-Origin

房东的猫 提交于 2019-12-21 03:51:04
问题 I'm developing an app on my local pc. THe frontend should be built with spinejs and the backend-api with node.js. Spine is running on port 9294 and node.js is running on port 3000. in Spine I've added to my model the following: @url: "http:localhost:3000/posts" and in my express server app.get('/posts', function(req, res){ console.log("giving ALL the posts"); res.header("Access-Control-Allow-Origin", "*") res.json(posts); }); But I'm always getting the following erro in chrome: XMLHttpRequest

spine.js: Does it really 'pipeline' POSTs?

我的梦境 提交于 2019-12-13 05:57:57
问题 I was reading this post from Alex Maccaw, where he states : The last issue is with Ajax requests that get sent out in parallel. If a user creates a record, and then immediately updates the same record, two Ajax requests will be sent out at the same time, a POST and a PUT. However, if the server processes the 'update' request before the 'create' one, it'll freak out. It has no idea what record needs updating, as the record hasn't been created yet. The solution to this is to pipeline Ajax

Rivets and Spine js example

可紊 提交于 2019-12-13 04:57:39
问题 I am working on a Spine App that users rivets js in lieu of a templating engine and so far I am delighted with the rivets bindings, my views are more concise and readable and I have a clean separation of concerns: my controllers only take care of managing the state of the app, my models do the persistence stuff and my custom rivet bindings and formatters take care of formatting values and massaging user input. So far so good. My only concern is that I am using watch.js and I suspect watch is

Uncaught module jqueryify not found

自古美人都是妖i 提交于 2019-12-07 07:17:56
问题 My situation I'm checking out spine.js for a web application I'm thinking of writing. I've read all the documentation and gone through all the examples. Now I'm trying to run the spine.contacts example project on my own Windows 7 laptop. I'm running node v0.6.6 for Windows What I've done Installed node Installed spine, spine-app and hem through npm Extracted spine.contacts in a folder Run npm install . inside the folder, which created the node_modules folder with a bunch of directories inside

'active' class not added when Spine.js controller stack used

删除回忆录丶 提交于 2019-12-06 10:29:29
问题 I have two very simple Spine.js controllers: class ListController extends Spine.Controller className: 'list' constructor: () -> super class DetailController extends Spine.Controller className: 'detail' constructor: () -> super controller stack class Application extends Spine.Stack className: 'mystack' controllers: list: ListController detail: DetailController and corresponding HTML markup <div class="mystack"> <div class="list">list</div> <div class="detail">detail</div> </div> My problem is

Uncaught module jqueryify not found

无人久伴 提交于 2019-12-05 12:10:25
My situation I'm checking out spine.js for a web application I'm thinking of writing. I've read all the documentation and gone through all the examples. Now I'm trying to run the spine.contacts example project on my own Windows 7 laptop. I'm running node v0.6.6 for Windows What I've done Installed node Installed spine, spine-app and hem through npm Extracted spine.contacts in a folder Run npm install . inside the folder, which created the node_modules folder with a bunch of directories inside, including jqueryify Run hem server to start the test server Basically followed all the instructions

How should I go about writing a node.js web application with both server and client side code?

蹲街弑〆低调 提交于 2019-12-05 09:45:32
I'm planning on writing a spine/backbone.js style web application which basically just transfers a large application.js file to the client's browser that communicates with the node.js backend using ajax. The problem is that I don't know how to structure such a project, since I've never seen examples of such an application. I can picture some pros and cons with different ways of doing this Keep everything in one project folder. Both the server side and client side code resides in the same folders which means they can share resources such as form input validation and language files. This seems

'active' class not added when Spine.js controller stack used

只谈情不闲聊 提交于 2019-12-04 15:49:00
I have two very simple Spine.js controllers: class ListController extends Spine.Controller className: 'list' constructor: () -> super class DetailController extends Spine.Controller className: 'detail' constructor: () -> super controller stack class Application extends Spine.Stack className: 'mystack' controllers: list: ListController detail: DetailController and corresponding HTML markup <div class="mystack"> <div class="list">list</div> <div class="detail">detail</div> </div> My problem is that when controller stack instantiated app = new Application() app.list.active() there is no active