E-book details

Mastering Ninject for Dependency Injection. For .NET developers and architects, this is the ultimate guide to the principles of Dependency Injection and how to use the automating features of Ninject in the most effective way. Packed with examples, diagrams, and illustrations

Mastering Ninject for Dependency Injection. For .NET developers and architects, this is the ultimate guide to the principles of Dependency Injection and how to use the automating features of Ninject in the most effective way. Packed with examples, diagrams, and illustrations

Daniel Baharestani

Ebook
Dependency injection is an approach to creating loosely coupled applications. Maintainability, testability, and extensibility are just a few advantages of loose coupling. Ninject is a software library which automates almost everything that we need in order to implement a dependency injection pattern.

Mastering Ninject for Dependency Injection will teach you everything you need to know in order to implement dependency injection using Ninject in a real-life project. Not only does it teach you about Ninject core framework features that are essential for implementing dependency injection, but it also explores the power of Ninject's most useful extensions and demonstrates how to apply them.

Mastering Ninject for Dependency Injection starts by introducing you to dependency injection and what it's meant for with the help of sufficient examples.

Eventually, you'll learn how to integrate Ninject into your practical project and how to use its basic features. Also, you will go through scenarios wherein advanced features of Ninject, such as Multi-binding, Contextual binding, providers, factories and so on, come into play. As you progress, Mastering Ninject for Dependency Injection will show you how to create a multilayer application that demonstrates the use of Ninject on different application types such as MVC, WPF, WCF, and so on. Finally, you will learn the benefits of using the powerful extensions of Ninject.
  • Mastering Ninject for Dependency Injection
    • Table of Contents
    • Mastering Ninject for Dependency Injection
    • Credits
    • About the Author
    • About the Reviewers
    • www.PacktPub.com
      • Support files, eBooks, discount offers and more
        • Why Subscribe?
        • Free Access for Packt account holders
    • Preface
      • What this book covers
      • What you need for this book
      • Who this book is for
      • Conventions
      • Reader feedback
      • Customer support
        • Downloading the example code
        • Errata
        • Piracy
        • Questions
    • 1. Understanding Dependency Injection
      • What is Dependency Injection?
        • DI or Inversion of Control (IoC)
      • How can DI help?
      • My First DI Application
      • DI Containers
      • Why use Ninject?
      • Summary
    • 2. Getting Started with Ninject
      • Hello Ninject!
      • Its all about Binding
      • Object Lifetime
        • Transient scope
        • Singleton scope
        • Thread scope
        • Request scope
        • Custom scope
      • Ninject modules
      • XML configuration
        • How to use XML configuration
      • Convention over configuration
        • Selecting the assemblies
        • Selecting the components
          • Filtering the selected components
          • Explicit inclusion and exclusion
        • Selecting service types
        • Configuring the Bindings
      • Summary
    • 3. Meeting Real-world Requirements
      • DI patterns and antipatterns
        • Constructor Injection
        • Initializer methods and properties
        • Service Locator
      • Multi binding and contextual binding
        • Implementing the plugin model
        • Contextual binding
          • Named binding
          • Resolving metadata
          • Attribute-based binding
          • Target-based conditions
          • Generic helper
      • Custom providers
        • Activation context
        • Factory Methods
      • Dynamic factories
        • The Shape Factory example
        • Using convention
          • Selecting service types
          • Defining Binding Generator
        • Telecom Switch example
        • Custom Instance Providers
        • Func
        • Lazy
      • Summary
    • 4. Ninject in Action
      • Windows Forms applications
      • WPF and Silverlight applications
      • ASP.NET MVC applications
        • Validator injection
        • Filter injection
          • Conditional filtering (When)
          • Contextual arguments (With)
      • WCF applications
      • ASP.NET Web Forms applications
      • Summary
    • 5. Doing More with Extensions
      • Interception
        • Setup Interception
        • Member Interception
        • Type Interception
        • Multiple Interceptors
        • Intercept Attribute
      • Mocking Kernel
      • Extending Ninject
      • Summary
    • Index
  • Title: Mastering Ninject for Dependency Injection. For .NET developers and architects, this is the ultimate guide to the principles of Dependency Injection and how to use the automating features of Ninject in the most effective way. Packed with examples, diagrams, and illustrations
  • Author: Daniel Baharestani
  • Original title: Mastering Ninject for Dependency Injection. For .NET developers and architects, this is the ultimate guide to the principles of Dependency Injection and how to use the automating features of Ninject in the most effective way. Packed with examples, diagrams, and illustrations.
  • ISBN: 9781782166214, 9781782166214
  • Date of issue: 2013-09-25
  • Format: Ebook
  • Item ID: e_3cl0
  • Publisher: Packt Publishing