Giter Club home page Giter Club logo

angular-model-factory's Introduction

modelFactory Build Status Codacy Badge

A light-weight model layer that bridges the gap between AngularJS and your RESTful APIs.

Why would you use this over other available solutions?

  • Lightweight/Simple, the code simply does some basic copy/extending and prototypical instances; no magic required.
  • Patterns/Practices, the model definition closely resembles Angular's ngResource meaning its easy to swap out, replace later (if ngResource gets awesome suddenly), eases scaling new devs / organizations, and its designed for Angular; not a backbone port!
  • Utilizes Angular at the core, it doesn't duplicate things Angular already does. Any action can be passed a $http configuration option, all your interceptors still work, it uses Angular's cache, etc!
  • Compliant, URI Template matches the specs.
  • 1.45KB gzipped/minified ( excludes depedencies )
  • Minimal Dependencies, only use URI template and deep-diff ( this isn't even required ) utility. NO underscore, lodash, jquery, etc!
  • Its full of awesome features

See wiki for documentation.

Features

  • URI Templates (RFC6570)
  • Model instances
  • Collections
  • Single Datastore
  • Caching / Cache invalidation
  • Default value population
  • Pending / Completed Status
  • Relationships
  • Object Deep Diff / Reversion
  • Track active promises to prevent duplicate sends

Dependencies

Development

Prepare your environment

  • Install Node.js and NPM (should come with)
  • Install global dev dependencies: npm install -g bower grunt-cli
  • Install local dev dependencies: npm install && bower install in repository directory

Development Commands

  • grunt build to concat and build
  • grunt karma for continuous testing mode with karma (useful during development as tests will be run on each change)
  • grunt karma:ci for a one-time execution of the tests (used by Travis)

Contributing

  • Run the tests
  • Create a feature branch
  • When issuing a pull request, please exclude changes from the "dist" folder to avoid merge conflicts.

angular-model-factory's People

Contributors

amcdnl avatar juristr avatar rywhee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.