Dep.Injection in NET (Anglais) Broché – 6 octobre 2011
|Neuf à partir de||Occasion à partir de|
Produits fréquemment achetés ensemble
Les clients ayant acheté cet article ont également acheté
Descriptions du produit
PrÃ©sentation de l'Ã©diteur
Dependency Injection (DI) is a software design technique behind the
wildly popular Spring tool in Java. .NET developers are only now
discovering how DI can improve the quality and maintainability of
their C# code.
Dependency Injection in .NET is a comprehensive guide that
introduces DI to .NET developers. It covers core concepts and patterns,
and introduces important DI frameworks, such as StructureMap,
Windsor and Spring.NET. For each framework, it presents examples of
its particular usage, as well as examines how the framework relates to
the common patterns.
First and only book on DI in .NETF
Provides both patterns and practical examplesF
Presents major DI frameworks for .NETF
Very strong response in Manning Early Access Program
Biographie de l'auteur
is a professional software developer and architect living in
Copenhagen, Denmark. He has been working with software since 1995 and
TDD since 2003, including six years with Microsoft as a consultant,
developer and architect. Since 2009, Mark has been an architect with
Aucun appareil Kindle n'est requis. Téléchargez l'une des applis Kindle gratuites et commencez à lire les livres Kindle sur votre smartphone, tablette ou ordinateur.
Pour obtenir l'appli gratuite, saisissez votre adresse e-mail ou numéro de téléphone mobile.
Détails sur le produit
En savoir plus sur l'auteur
Dans ce livre(En savoir plus)
Commentaires en ligne
Commentaires client les plus utiles sur Amazon.com (beta)
The Long Story: I bought this book last year. I can't remember exactly why I bought it, but I suspect that it had something to do with intellectual intimidation and the frightening title. I come from a non-OO background, but I am too young to get through the next 20 years without dealing with the reality of OO prevalence in small (i.e. numerous) projects. I had 2 choices ... start at the bottom or start at the top. Believe me, I chose the latter with this book.
I'm not going to explain the content in every chapter, simply because other reviewers have already done the job as I would have. Read Mr. T. Anderson's fine review if you need that kind of detail. Instead, I will talk about the effect that this book had had on how I think.
Chapter 2 is the velvet sledgehammer in the face. I read along with the case study, nodding my head and exercising my (in retrospect, tiny) brain as Seeman describes how "Mary" and "Jens" go about building a layered application. I'm thinking, yes Mary and Jens, this is what the magazines, blog articles, and dime-a-dozen gurus are saying regarding the construction of layered application. Seeman then dissects the "layered" application. Actually, he doesn't dissect it; he tears it to shreds and stamps all over it. Brilliantly. It's truly scary to read this chapter. You will feel like a complete novice at the end of it. You then have two choices ... (1) reject this stuff as abstract, ivory tower nonsense, or (2) put on your big-boy-pants.
Having lived with this book for almost a year, this is how I suggest you use it:
1. Read from Part 1 through Part 3.
2. Stop. Think. Cry at how embarrassed you feel at the end of Part 1 Chapter 2.
3. Read Part 2 again.
4. Stop. Think. Cry at how happy you feel now that you've lifted yourself beyond 99% of .NET developers. Beyond 99% of software professionals, period.
5. Do some "poor-man's DI" exercises.
6. Read only the introductory sections of each chapter within Part 4.
7. Pick a DI container in Part 4 that appeals to you based on the previous bullet, read its Part 4 chapter, and spend 1-2 months playing with it.
8. Revisit Parts 2 and 3 on a regular basis as references.
9. Don't think about sauces or Fowlerisms.
Criticisms: Very, very, few. I do not think it's too "wordy" at all. Any repetition is done with the realization that this stuff is really, really, hard for most of us. But yes, any mention of nonsense about "Anemic Domain Models" normally sets my blood boiling and warrants an immediate docking of at least 1 star. I can't dock a star from this book. It's that good. It's written by a mildly (but not offensively) dogmatic Danish guy who talks about sauces in every chapter. I like my Filets Mignons dry, thank you very much. And still, at the end of the day ... this is best software development book I have ever read. By far. By miles. By kilometers ...
I have been using DI successfully for several years, yet I was able to learn an enormous amount about the topic from this book. Explanations of DI principles and related patterns such as Decorator really clicked for me. Read this book and you will understand how to develop loosely coupled software components. Excellent code examples in C#. The section on object composition in MS frameworks like ASP.NET MVC and WCF is an extremely valuable resource. The footnotes will direct you to very interesting reading for an even deeper dive. I could go on.
I highly recommend this book for .NET developers.
As time went on I saw all the great reviews coming out about the book and it made me curious. A buddy of mine had purchased it and I know that Manning gives ebooks with there book purchases, so I asked to borrow it. I ordered the book the next day.
I have nothing bad to say about Dependency Injection by Dhanji R. Prasanna, it was a great book. The difference is this one spoke my language of choice, .NET. It made the read so much better for me. Plus all the coverage of the popular DI Containers for .NET rocks.
This book is broken down into 4 parts the first part introduces DI. Part two is a catalog of patterns, anti-patterns, and refactorings. Part three covers Object Composition, Lifetime Management, and Interception. Part four covers all the popular DI .NET Containers which include Castle Windsor, StructureMap, Spring.NET, Autofac, Unity, and MEF.
One of the coolest things about the book is that it uses poor man's DI in the first 3 parts of the book to teach you how it all works, and then covers the popular DI .NET Containers in details to help you be more productive.
Coverage of the popular DI .NET Containers is nice deep coverage which also highlights the advantages and disadvantages of each one. Each popular DI .NET Container gets its own chapter. There are also some nice feature and lifestyle comparison charts to help you zero in on which DI Container will fit your needs.
The chapter on Object Composition is pretty cool too. It include coverage of console applications, ASP.NET MVC, Windows Communication Foundation, Windows Presentation Foundation, ASP.NET (Web Forms), and PowerShell.
The chapters on patterns and anti-patterns are a really big help in making sure you are using DI correctly. The patterns covered include Constructor Injection, Property Injection, Method Injection, and Ambient Context. The anti-patterns covered include Control Freak, Bastard Injection, Constrained Construction, and Service Locator. Both include nice code samples.
The chapter on DI refactoring covers mapping runtime value to abstractions, working with short-lived dependencies, resolving cyclic dependencies, dealing with constructor over-injection, and monitoring coupling.
This book is packed with diagrams that help you visualize the topic at hand. The author includes just the right amount.
Over all I found this author's writing style made the book a nice cover to cover read, but I will also be keeping it near to use as a reference. I have been on projects that use Castle Windsor, StructureMap, Unity, and MEF, so having coverage of each handy will be nice.
All the downloadable code is very well organized and usable.
This book is not only about DI, it is about proper object oriented programming. Every .NET architect and developer should read this book.
This is one of those books in .NET that I wish I've read much sooner. The more I dig in deeper into the book's content, the more I wished that more books were written similar to this. The writing style is second to none (I can't stop reading), and DI is explained thoroughly.
The author initially goes back to the basics of DI and go over what it is and the problem that it tries to solves. He then proceeds to write code that are tightly coupled, which he then goes back and shows how it can be re-written or refactored to become loosely coupled. The book also covers DI containers or injectors as how it satisfies the need of resolving dependencies. Although DI containers are available, it's valuable to know what going on behind the scene and how to architect a project that is adaptable to any unforeseen scenarios.
There are technical books out there where authors gloss over a subject which means that they're either too lazy to explain it, or they're not knowledgeable enough in that area. This book is different. The author not just understand the subject but knows how to explain it very well. He covers all the grounds of Dependency Injection; the ins-and-outs as well as the finer details. There are no questions that are left unanswered. I was actually surprised how massive the book initially was and didn't think that covering DI would span into so many pages. I assumed a lot of things regarding DI and this book changed those assumptions as well as clarified a lot of things. I've gained not just knowledge in the scope of DI but as well as insights in Design Patterns. Reading this book made me re-evaluate my approach when architecting a new project or even how I approach an existing project's architecture.
I enjoyed reading this book and recommend this to all .NET developers of any level. Whatever you experience level is, you'll gain something from this book. It changed my thinking process on how I approach my code and have become a better developer overall. This is without a doubt a new favorite book of mine and I own tons of technical books already. I definitely had fun reading it and highly recommended.