drsm79 / situp

A tool to create and manage more complex CouchApps
drsm79.github.com/situp/
Other
10 stars 5 forks source link

Create walkthrough for backbone-couchdb and perhaps knockback (knockout+backbone+couchdb) #18

Open heoa opened 12 years ago

heoa commented 12 years ago

00:18 < heoa> Which example is the easiest to understand backbone-couchdb? 00:18 < heoa> I can find chat -example and todo -example 00:18 < heoa> trying to find some minimal example 00:19 < heoa> bigbluehat: backbone + knockout + couchdb? http://kmalakoff.github.com/knockback/ ? 00:20 < heoa> err I want just some simple eg, a few lines 00:27 < drsm79> heoa: it depends a bit on which backbone connector you use 00:28 < drsm79> once you have that hooked up (which should be a few lines) then you really just need a backbone tutorial 00:34 < heoa> drsm79: can you suggest some simple connecter? I just want some extremely simple example to understand better 00:36 < drsm79> I use https://github.com/mikewallace1979/backbone-couch 00:36 < drsm79> there's an example app using it on https://examples.cloudant.com/whatwouldbiebersay/_design/whatwouldbiebersay/index.html 00:37 < drsm79> if you look at https://examples.cloudant.com/whatwouldbiebersay/_design/whatwouldbiebersay/js/app.js 00:37 < drsm79> the couch specific stuff is all in the first 4 lines 00:37 < drsm79> the rest then becomes normal backbone 00:37 < drsm79> iirc 00:39 < drsm79> oh, I have an over ridden success function because I'm retrieving couchdb views into my backbone collections 00:39 < heoa> drsm79: what do I need to do to get the connector working? Clone the repo and some example there? 00:40 < heoa> cp .couchapprc.example .couchapprc # customize .couchpprc here ??? 00:40 < drsm79> you should just include the connector js file in your app 00:40 < drsm79> as you do other js files 00:40 < drsm79> e.g. make it a vendor in your couchapp 00:43 < heoa> I want just somehing extremely simple without bells-and-whistles, I get easily lost in reading all kind of couchdb/backbone/etc -examples without getting some dead-simple eg working (I can get things such as chat/todo/etc working but I am trying undersand them...) 00:45 < drsm79> I plan to write up a walkthrough at some point 00:45 < drsm79> but I don't know when I'll get time to do that, possibly in the next week or so 00:46 < drsm79> but, as always, use the source ;) 00:46 < heoa> Is i hard to get the code working? 00:46 < drsm79> no, not at all 00:46 < heoa> I cloned it, now fighting with "bundle insall" 00:47 < drsm79> once you grok how MVC works and how collections relate to data in CouchDB it's pretty simple 00:47 < drsm79> not sure what "bundle insall" is - is that an error from couchapp? 00:48 < heoa> No Readme -file 00:48 < heoa> Installation & first run: 00:48 < heoa>
00:48 < heoa> $ bundle install 00:48 < heoa> $ cp .couchapprc.example .couchapprc # customize .couchpprc here 00:48 < heoa> $ soca push test # or ./autopush.watchr 00:48 < heoa> <--- some ruby -installer? 00:48 < drsm79> afraid I don't know soca 00:49 < heoa> How did you get that connecter working? neither me knowing soca 00:49 < drsm79> soca is just a tool to push files from your local file system into couch, I use/wrote drsm79.github.com/situp/ 00:50 < drsm79> the connector just needs to be included in your html file 00:51 < drsm79> along with jquery, backbone, underscore etc 00:51 -!- masm [~masm@bl18-58-181.dsl.telepac.pt] has quit [Quit: Leaving.] 00:51 < drsm79> take a look at the source of the examples I posted above 00:53 < drsm79> heoa: signing off - drop me a mail (simon@cloudant) to remind me to write a walk through.

Also the same in the discussion with pictures [1][2].

[1] http://koti.kapsi.fi/~he/w.png [2] http://koti.kapsi.fi/~he/w2.png

heoa commented 12 years ago

Walkthrough to add something to CoucDB and getting it out of the DB using Backbone with situp

  1. $ git clone https://github.com/drsm79/situp.git
  2. $ cd situp
  3. $ python situp.py vendor backbone # install backbone
  4. ...
drsm79 commented 12 years ago

Started in wiki - will fill in after walking the dog...

drsm79 commented 12 years ago

https://github.com/drsm79/situp/wiki/Application-walkthrough is now complete, not especially pretty, but functional

Will do something to add a new score later in the week...