spine.js - Rendering views in spineJS?

Just so you know this is my first question here on stackoverflow, so I apologize if something is wrong with my question.OK, So I have just started using spine, it is my first delve into MVC frameworks and I am having trouble with rendering a .eco template. It is probably something really basic but whenever i run 'hem server', all I see is a blank page?Here is the hello.coffee controller:Spine = require('spine')class Hello extends Spine.Controller constructor: -> super render: -> @html require('views/view')module.export...Read more

spine.js - Spinejs: binding events for nested controllers

I'm having a problem with nested controller like thisFor example, I have controller Aclass A extends Spine.Controller events: 'click .foo' : 'handle_bar'Then I create two instance of A like thisa = new Ab = new Aa.append bWhen I click on .foo inside b, then b.handle_bar is called. But a.handle_bar is called as well.How to prevent that problem?Thanks!...Read more

spine.js - How do you spin up a new spine app using the spine.app cli?

I'm attempting to use the spine.app cli and I'm encountering a couple of errors and I'm uncertain what the root cause actually is.The guide found at: http://spinejs.com/docs/started gives these stepsspine app my-appcd my-appnpm install .hem serverfollowing these steps, initially yields this error on the terminal:Cannot find module: es5-shimify. Have you run `npm install .` ?Investigating, it seems es5-shimify has been deprecated in favor of es5-shim, so my initial inclination was to replace the dependency to es5-shim. So I updated setup.coffee ...Read more

spine.js - SpineJS stack doesn't add active class to controllers

Spine = require('spine')Welcome = require('controllers/welcome')Signup = require('controllers/signup')class Main extends Spine.Stack controllers: welcome: Welcome signup: Signup default: 'signup' routes: '/welcome': 'welcome' '/signup': 'signup'module.exports = MainThe welcome and signup controllers just render a view so I can understand how the stack works:Spine = require('spine')class Welcome extends Spine.Controller className: 'welcome' constructor: -> super @active @render render: -> console.log 'welcome ren...Read more

Spine.js - How to set up nested stacks

I'm trying to set up nested stacks in Spine.js.Although I copy-pasted the code that seems to work for others (https://gist.github.com/MikeSilvis/2839845) and adjusted the controller & model names it doesn't work.Both stacks get shown perfectly right, there are no errors in the console either. But - if I don't fully misunderstand the usage of nested stacks - they are not nested within a root stack. Is there something that I have to add in the views?index.coffee:class App extends Spine.Controller constructor: -> super new Spine.SubS...Read more

spine.js - Rivets and Spine js example

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 responsable for iphone performance issues, and I not ...Read more

spine.js - Spine - Is there an after_activated callback

Is there an after_activated callback or a good way to implement it for the Spine.Controller?I am using Spine Stack Manager, I found the active class is actually set when active function of the controller is completed/returned. So there's no interface for me to do something after the html content of the controller is set to show. There's something I need to do like reseting the height of some elements, which require the corresponding elements to be showing.Is there a way to do that?...Read more

spine.js - Extending Spine - Change storage type

As part of a dissertation project I am looking to extend Spine.Model in order to support editing of realtime objects. My current spine application is using Model.local. When I run the app using dev tools of the browser, I can see all my models being stored in a map. What I want to do is have Spine use my own map (realtime map from google) for storing Models, and then override functions like create, update, destroy to work with drive api.After going through documentation (and while not having much experience with .coffee or .js) I could not fig...Read more

Spine.js rendering view

I've just started using spine and I'm having trouble understanding a few things...class Spk.Register extends Spine.Controller render: -> @html("<h1>Registration!</h1>")...Zepto(function($) { new Spk.Register({ el: $("#data") });});...I was expecting this to replace any html in the #data element with the html passed to @html when the controller is instantiated, but it doesn't, nothing happens at all.I've also tried putting the render method in the constructor function but again nothing happens.How would I replace the html...Read more

Spine.js and two controllers

Immediately declare: not to consider this issue as a real application. Everything is done exclusively for the purpose of self-education and learning spine.jsSecondly, I know about the relation. I do not want to use, because world is wider than simple relationships. As an example, a page with the article you want to show users that are online now, or all those who participated in writing the article.Imagine an ordinary application that displays a list of posts that you can create, show, edit, and delete. All on spine.js, everything works fine. B...Read more

Spine.js model - resource creation before id is updated

Guys,I have two models, Notebook and Note. Note belongs to a notebook and notebook has many notes. In my application I have a very common 3-columns view, 1st col lists notebooks, and 2nd col lists the notes corresponding to the selected notebook, and the 3rd col contains a form of the currently selected note.In Spine, I didn't use the relation module. Every time the user selects a notebook, I call get /notebooks/:id/notes to fetch the corresponding notes of the selected notebook and render the note list, and when user click to create a new note...Read more

Spine.js & hem getting started

I successfully created a spine app as explained on spine's Getting started page.However, hem doesn't automatically take my changes into account ; I have to build manually.I have the same problem when I follow the contact screencast, but this time hem does not build at all : art-mac:spine.contacts art$ hem build node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Cannot find module: spine/lib/tmpl. Have you run `npm install .` ?I did run 'npm install .'Surprisingly, when I reinstall spine.contac...Read more