New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

backbone-mysql

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-mysql

A sync module for Backbone.js and Node.js for use with MySQL

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

backbone-mysql

A sync module for Backbone.js and Node.js for use with MySQL. The motivation behind this module is that most of the ORM's for Node.js are kind of crappy. They either have bugs which make them unusable or they impliment a promises interace that is not to my liking. I was also looking for something that would work mostly the same on the frontend as the backend so that our developers can learn just one framework.

Getting Started

Install the module with: npm install backbone-mysql

var Backbone = require('backbone-mysql');
var mysql = require('mysql');
Backbone.client = mysql.createClient();

var MyModel = Backbone.Model.extend({
  urlRoot: '/users'
});

var example = new MyModel({ id: 1 });
example.fetch({
  success: function (model, response, options) {
    model.save({ name: 'Foo' }, {
      success: function (model, response, options) {
        // Do somthing awesome here.
      }
    });
  }
});

Since the promises/callback pattern for Backbone is not very Node.js-ish I would recommend using https://npmjs.org/package/backbone-callbacks to make things feel more native.

Documentation

(Coming soon)

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

v0.1.0 Inital Development Release

License

Copyright (c) 2012 Chris Cowan
Licensed under the MIT license.

FAQs

Package last updated on 22 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc