ololo-psh / AngularJS-ORM

Example of scalable architecture for my NG-Conf 2014 talk

Home Page:http://www.youtube.com/watch?v=Iw-3qgG_ipU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AngularJS-ORM - Example of scalable architecture

The project demonstrates ways to leverage ui-router to the greatest of it's abilities, how to keep your controllers down to 1 line of code, how to organize your services in a completely simplified manner, and how to leverage resolves like a god. Keeping your application down to a tiny handful of directives. Avoid the nightmare of lifecycle, transition, and session/stateful bugs. How to keep your $scope clean and tidy. It doesn't require using controller as and it doesn't turn everything into directives. Write your code to be angular-agnostic. Use the router to manage state, sessions and collections allowing you to avoid the problems addressed with complicated flux architectures. Sharing references means no more watchers and subscribers strewn across your app.

Resources

ES6 Syntax

I use ES6 because it gives me easy-to-code classes and because the last line is always returned in arrow functions (which is great for promise chaining). You do not have to use ES6, and should not refactor into it 'just because'.

How To Read

Javascript:

function( x, y, z ){
  return z
}

function x(z) {
  // constructor
  this.y = z;
}
x.prototype.method = function(){}

ES6

( x, y, z ) => {
  this.whatever // `this` is bound to OUTER scope
  z // last line of functions are always returned
}

class x {
  constructor(z) {
    this.y = z;
  }
  method(z) {}
}

About

Example of scalable architecture for my NG-Conf 2014 talk

http://www.youtube.com/watch?v=Iw-3qgG_ipU


Languages

Language:JavaScript 88.1%Language:HTML 11.0%Language:CSS 0.9%