Questions tagged [derbyjs]

Derby.js is a full-stack JavaScript MVC framework with support for HTML templates, view bindings, model syncing, customizable persistence and conflict resolution.

Derby is a full-stack JavaScript MVC framework built on top of popular libraries, including Node.js, Express, Socket.IO, Browserify, Stylus, UglifyJS, MongoDB, and soon other popular databases and datastores. These libraries can also be used directly. The data synchronization layer, Racer, can be used separately. Other client libraries, such as jQuery, and other Node.js modules from npm work just as well along with Derby.

Features:

  • HTML templates: Handlebars-like templates are rendered into HTML on both the server and client. Because they render on the server, pages display immediately—even before any scripts are downloaded. Templates are mostly just HTML, so designers can understand and modify them.

  • View bindings: In addition to HTML rendering, templates specify live bindings between the view and model. When model data change, the view updates the properties, text, or HTML necessary to reflect the new data. When the user interacts with the page—such as editing the value of a text input—the model data updates.

  • Client and server routing: The same routes produce a single-page browser app and an Express server app. Links render instantly with push/pop state changes in modern browsers, while server rendering provides access to search engines and browsers without JavaScript.

  • Model syncing: Model changes are automatically synchronized with the server and all clients subscribed to the same data over Socket.IO.

  • Customizable persistence: Apps function fully with in-memory, dynamic models by default. Apps can also use the racer-db-mongo plugin to add MongoDB support with no change to the application code. Any changes to data made within the app are automatically persisted. Adding support for other databases is simple.

  • Conflict resolution: The server detects conflicts, enabling clients to respond instantly and work offline. Multiple powerful techniques for conflict resolution are included.

94 questions
1
vote
2 answers

Make DerbyJS only re-render certain DOM nodes

The way DerbyJS (http://derbyjs.com) seems to work at the moment is that it replaces everything in the body tag of the document whenever you click a link. Is there anyway to say use the template, but replace the content inside #main-content with…
aleayr
  • 218
  • 4
  • 13
1
vote
1 answer

derbyjs data sending understanding

I want to build a website using derbyjs. The website has articles. Every article has title (short text) and text (a lot of text) fields. Page /articles is a page where I can see titles of all articles. Clicking on article opens…
imkost
  • 8,033
  • 7
  • 29
  • 47
1
vote
1 answer

Unable to install derbyjs: "No compatible version found"

I'm trying to install derbyjs on ubuntu. I do: sudo npm install -g derby But I get this: <200 response code here> npm ERR! error installing uglify-js@2.4.7 npm http GET https://registry.npmjs.org/browser-resolve/-/browser-resolve-0.1.1.tgz npm ERR!…
imkost
  • 8,033
  • 7
  • 29
  • 47
1
vote
1 answer

Can racerJS use native mongo ObjectIDs?

I noticed that the latest commit to Racer's Mongo DB driver has to do with casting Racer's ids to Mongo ObjectIDs, any idea how to get that to work?
Dinana
  • 300
  • 3
  • 14
1
vote
1 answer

Disabling browserchannels in derbyjs

I found that even static pages (like error.js) in derby.js have an active connection with server. Maybe it makes sence for development (to have live updates for pages) but does it good for production? For example my main page is static but it keeps…
Sergey Kolesov
  • 480
  • 4
  • 16
1
vote
1 answer

The "derby" way of user authentication?

I know there are some packages like derby-auth, every-auth etc., that were written by the community/derby developers. After a research I noticed that almost all the answers about the authentication mechanics in derby are pretty much a year old. Were…
M K
  • 9,138
  • 7
  • 43
  • 44
1
vote
1 answer

Derbyjs Cannot call method expose of undefined

I want to extends query method of model, this is what i wrote: store.query.expose('todos', 'forGroup', function(group) { return this.where('group').equals(group); }); but when i run the app, console says "Cannot call method expose of undefined",…
cameron
  • 2,976
  • 3
  • 23
  • 35
1
vote
1 answer

Derby live update

I asked a question about meteor updating the view if a 3rd party updates the database directly. I've been playing with the derby examples and noticed that the view doesn't get updated if I change the data in mongo. Is derby able to change the view…
Gevious
  • 3,214
  • 3
  • 21
  • 42
1
vote
3 answers

Can Derby be used with Phonegap?

Is it possible to package a derbyjs application with phonegap? I simply have not found a single reference to anybody doing this, while meteor is a different story, so naturally I'm curious why that is.
Madsn
  • 380
  • 4
  • 9
1
vote
1 answer

Atomic operations with DerbyJS

Are there any atomic operations with DerbyJS? From the documentation it seems there are no operations like MongoDB addToSet? How does one implement this?
Mitar
  • 6,756
  • 5
  • 54
  • 86
1
vote
1 answer

Derby.js - adding/removing unique list elements

I have this as my bootstrapped data, which I push to the model when nothing is retrieved from the DB: var liveaudience = { triggers : [ { 'trigger_id': 'vocal_stomp', 'duration': 1000, 'color': '#F23000', …
Nick Jonas
  • 1,197
  • 4
  • 13
  • 24
1
vote
1 answer

DerbyJS - Can't get Mongo storage to work

I have been kidding around with Derby now for a while and am currently trying to wrap my head around the whole racer storage thing. Although I like the idea of not having any MongoDB queries hardcoded on the clientside, I can't quite get the whole…
Marcus Riemer
  • 7,244
  • 8
  • 51
  • 76
1
vote
2 answers

creating user login in derby js

It seems that basic functionality such as user login, can not be done in simple manner: to have username and password field in form on client and based on that to create store.readPathAccess model access rights. Also, how to check if user is logged…
EddieHR
  • 153
  • 2
  • 11
1
vote
1 answer

Unsubscribe on page change

I'm working on a Derby application and can't seem to figure out how to unsubscribe on page leave. I know how to unsubscribe in general, but hooking the page leave seems to be the problem. My existing code looks very similar to: get "/somePath",…
mjohnson
  • 138
  • 1
  • 9
1
vote
1 answer

How do I configure my Derby.js application to use the LESS CSS engine?

According to the Derby blog and this pull request, Derby.js has supported the LESS engine since version 0.3.1. However, I can't figure out where I'm supposed to set the configuration option to switch it from Stylus in my code. I feel like it needs…
Hal
  • 981
  • 1
  • 9
  • 22