發送電子郵件給作者

You can use this page to email Michael Tsai about .NET 相依性注入.

Please include an email address so the author can respond to your query

This message will be sent to Michael Tsai

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

關於本書

邁向專業開發人員之路...

本書內容是關於.NET相依性注入(dependency injection;簡稱DI)的相關議題。透過本書,您將會瞭解:

  • 什麼是 DI、它有什麼優點、何時使用 DI、以及可能碰到的陷阱。
  • 如何運用 DI 應付容易變動的軟體需求,設計出更彈性、更好維護的程式碼。
  • 與 DI 有關的設計模式。
  • DI 於 .NET 應用程式中的實務應用,包括 ASP.NET MVC、ASP.NET Web API等等。
  • 如何使用 DI 容器(例如 Unity)來協助開發應用程式。

本書的範例皆以C#撰寫,讀者無須具備任何 DI 背景知識。

這不是 .NET 程式設計的入門書。為了避免讀者花錢買了不適合自己的書,容筆者斗膽列舉閱讀本書的基本條件:

  • 熟悉 C# 語法,包括擴充方法(extrension methods)、泛型(generics)、委派(delegates)等等。如果精通的是 VB(或其他 .NET 語言)但不排斥 C# 語法,也是 OK 的。 
  • 具備物件導向的基礎概念,知道何謂封裝、繼承、多型(polymorphism)。

倒不是說,不符合以上條件的讀者就無法從本書汲取有用的東西;只是就一般的情況而言,讀起來會比較辛苦一些。

如果您曾經接觸、研究過設計模式(design patterns),有些章節閱讀起來會輕鬆一些。然而這並非基本要求,因為本書也會一併介紹相關的設計模式與原則,例如 Decorator 模式、Factory 模式、開放/封閉原則(Open/Closed Principle)、單一責任原則(Single Responsibility Principle)等等。

此外,如果下列描述有一些符合您現在的想法,那麼本書也許對您有幫助:

  • 我的日常開發工作需要設計共用的類別庫或框架,供他人使用。
  • 我經常使用第三方(third-party)元件或框架,而且它們都提供了某種程度的 DI 機制。為了充分運用這些機制,我必須了解 DI 的各種用法。
  • 我希望能夠寫出寬鬆耦合、容易維護的程式碼。
  • 我已經開始運用寬鬆耦合的設計原則來寫程式,我想知道更多有關 DI 的細節,以了解有哪些陷阱和迷思,避免設計時犯了同樣的毛病。

無論別人怎麼說,自己讀過的感覺最準。強烈建議您先讀完本書的試閱章節(包含本書前言和第 1 章完整內容),以評估這本書是否適合你。 


關於作者

Michael Tsai’s avatar Michael Tsai

@huanlin

Hi there! I'm a technical writer with 10+ years of experience in software development and 16 awards of Microsoft .NET MVP.

著作:《C# 本事》、《.NET 本事:非同步程式設計》、《.NET 相依性注入》(簡體中文版:.NET 依賴注入)

譯作: 軟體構築美學 (Brownfield Application Development in .NET)、物件導向分析設計與應用(Object-Oriented Analysis and Design with Applications 3rd Edition)、軟體工程與 Microsoft Visual Studio Team System.

部落格: https://www.huanlintalk.com

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Dinet › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • TranslateAI
    • TranslateWord
    • TranslateEPUB
    • PublishWord
    • Publish on Amazon
    • CourseAI
    • GlobalAuthor
    • Marketing Packages
    • IndexAI
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss