Dependency Injection with AngularJS and over 2 million other books are available for Amazon Kindle . Learn more


or
Sign in to turn on 1-Click ordering.
Trade in Yours
For a £4.86 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Colour:
Image not available

 
Start reading Dependency Injection with AngularJS on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Dependency Injection with Angularjs [Paperback]

Alex Knol
2.7 out of 5 stars  See all reviews (3 customer reviews)
RRP: £22.21
Price: £18.99 & FREE Delivery in the UK. Details
You Save: £3.22 (14%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon. Gift-wrap available.
Want it Monday, 27 Oct.? Choose Express delivery at checkout. Details

Formats

Amazon Price New from Used from
Kindle Edition £12.35  
Paperback £18.99  
Trade In this Item for up to £4.86
Trade in Dependency Injection with Angularjs for an Amazon Gift Card of up to £4.86, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Book Description

18 Dec 2013 1782166564 978-1782166566

If you want to start using AngularJS for real, this is the book you need. Its down-to-earth practical approach will quickly teach you all you need to know about dependency injection utilizing this versatile framework.

Overview

  • Understand the concept of dependency injection
  • Isolate units of code during testing JavaScript using Jasmine
  • Create reusable components in AngularJS

In Detail

Dependency injection facilitates better testing by allowing us to mock dependencies in testing environments so that we only test one thing at a time. It also enables us to write more maintainable code by decoupling our objects from their implementations. The motivation for using it in AngularJS is to make it easier to transparently load mocked objects in tests.

This book is a practical manual to get you started on dependency injection. It will also take you along the road to creating testable and reusable code. Ensuring productivity and stability are the two most important things that you will learn.

"Dependency Injection with AngularJS" will introduce you to AngularJS using a simple sample project. By portraying different ways of developing code modules, it will show you the advantages of dependency injection. This will lead to the ability to create reusable components that can easily be tested.

You will learn everything you need to know how to use dependency injection with AngularJS.

What you will learn from this book

  • Create reusable components propelled by the independence of components from each other
  • Run tests on real browsers using the Karma test runner
  • Set up Jasmine BDD testing
  • Set up and install AngularJS
  • Change coupled code to loosely coupled injected dependencies
  • Create integration tests using Protractor
  • Organize large applications using dependency injection

Approach

This book is a practical, hands-on approach to using dependency injection and implementing test-driven development using AngularJS.

Who this book is written for

Dependency Injection with AngularJS is aimed at developers who are aware of AngularJS but need to get started with using it in real life applications. Also, developers who want to get into test-driven development with AngularJS can use this book as practical guide. Even if you know about dependency injection, it can serve as a good reference on how it is used within AngularJS. Readers are expected to have some experience with JavaScript.


Special Offers and Product Promotions

  • Between 20-26 October 2014, spend £10 in a single order on item(s) dispatched from and sold by Amazon.co.uk and receive a £2 promotional code to spend in the Amazon Appstore. Here's how (terms and conditions apply)

Frequently Bought Together

Dependency Injection with Angularjs + AngularJS
Price For Both: £34.18

Buy the selected items together
  • AngularJS £15.19

Customers Who Bought This Item Also Bought


Product details

  • Paperback: 78 pages
  • Publisher: Packt Publishing (18 Dec 2013)
  • Language: English
  • ISBN-10: 1782166564
  • ISBN-13: 978-1782166566
  • Product Dimensions: 19.1 x 0.4 x 23.5 cm
  • Average Customer Review: 2.7 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: 1,532,177 in Books (See Top 100 in Books)

Product Description

About the Author

Alex Knol

Alex Knol is a lifelong tech geek with a passion for automation. After spending some years away from software development, around the beginning of this century, he took up PHP development based on his early experiences with C and Pascal. Surprisingly, he has never really used web tools, but applications instead, to make websites, such as the platform that's driving kaizegine.com. Having built various applications using web technologies and frameworks, such as Symfony, he discovered AngularJS at the beginning of 2008, while searching for a way to structure frontend application code and make development easy. He used AngularJS, among other technologies, for a job-matching project in the Netherlands and, more recently, for an online website designer named Risingtool.com.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

2.7 out of 5 stars
2.7 out of 5 stars
Most Helpful Customer Reviews
1 of 1 people found the following review helpful
Format:Paperback|Verified Purchase
I've bought several Packt Publishing books over the years, notably for Silverlight, and been astounded at how poor their titles have been. They need an editor who understands technology and what makes a good book. On Twitter their name frequently shows up as a company prepared to pay money to anyone to write a book, whether they have credibility or real knowledge or not. I learnt to avoid them, but then they released "Mastering Web Application Development with AngularJS" which turned out to be one of the best Angular books on the market.

So I decided to check out their other titles.

This is a huge disappointment. It's more a pamphlet than a book. 63 pages of editorial content, the first four of which are the usual "Who this book is for", "Customer Feedback" filler. The print size is big for such a small book. 20% in and the so-called subject matter of the book hasn't been covered. Instead we get a tedious "Hello world" Angular sample that is covered so clumsily, with references to so many irrelevant bits and pieces that a beginner can only get confused. This stuff isn't difficult. If Dan Wahlin can explain a lot of the complexity of Angular in an "Angular in 60-ish Minutes" book (or at his ng-conf talk "in 20-ish minutes") then a book like this should be able to explain a trivial "Hello World" example in far less space than it does here. The English is grammatically incorrect as if no native English speaker got to proof-read it (what are publishers like Packt Publishing doing for their money?) The language is flowery without imparting any real knowledge at all. Here's a sentence from page 6 of the book: "When you are used to working with tools such as jQuery or Prototype, a new dimension and a model, will be added to your world." Well thanks for that!
Read more ›
Comment | 
Was this review helpful to you?
Format:Kindle Edition
This is a short book (63 pages in my PDF copy) which, according to its subtitle, aims to teach you to “Design, control, and manage your dependencies with AngularJS dependency injection.”

It starts off by introducing Angular in a fairly standard way in chapter 1. The next chapter introduces some concepts around clean code, the SOLID principles and Dependency Injection itself, then chapter 3 shows how DI works in AngularJS. Chapter 4 covers testing, and finally chapter 5 discusses management of large applications and code-bases.

The book is well-written and edited, clear and concise, and I found it easy to read and follow. The examples are mostly simple and get the point across, but this is not an in-depth or exhaustive tutorial. In the Testing chapter, in particular, the author covers a wide range of Angular testing practices, including Jasmine, Karma, and Protractor, but I would have liked to see more detail in the unit-testing pages, which is where Angular’s dependency injection facilities really shine. The examples given show the use of the inject function from Angular Mocks, and the use of a Scope and a Service stub to test a controller, but no mention is made of other Angular features designed to make testing easy, such as the mock-able $window and $timeout services provided in the core framework. The mention of Karma as a test runner is pertinent, but I question the inclusion of Protractor in the chapter since this is a top-level, end-to-end, integration testing tool, and so has no relevance to Dependency Injection.

In the end, my only real criticism of this book is its title (yes, I am judging it by its cover).
Read more ›
Comment | 
Was this review helpful to you?
4.0 out of 5 stars Good for beginners, not enough for experts 22 Jan 2014
Format:Paperback
With this book about AngularJS Dependency Injection, Alex Knol attempts to focus on one but surely the most important part of AngularJS components.

You'll first find a brief introduction about AngularJS, how to setup, and samples to get started. The book will then guide you through good practices and to the why and the how dependency injection helps your application to scale with new features. It covers the SOLID principles, and the complex subject of unit and functional (or e2e) testing with many code samples. Also it suggests code architecture to avoid your application to become a giant mess of .js files.

About the book itself, while it remain a very good introduction to enterprise level application with AngularJS, it stills focus on the essential of the dependency injection component of AngularJS. Experts won't find here a complete description of all the facets of the library (factories, providers, container hooks and building process...). On the other hand, beginners and intermediate programmers will have a good vision of the power of dependency injection done right with AngularJS.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 2.1 out of 5 stars  7 reviews
5 of 5 people found the following review helpful
1.0 out of 5 stars Incoherent, rambling pamphlet that is seriously overpriced and fails to live up to its title 22 Jan 2014
By I. D. Smith - Published on Amazon.com
Format:Paperback
I've bought several Packt Publishing books over the years, notably for Silverlight, and been astounded at how poor their titles have been. They need an editor who understands technology and what makes a good book. On Twitter their name frequently shows up as a company prepared to pay money to anyone to write a book, whether they have credibility or real knowledge or not. I learnt to avoid them, but then they released "Mastering Web Application Development with AngularJS" which turned out to be one of the best Angular books on the market.

So I decided to check out their other titles.

This is a huge disappointment. It's more a pamphlet than a book. 63 pages of editorial content, the first four of which are the usual "Who this book is for", "Customer Feedback" filler. The print size is big for such a small book. 20% in and the so-called subject matter of the book hasn't been covered. Instead we get a tedious "Hello world" Angular sample that is covered so clumsily, with references to so many irrelevant bits and pieces that a beginner can only get confused. This stuff isn't difficult. If Dan Wahlin can explain a lot of the complexity of Angular in an "Angular in 60-ish Minutes" book (or at his ng-conf talk "in 20-ish minutes") then a book like this should be able to explain a trivial "Hello World" example in far less space than it does here. The English is grammatically incorrect as if no native English speaker got to proof-read it (what are publishers like Packt Publishing doing for their money?) The language is flowery without imparting any real knowledge at all. Here's a sentence from page 6 of the book: "When you are used to working with tools such as jQuery or Prototype, a new dimension and a model, will be added to your world." Well thanks for that!

At the time of writing there is just one other review - for four stars. I can only assume it was written by a friend of the author. The book is seriously over-priced, incoherent and rambling and fails to meet its stated goals. I have no idea why it's called "Dependency Injection" since it's really just a random set of thoughts on bits of Angular or principles of SOLID (3 pages explaining what the acronym means in a section entitled "the theory behind Dependency Injection"). It's like a bad student took all the little bits of knowledge he'd picked up and just threw them on a page and said "Let's call it a book".

The sample code is poorly presented (eg script libraries have spaces after the . separators) and the code was written to Angular v1.04

Don't waste your money. There are far better resources out there. For just a little bit more cash you can buy a book with ten times the page count and ten times the teaching quality of this pamphlet ("ng-book")
2 of 2 people found the following review helpful
1.0 out of 5 stars Awful 21 Mar 2014
By moppy - Published on Amazon.com
Format:Paperback
Unfortunately this book is quite useless.

So many many errors (did anyone check the code?) and most content is just a bad copy of the AngularJs official website.
2 of 2 people found the following review helpful
3.0 out of 5 stars Worth it's price? Not really! 3 Feb 2014
By Arun Mahendrakar - Published on Amazon.com
Format:Paperback
This is a pretty small book, about 80 pages or so. The core of the book is about how Dependency Injection happens in AngularJS.

The third chapter 'The Magic' talks all about how this happens. Author also talks the issues faced when you minify your .js files and how ngmin helps you in this regard. So it is the most interesting chapter in the book.

The last chapter gives some layout ideas for large applications that you might want to consider.

The whole concept of DI in AngularJS is more of a blog article, not sure if a book is required for that. In fact, in the third chapter, the author does provide a blog ([...]) where the exact same information is available (for free).

The chapter on Testing could have been even more detailed. The author could have shown some of gotchas and tips on how to debug end-to-end tests written in Protractor.
1.0 out of 5 stars Not worth it... 6 Jun 2014
By P. Haydon - Published on Amazon.com
Format:Paperback
I mainly bought this for the Unit Testing aspect of Angular, but being such a short read I read the entire thing...

The book is full of errors, it read like a rough cut that no one has bothered reviewing, and often parts that should be explained are just shrugged off by pointing the reader to the documentation.

I wouldn't recommend this book to someone wanting to learn Angular or a seasoned programmer. It's just not a good book.
1.0 out of 5 stars Virtually nothing about Dependency Injection in AngularJS. 17 Mar 2014
By Amazon Customer - Published on Amazon.com
Format:Kindle Edition
This book is essentially includes a very brief example AngularJS app (from the perspective of a beginner), a section on Dependency Injection you could read on Wikipedia, and a very technically light section on testing Angular apps.

What this book did not cover was the fundamental concepts of AngularJS Dependency Injection:
- Deep dive on the purpose of AngularJS modules.
- Using Angular's DI constructs: services, factories, concepts, or providers (in fact, almost none of this is talked about).
- Organizing your code base to be take advantage of DI (composition of services and artifacts; one of the fundamental benefits of DI).

In fact, this book made me very angry. The title implies some deep dive into Angular's DI semantics. I thought I was going to have a manual that spoke to advanced Angular topics. Instead, this is basically a 10 minute introductory tutorial on Angular, Jasmine and Karma. You don't even get a break down of the API's.

For better coverage on this topic, I highly recommend Mastering Web Application Development with AngularJS (http://amzn.com/B00EQ67J30).
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Look for similar items by category


Feedback