Giter Club home page Giter Club logo

helloworld's Introduction

A hello world example using Dependency Injection in a .Net application

The article is an implementation of Dependency Injection in .Net by Mark Seemann

The Pure DI concept is presented in Chapter #3 - DI Containers in the book. Note: This is called as Poorman's DI. The term Poorman's DI has gotten a negative connotation to it which as I understand is accidental. Mark Seemann on several other occasion conveyed the message that Poorman's DI is his preferred style of coding and started calling it Pure DI.

It starts with the simple looking Hello, World program through which developers are introduced to a new programming language. It then discusses how this code is very tightly coupled to console and to a specific message.

The rest of the chapter is a refactoring of the initial program by applying different programming constructs, such as interfaces and design principles such as SOLID, are applied to make the program more flexible.

The solution ends with a bunch of files that marks clear seperation between the input and output boundaries.

My solution takes the solution to the next level and applies interception to the already amazing solution.

I have added a logging mechanism to the solution which is integrated in to through Unity Interception. Chapter #9 - Interception discusses this concept at length.

Interception are implementation of the decorator pattern with Framework level support. I am using the Unity Container which is discussed in Chapter #14 - Unity, at length.

helloworld's People

Contributors

khanziaullah avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

zikh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.