Skip to content

Instantly share code, notes, and snippets.

@linnykoleh
Forked from w3cj/papa.md
Created April 18, 2017 03:54
Show Gist options
  • Save linnykoleh/b566f98519132423f1efbc5fe18ae117 to your computer and use it in GitHub Desktop.
Save linnykoleh/b566f98519132423f1efbc5fe18ae117 to your computer and use it in GitHub Desktop.

PluralSight 6 month trial

PluralSight John Papa Course:

AngularJS Patterns: Clean Code

John Papa Slides


Angular 1 vs Angular 2


Examples of the John Papa Style:

https://github.com/johnpapa/ng-demos


Seperation of Concerns

02 PDF


Examples of Refactor

ng-demos/modular/app/avengers.js
ng-demos/modular/app/avengers-spaghetti.js
ng-demos/cc-bmean/app/sessions.js
ng-demos/cc-bmean/app/sessions-spaghetti.js //comments

LIFT Principal

Style Guide: LIFT

  • Locating our code is easy
  • Identify code at a glance
  • Flat structure as long as we can
  • Try to stay DRY (Don’t Repeat Yourself) or T-DRY

Take a look at:

cc-bmean/app/speaker/speakers.js

What is datacontext?

Where is it?


Right where you think it is...


03 PDF - Slide 25

Common Starting Structure Evolved


05 PDF

coding style


Live Refactor

Todo App


Yeoman Generators

http://yeoman.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment