Jump to ratings and reviews
Rate this book

AngularJS Services

Rate this book
Design, build, and test services to create a foundation for your AngularJS applications About This Book
Understand how services are a vital component of the AngularJS framework and how leveraging services can benefit your application
Design and structure your AngularJS services and learn the best practices used in designing AngularJS services
Effectively write, test, and finally deploy your application
Who This Book Is For

If you are an intermediate JavaScript developer who is looking to enhance your understanding of single-page web application development with a focus on AngularJS services, then this book is for you.

What You Will Learn
Write Jasmine scenarios to test your AngularJS services
Implement common functionality that can be leveraged by the controllers, directives, and other services in your application
Build services that create, retrieve, update, and delete your application's data on external servers
Incorporate third-party JavaScript libraries into your AngularJS application
Move business logic to the client side to build a new class of serverless applications
Optimize your AngularJS application for maximum performance
In Detail

This book provides you with the skills and best practices needed to create AngularJS services. It starts with the fundamentals of what services are and their role in a typical AngularJS application. You will walk through the development of a real-world application using services across the various application layers and then move on to create services that provide cross-cutting concerns such as messaging, logging, and authentication.


Next, the book covers services that provide data access showing you how to interact with external cloud-based data services and how to cache data on the client to reduce network latency. The book then shows you how to write services that leverage other cloud-based services to create mashups and include functionality in your application without writing a lot of code.


You will also learn how to create business logic objects, rules engines, and finite state machines, which can be used to provide business logic for your application.

154 pages, Kindle Edition

First published August 21, 2014

12 people want to read

About the author

Jim Lavin

5 books

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
4 (28%)
4 stars
7 (50%)
3 stars
2 (14%)
2 stars
1 (7%)
1 star
0 (0%)
Displaying 1 - 6 of 6 reviews
9 reviews
November 16, 2014
Pros

I have completed around 4 chapters of this book.And it's a really good read.

This is a concise book (~ 140 pages), were directly targeted to the most needed materials about the AngularJS Services.

This book provides you with the skills and best practices needed to create AngularJS services.

It starts with the fundamentals of what services are and their role in a typical AngularJS application.

Then you will learn the development of a real-world application using services across the various application layers and then move on to create services that provide cross-cutting concerns such as messaging, logging, and authentication.

Next, the book covers services that provide data access showing you how to interact with external cloud-based data services and how to cache data on the client to reduce network latency.

The book then shows you how to write services that leverage other cloud-based services to create mashups and include functionality in your application without writing a lot of code.

You can also learn how to create business logic objects, rules engines, and finite state machines, which can be used to provide business logic for your application.

Cons

It's better if the source code of this book can put on the Plunker.Then readers can easily change the things and test lively.It'll give huge value for this book. Especially for the eBook readers.

The Author has mentioned lot of external libraries and about some good concepts.But unfortunately the author has not provided external links for such materials.Which is really poor.

The other problem is with this book is the lack of images and charts for the concepts and the sample app's architecture. This book is having a lot of wording without proper image explanations.As a result, it's somewhat boring to read this book.

The other issue where I have about this book is with the formatting of the Code snippets.Currently it's in Black and White (mono) way. It should require as color syntax code for better reading experience.

My review on My Tech Blog : http://sampathloku.blogspot.com/2014/...
1 review1 follower
November 10, 2014
angular-services-bookAngularJS brings many useful features to JavaScript application development, such as unobtrusive data-binding and the ability to add functionality to HTML through directives but one of the often overlooked killer tools is the dependency injection framework. By decoupling the construction of code components from the components themselves developers are able to focus on the actual business functionality of their components.

At the core of AngularJS dependency injection is the concept of a service. Due to some unfortunate naming conventions and the ability to define services in a number of different ways, this concept is often confused and underused with Angular application developers pushing too much code into their controllers. Services are a key element of structuring your application effectively - both for testability and maintainability.

In his new book, Angular Services, Jim Lavin guides the new and intermediate AngularJS developer through all the service related concepts and describes numerous good practices for defining, testing and using services in your Angular apps.

I like how the programming principles are laid out in general as well as showing how this is implemented in the Angular environment. Much of the book could apply to almost any dependency injection framework. I was also pleased to see so much focus on testing and testability. This is a key software engineering topic that has traditionally been overlooked in many JavaScript development projects. Hopefully the reader will be inspired to work more testing into their own projects after finishing this book.

As with any set of guidance the reader should consider each piece of advice carefully as there is no such thing as a one-size-fits-all approach to software engineering. There is plenty in this book to think about and work into your own projects. Even the most advanced programmers are likely to find something useful in these pages.
Profile Image for Adnan.
2 reviews30 followers
November 7, 2014
Angular JS services by Jim Levin is a delightful addition to a topic which isn’t discussed as much as the framework itself. Angular, as a powerful structural framework for dynamic web apps has been topic of various well publicized texts. However the services, which provide the core of backend functionality, don’t get much lime-light. c’est la vie.

In Angular, services are designed as substitutable objects that are wired together using dependency injection (DI); therefore the understanding of law of demeter is quite important. Author started with fundamentals without much ado, and seamlessly transitioned into discussion about testability, mocking, data management and business logic handling. Handling cross cutting concerns (chapter 4) and Mash-ups (chapter 6) are especially interesting topics. BDD using Jasmine spies (test doubles) is also a treat for behavior-driven development fans.

The notion of designing services, tenets, best practices and architecting services for testability are topics every developer should pay attention to. Levin discusses service building best practices, factories and providers in a concrete and concise fashion with easy to understand code samples.

The book assumes that one is already familiar with JavaScript and have some experience writing applications using Angular. The quality of print vs. cost is a letdown; I hope it improves in next editions.

[Disclaimer] I have received the review copy from the publisher.
7 reviews1 follower
November 7, 2014
First of all if you are new to AngularJS, don't pick this book with assumption that you will catch basic framework too. In fact, this book is about a particular topic of Angular JS aka Services. Angular JS is a great and growing framework for SPA and web based apps. Following logic of separation of logic and view layer, Angular provide a solid base for development of large and mid scale projects.

Author described not only Services but also building best practices, providers and factories are explained in easy to understand and follow manner. Practical examples showing how to develop AngularJS services and also how to test them with use of mock data and mock timers. Use case of authenticating with oAuth is something which is really useful. Chapter 6 is focused on using external services inside AngularJS services. Chapter 7 is completely focused on models & services and when to use which feature of AngularJS out of these two while implementing business logics.

Overall a must have book on AngularJS services and architecture in general.


Disclaimer: I got a review copy from publisher. You can get book from their website
Profile Image for Luca Morettoni.
7 reviews
October 7, 2014
This book is not for the faint of heart!
If you're looking for a book about Angular, this is not what're looking for! Instead, if you need to improve the knowledge about the services in the Angular framework this is the right choice!

The author start with a very deep description of the Angular.js services (what they do and what they don't do), using real examples and giving you a lot of solutions for day by day usage! The chapters about integration of external services are also a very useful reading and a good source of ideas for your implementations, and the testing chapter is very complete and full of useful code.

Only one side effect: when you finish reading the book you need to drink a good beer!
4 reviews
October 12, 2014
I have been reading some other books about AngularJS. This book require good knowledge about AngularJS. The book is all about how you should handle and solve the problem you could face in the reality of building AngularJS Services.

My experience of AngularJS is not that good, have been using it for some small projects. But I was able to follow the different solutions in the book. I think it's a good book to read through and then have in the bookshelf. If I'm facing problem in future projects it's a good book to have as a reference.

Got the book from http://bit.ly/1px3NCW
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.