AngularJS services : design, build, and test services to create a solid foundation for your AngularJS applications /: design, build, and test services to create a solid foundation for your AngularJS applications. (2014)
- Record Type:
- Book
- Title:
- AngularJS services : design, build, and test services to create a solid foundation for your AngularJS applications /: design, build, and test services to create a solid foundation for your AngularJS applications. (2014)
- Main Title:
- AngularJS services : design, build, and test services to create a solid foundation for your AngularJS applications
- Other Titles:
- Design, build, and test services to create a solid foundation for your AngularJS applications
- Further Information:
- Note: Jim Lavin.
- Other Names:
- Lavin, Jim
- Contents:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: The Need for Services; AngularJS best practices; Responsibilities of controllers; Responsibilities of directives; Responsibilities of services; Summary; Chapter 2: Designing Services; Measure twice, and cut once; Defining your service''s interface; Focus on the developer, not yourself; Favor readability over brevity; Limit services to a single area of responsibility; Keep method naming consistent; Keep to the top usage scenarios; Do one thing only; Document your interface. Designing for testabilityLaw of Demeter; Pass in required dependencies; Limiting constructors to assignments; Use promises sparingly; Services, factories, and providers; Structuring your service in code; Configuring your service; Summary; Chapter 3: Testing Services; The basics of a test scenario; Loading your modules in a scenario; Mocking data; Mocking services; Mocking services with Jasmine spies; Handling dependencies that return promises; Mocking backend communications; Mocking timers; Summary; Chapter 4: Handling Cross-cutting Concerns. Communicating with your service''s consumers using patternsManaging user notifications; Logging application analytics and errors; Authentication using OAuth 2.0; Summary; Chapter 5: Data Management; Models provide the state and business logic; Implementing a CRUD data service; Caching data to reduce network traffic; Transforming data in theCover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: The Need for Services; AngularJS best practices; Responsibilities of controllers; Responsibilities of directives; Responsibilities of services; Summary; Chapter 2: Designing Services; Measure twice, and cut once; Defining your service''s interface; Focus on the developer, not yourself; Favor readability over brevity; Limit services to a single area of responsibility; Keep method naming consistent; Keep to the top usage scenarios; Do one thing only; Document your interface. Designing for testabilityLaw of Demeter; Pass in required dependencies; Limiting constructors to assignments; Use promises sparingly; Services, factories, and providers; Structuring your service in code; Configuring your service; Summary; Chapter 3: Testing Services; The basics of a test scenario; Loading your modules in a scenario; Mocking data; Mocking services; Mocking services with Jasmine spies; Handling dependencies that return promises; Mocking backend communications; Mocking timers; Summary; Chapter 4: Handling Cross-cutting Concerns. Communicating with your service''s consumers using patternsManaging user notifications; Logging application analytics and errors; Authentication using OAuth 2.0; Summary; Chapter 5: Data Management; Models provide the state and business logic; Implementing a CRUD data service; Caching data to reduce network traffic; Transforming data in the service; Summary; Chapter 6: Mashing in External Services; Storing events with Google calendar; Using Google tasks to build a brewing task list; Tying the Google Calendar and Task List together; Summary; Chapter 7: Implementing the Business Logic. Encapsulating business logic in modelsEncapsulating business logic in services; Models or services, which one to use?; Controlling a view flow with a state machine; Validating complex data with a rules engine; Summary; Chapter 8: Putting It All Together; Wiring in authentication; Displaying notifications and errors; Controlling the application flow; Displaying data from external services; Building and calculating the recipe; Messaging is the heart of the application; Summary; Index. … (more)
- Publisher Details:
- Birmingham, UK : Packt Pub
- Publication Date:
- 2014
- Extent:
- 1 online resource (1 volume), illustrations
- Subjects:
- 004.654
COMPUTERS -- Programming Languages -- JavaScript
JavaScript (Computer program language)
Application software -- Development
Web site development
JavaScript (Computer program language)
Application software -- Development
Web site development
Open source software
Application software -- Development
JavaScript (Computer program language)
Web site development
JavaScript (Computer program language)
Application software / Development
Web site development
COMPUTERS -- Programming -- Open Source
Electronic books - Languages:
- English
- ISBNs:
- 9781783983575
1783983574
1783983566
9781783983568 - Related ISBNs:
- 9781783983568
- Notes:
- Note: Online resource; title from title page (Safari, viewed Sept. 17, 2014).
- Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.87939
- Ingest File:
- 01_038.xml