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
3
votes
1 answer

Including JS files in Derby.js

I am trying to learn Derby.js and I am having a lot of trouble. I know I can include packages such as jQuery through npm and add it to the node_modules folder, but this isn't quite what I want to do. I want to be able to include these files like I…
rwwagner90
  • 360
  • 3
  • 16
3
votes
0 answers

Is server-side Javascript ready for the mainstream?

I expect within a few years that the server side programming landscape will look very different and Javascript will be extremely popular. That's just my personal opinion. But what about in the here and now, is Javascript a valid choice of server…
sonicboom
  • 4,928
  • 10
  • 42
  • 60
3
votes
1 answer

Meteor on the Frontend, Express on the Backend (NodeJS)

For a site that wants the "realtime" "reactivity" that Meteor provides on the frontend app, and have a job processing backend (something like Kue), clearly the frontend app benefits from Meteor. The backend processing does not need the reactivity of…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
3
votes
3 answers

NodeJS - MongoDB triggers

I'm trying to develop a Log Viewer using DerbyJS, Racer and MongoDB. The logs will be inserted into the MongoDB database by a different source continuously, and my Log Viewer should be able to update the Logs Table on the user interface…
F. Santiago
  • 842
  • 10
  • 18
2
votes
0 answers

Derby Database Log file

How can we change location of derby.log file in derby database? Whenever derbynet.bat file is executed a derby.log file is created at its calling place, how can we change where the derby.log file is created?
Jyoti
  • 21
  • 2
2
votes
1 answer

Server side query rerun for paging, sort or filtering

What is the best approach to rerun a server query/subscription for a specific connected client when some data on that client changes? This would be very useful for server side filtering, ordering or paging. For example, the client has a table with…
Rui Gonçalves
  • 1,164
  • 8
  • 15
2
votes
1 answer

derbyJS - know who made the changes in real-time

I am looking to the derby multiplayer notepad. I am wondering what would be the best way to implement something like a cursor for the other people editing. Something like in google docs / etherpad for instance. In general, I am looking for the…
nha
  • 17,623
  • 13
  • 87
  • 133
2
votes
0 answers

Deploy coffeescripted derbyjs app to heroku

When deploying to heroku I get the following error log: 2013-08-05T18:14:39.217252+00:00 heroku[web.1]: State changed from crashed to starting 2013-08-05T18:14:43.819448+00:00 heroku[web.1]: Starting process with command `node…
Joehannes
  • 301
  • 2
  • 9
2
votes
2 answers

How to add an item to a collection in RacerJs DerbyJs?

I want to add an item to a collection using RacerJs/DerbyJs, but it just doesn't work. I must be really overlooking something... What I tried model.set('news', [ { text: "something" } ]); And that does set a news-item. However, when I do this…
Willem Mulder
  • 12,974
  • 3
  • 37
  • 62
2
votes
1 answer

derby - Automatic "refresh" on changes

I'm experimenting with derbyjs and can't figure out how those realtime updates using subscriptions work. Currently, the app is just an as basic as possible list of post-titles and a textfield at the end where one can add a new post:
Van Coding
  • 24,244
  • 24
  • 88
  • 132
2
votes
1 answer

derbyjs running code on server from x-bind

I'm trying to run some server only code from an event on the client in derby.js I'm using x-bind to bind the event on the view like so: click me and on the app: exports.func=function(e,el,next){ // i want to…
2
votes
0 answers

Derby app created using 'derby new test' not working

I've installed derbyjs using npm install -g derby and then created a test app using derby new test. Then i started the app using node server.js and I got the following output: info - socket.io started Starting cluster with 1 workers in undefined…
Van Coding
  • 24,244
  • 24
  • 88
  • 132
2
votes
2 answers

Using imported docs from MongoDB in DerbyJS

I have a MongoDB collection with data that was not saved through my Derby app. I want to query against that and pull it into my Derby app. So, I figured that out and here's the code to do it: get '/:year', (page, model, params) -> query =…
switz
  • 24,384
  • 25
  • 76
  • 101
1
vote
1 answer

Cannot update during an existing state transition (such as within `render` or another component's constructor)

In the code below _updateQID method is triggered on emitting event 'Questions.updateHeader' by another component. when emitted event and triggered _updateQID i get below warning in console: Warning: forceUpdate(...): Cannot update during an…
kapeskittu
  • 41
  • 1
  • 4
1
vote
2 answers

DerbyJS get model as array

I want to be able to get a collection as an array so that I can in the template use {{each}} on it. It is a collection of users, which are objects, {{each}} doesn't work with objects
msj121
  • 2,812
  • 3
  • 28
  • 55