Questions tagged [spine.js]

Spine is a lightweight framework for building JavaScript web applications.

Homepage: http://spinejs.com/

Spine.js Introduction

Spine is a lightweight framework for building JavaScript web applications. Spine gives you an MVC structure and then gets out of your way, allowing you to concentrate on the fun stuff, building awesome web applications.^

Resources

182 questions
89
votes
6 answers

The 'describe' keyword in javascript

So I am a newbie in javascript and i had been going through some one else's code and I found this.. describe('deviceready', function() { it('should report that it fired', function() { spyOn(app, 'report'); app.deviceready(); …
Aatish Molasi
  • 2,138
  • 3
  • 20
  • 43
36
votes
2 answers

Defining global variable for Browserify

I'm using SpineJS (which exports a commonjs module) and it needs to be available globally because I use it everywhere, but It seems like I have to do Spine = require('spine') on every file that uses Spine for things to work. Is there any way to…
sebastiannm
  • 565
  • 1
  • 5
  • 14
16
votes
2 answers

Formtastic in JavaScript (form builder)

Are you aware of any form builders that do similar job to Formtastic but in the browser? It should not be very heavy (so not ExtJS) and ideally compatible with structure that Formtastic generates, jQuery based and HAML-JS friendly. The purpose is to…
Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130
11
votes
2 answers

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

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:…
soupdiver
  • 3,504
  • 9
  • 40
  • 68
9
votes
2 answers

How to update small portion of view in Backbone or Spine

The common pattern in Backbone/Spine is to re-render the whole view from scratch when something happens. But what do you do if you only need to update a small part of it (highlight, select, disable, animate etc)? It doesn't make any sense to…
Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130
8
votes
2 answers

How to replace Backbone.sync with nothing, not even localStorage?

How do you replace Backbone.sync to do nothing? My app has a "Submit" button which will do the AJAX POST for me, so I don't want to use the auto-magic default behavior that Backbone.sync provides. I also don't want to use Backbone LocalStorage…
kidcapital
  • 5,064
  • 9
  • 46
  • 68
8
votes
2 answers

Handlebars breaks when passing this.item in Spine.js

I'm attempting to implement the Todo-example given in the Spine.js docs, given here: http://spinejs.com/docs/example_tasks only I'd like to use Handlebars instead of jQuery.tmpl. I'm using Handlebars 1.0.rc.1 However, when I attempt to…
amhou
  • 101
  • 3
7
votes
5 answers

Can SpineJS url() support Nested Resource in Rails?

Rails have Nested Resources for a while, and it has been heavy used (or overused). Say we have two model, Article and Comment. class Article < ActiveRecord::Base has_many :comments end class Comment < ActiveRecord::Base belongs_to…
Daniel Lv
  • 867
  • 6
  • 10
6
votes
2 answers

Spine.js - How do you unbind a specific event handler from a model instance using JavaScript?

It's pretty easy to unbind specific event handlers from model classes, but it seems the only way to unbind an event handler from an instance of a model is to unbind ALL event handlers attached to that instance using unbind() (takes no arguments). Is…
Davecheesefish
  • 113
  • 1
  • 7
6
votes
2 answers

How can i render a list of all iPhone contacts with Cordova (phone gap)

I am trying to create a Application which lists all contacts from the iPhone address book with the following code (coffeescript) listContacts: -> options = new ContactFindOptions() options.filter = ''; options.multiple = true fields…
reco
  • 459
  • 1
  • 6
  • 13
5
votes
4 answers

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

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…
Hubro
  • 56,214
  • 69
  • 228
  • 381
5
votes
1 answer

Model records ordering in Spine.js

As I can see in the Spine.js sources the Model.each() function returns Model's records in the order of their IDs. This is completely unreliable in scenarios where ordering is important: long person list etc. Can you suggest a way to keep original…
irium
  • 691
  • 8
  • 14
4
votes
1 answer

spine.js hem server, hem build FAQ for Windows

I'm trying to mimic some basic functionality of the Todos example. After reading spinejs.com, many articles, and taking a few attempts and not getting off the ground, I do need to ask and get some help here. I wish this was more clear-cut, and I'd…
webguynow
  • 41
  • 4
4
votes
2 answers

Uncaught module jqueryify not found

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…
Hubro
  • 56,214
  • 69
  • 228
  • 381
4
votes
2 answers

Should I use UUIDs as primary keys for Rails?

I want to use the Spine.js client-side framework, and it generates UUIDs as IDs for models, which can then be persisted to the server. It would be easiest if I just used the client-generated UUIDs for the models, and saved them on the server. What…
Chetan
  • 46,743
  • 31
  • 106
  • 145
1
2 3
12 13