Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RealDay: Angular.js

RealDay: Angular.js

A small introduction to Angular.js presented on one of the company's training days.

More Decks by Miguel Schmitz Grazziotin

Other Decks in Programming

Transcript

  1. UÁT? • Open Source Javascript Framework • Aims for making

    “simple” apps and SPAs development easier • Does it by extending HTML itself
  2. Bai rro? • Miško Hevery @ Google, 2009 • Used

    @ Google to write an app in 3 weeks (1 dev) while it took 6 months (3 devs) • Open sourced on Github (with 362 open PRs just yesterday)
  3. UÁI? • A self-claimed opinionated JS framework (while Backbone.js presents

    itself as library) • Maintained by Google and community • Don’t believe everyone, Angular and your code doesn’t HAVE to be ugly
  4. The Zen of Angular • Decouple DOM manipulation from app

    logic, as well as client and server sides code • The framework should guide the developer • Make common tasks trivial, difficult tasks possible
  5. How does it work? • Since HTML is great for

    static pages, Angular makes it amazing for dynamics too • Add directives (built-in or custom) to HTML • Declarative programming for your interface
  6. How does it work? • Modularize your business code with

    Model- View-Glue architecture • Take advantage of routers, partials and all the nice stuff • Imperative programming for your app’s code
  7. • Native two-BELOVED-way data binding <3 • In one side

    the View observes and shows model’s state, in another it also notifies the Controller of any user interaction and the controller manages the model to do the server-side part (also built-in form validation!) How does it work?
  8. Worth mentioning: pros... • Easy to learn and get started

    • Testing support and incentive • Agnostic, modularized and small JS code • Google and community support • Great philosophy • Guides, but doesn’t lock! • D.R.Y.
  9. …and cons • Takes longer to fully learn since it

    provides many “native” modules for a complete dynamic web app • Angular abstraction comes at a cost of flexibility, it was built with the CRUD application in mind, keep this in mind
  10. Silver bullet? Well designed for sure, in a time of

    modern Javascripts frameworks it surely is a great competitor and, for the kind of problems it wants to solve/help/guide, probably the best choice for a quick development with quality code.