Skip to content
/ model Public

Model management for Javascript based on Backbone.model

Notifications You must be signed in to change notification settings

onyxcorp/model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Model

Model is module created to help manage data with Javascript. It is based on Backbone.model. It was primarely created to be used in the Flux architecture.

The main differences from Backbone.model are:

  • No auto-sync with database, thus separating how the data is created/updated locally and how it should be done with the server;
  • No internal event system;
  • Implemented with lodash instead of underscore;
  • Completely differente validation system, this model is used toghether with jsonschema module, in order to allow for better validation and control of data

Methods/attributes overview

Attributes

  • _validTypes
  • changed
  • validationError
  • idAttribute

Methods

  • initialize
  • toJSON
  • has
  • find
  • to
  • clone
  • isNew
  • get
  • set
  • unset
  • clear
  • hasChanged
  • previous
  • previousAttributes
  • isValid
  • _checkSchema

About

Model management for Javascript based on Backbone.model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published