Skip to content

New FCC Models, Service, Controller, Module and Class layers

Compare
Choose a tag to compare
@pilsy pilsy released this 07 Jun 10:18
· 375 commits to master since this release
  • New First Class Citizen Models allow a single definition of a model that works with both ORM and ODM modules
  • New Service Layer provided from the Classes util, to work with FCC Models, API has been standardised for use with both ORM and ODM modules
  • Removed BaseService
  • Controller has been modified to use a newer version of clever-controller that allows ObjectId's to be used as id's in routes.
  • Controller has been updated to work with the new Service Layer.
  • Module Layer has been changed, you now need to return Module.extend() from your module instead of returning a new instance that you created inside module//module.js
  • All Module classes now have a this.debug() helper to simplify the debugging process, to debug any module simply set environment variable DEBUG to the camelcased name of the module (clever-orm = cleverOrm)
  • Modules now have their package.json file loaded and exposed as Module.pkg
  • Hooks have been reorganised and optimised for all changes
  • Modified the Module Loader to work with the new Module Layer
  • New DEBUG environment variable names, DEBUG=Services,Models,Modules,ModuleLoader
  • New injector magic module, require( 'injector' )