O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data-oriented Development with AngularJS

Book Description

Write DSLs for your user interface code using AngularJS directives and add real-time capabilities to your applications using AngularFire's three-way data binding with Firebase

In Detail

AngularJS is one of the most popular JavaScript frameworks used to write single page applications and is suitable for developing large-scale enterprise applications. With Firebase, you can easily store and sync data in real time. It has libraries for all the major web and mobile platforms (including AngularJS) and bindings for the most popular frameworks (such as Node.js).

Data-oriented Development with AngularJS is a systematic learning guide that covers important AngularJS concepts such as data binding, dependency injection, directives, and so on. It also covers the basics of Firebase and three-way data binding with AngularFire. You'll be able to create a small project and build a real-time application using Firebase and AngularJS. This project uses most of the concepts and best practices learned in the book so that you can apply the very same principles in real-world AngularJS development.

What You Will Learn

  • Experience the power of two-way data binding using AngularJS and three-way data binding using Firebase
  • Use dependency injection in AngularJS
  • Get the $http and $resource services to work with REST APIs
  • Realize the full power of AngularJS by writing custom elements, attributes, and so on, using directives
  • Create real-time apps using Firebase and AngularJS
  • Discover the benefits and uses of Node.js, Yeoman, Yo Angular generator, Grunt, and Bower
  • Get to grips with the basics of Git and use Git flow for a more productive Git branching workflow

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Data-oriented Development with AngularJS
    1. Table of Contents
    2. Data-oriented Development with AngularJS
    3. Credits
    4. About the Author
    5. Acknowledgments
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. AngularJS Rationale and Data Binding
      1. Frameworks versus libraries
      2. AngularJS versus server-side MVC frameworks
      3. AngularJS versus other frontend JavaScript frameworks
      4. Why AngularJS?
      5. Data binding
      6. AngularJS Hello World!
      7. Two-way data binding
      8. Collection binding
      9. Routes
        1. Other AngularJS directives
      10. Organizing AngularJS applications
      11. Summary
    10. 2. Working with Data
      1. Dependency injection
      2. Filters
      3. Promise
      4. The $q service
      5. The $http service
      6. The $resource service
        1. Node.js and Express-based API sample
        2. A better $http service
      7. Summary
    11. 3. Custom Controls
      1. Directives
        1. Defining a directive
        2. Directive compilation phases
        3. Normalization
        4. Directive types
        5. Directive scopes
      2. Writing directives
        1. Custom attributes
        2. Custom elements
        3. Isolate scopes
          1. The =attr option in the scope
          2. The @attr option in the scope

          3. The &attr option in the scope
          4. Transclusion
          5. Custom classes
          6. Directives that manipulate the DOM
          7. Communication between directives
      3. Summary
    12. 4. Firebase
      1. Persistence
      2. What is Firebase?
        1. Firebase – benefits and why to use?
      3. Firebase use cases
        1. Apps with Firebase as the only backend
        2. Existing apps with some features powered by Firebase
        3. Both client and server code powered by Firebase
        4. Firebase is the API for your product
      4. Getting started with Firebase
        1. Installing Firebase
      5. Structuring data
        1. Denormalizing data
      6. AngularFire
      7. Summary
    13. 5. Getting Started with AngularFire
      1. AngularFire
        1. Synchronized arrays with $firebaseArray()
        2. Real-time applications
        3. Synchronized objects with $firebaseObject()
      2. Three-way data binding
      3. Authentication
      4. Summary
    14. 6. Applied Angular and AngularFire
      1. Firebase anonymous authentication
      2. Difference between a factory and a service
      3. Summary
    15. A. Yeoman
      1. NPM
      2. Yeoman
      3. Grunt
      4. Bower
    16. B. Git and Git Flow
      1. Initial Git setup
      2. Using Git
      3. Using Git flow
      4. GitHub and Bitbucket
    17. C. Editors and IDEs
      1. Emacs
      2. Vim
      3. Sublime Text
      4. Visual Studio and Visual Studio Express
      5. Eclipse
      6. Brackets
      7. WebStorm
    18. Index