Coder Social home page Coder Social logo

armach's Introduction

Armach - ActiveRules Mach.js

A powerful framework for creating the next generation of peer-to-peer, social and interactive web sites. With ActiveRules Zero Code API you simply define your business objects and the rules for how they interact and the API endpoints are auto-generated.

Data Models

  • Data objects are stored in JSON
  • Objects have a defined JSON Schema
  • All data can be validated against its schema
  • Schema validation errors are handled in a consistent manner
  • No validation should happen at the DB library level. (i.e. Mongoose validation)
  • JSON object are converted to JavaScript objects for processing.
  • The JavaScript objects properties and methods are defined within the schema

Modules

  • Modules should only ever return validated JSON objects to ActiveRules
  • ActiveRules is responsible returning the response based on the rules defined in the schemas

Controllers

  • Controllers are modules
  • Controllers define their supported routes in JSON schema
  • ActiveRules loads the endpoint schemas for each controller
  • The controller provides a THIN layer of logic around the endpoint schema
  • The schema has rich definitions that define complex characteristics of the endpoints
  • The controller should do as little as possible before passing the request off to a module for processing
  • The module returns a schema defined object, the controller determines how to handle that response.
  • The controller uses standardized processes to return the result or error.

Errors

  • Modules create error objects, ActiveRules handles the response
  • Multiple modules may add various errors
  • ActiveRules will log some errors and return others

armach's People

Contributors

bwinkers avatar

Watchers

James Cloos 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.