Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.

Slides:



Advertisements
Similar presentations
Introduction to the Spring Framework
Advertisements

Apache Struts Technology
INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Test-Driven Development José Almeida, Microsoft
Spring, Hibernate and Web Services 13 th September 2014.
Enterprise Smart Clients Architecture, Patterns, Design, Best Practices Keith Elder Manager, Sr. Software Engineer Quicken Loans Blog:
Shailen Sukul Senior Solutions Architect EMC BSc | Mct | Mcpd (.Net 2/3.5) | Mcts (Sharepoint (MOSS/WSS), Biztalk, Web, Win, Dist Apps) | Mcsd.NET | Mcsd.
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.
By Bob Bunson  Simulation of software development project  Fictitious system from Concept to Code  Oriented around the.
Alonso Robles Solutions Architect speakTECH
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
Donn Felker Senior Consultant at Magenic MCTS / Scrum Master / ITIL Certified blog.donnfelker.com Twitter.com/donnfelker
1 The Problem Do you have: A legacy ABL system with millions of Lines of ABL Code? Years and years of modifications to your ABL code? System documentation.
Entity Framework Code First End to End
Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007.
@benday #vslive Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Building SOLID Software with Dependency Injection Jeremy Rosenberg.
Domain-Driven Design using the ADO.NET Entity Framework Tim McCarthy Principal Engineer, InterKnowlogy
What is Architecture  Architecture is a subjective thing, a shared understanding of a system’s design by the expert developers on a project  In the.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
1 Another group of Patterns Architectural Patterns.
Test Driven Development Arrange, Act, Assert… Awesome Jason Offutt Software Engineer Central Christian Church
Inversion Of Control & Dependency Injection Break Apart The Dependencies Oren Eini Senior Developer We! Consulting Group
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
DEV12 Excel Services, Server APIs and Managed UDFs Aaron Saikovski Senior Consultant - Readify Australia Blog:
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
Using Mock Objects with Test Driven Development Justin Kohlhepp
Alternative Architectures: Inversion of Control Mike Hadlow mikehadlow.blogspot.com.
ARCH-11: Building your Presentation with Classes John Sadd Fellow and OpenEdge Evangelist Sasha Kraljevic Principal TSE.
Consultant Effective Patterns and Practices in J2EE George de la Torre.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
Dependency Inversion By Steve Faurie. Dependency Inversion Described in Agile Principles, Patterns and Practices in C# by Robert C. Martin.
CS223: Software Engineering Lecture 14: Architectural Patterns.
#SPSSAN June 30, 2012 San Diego Convention Center WRITING TESTABLE CODE In SharePoint.
2 Architectural Considerations for the ASP.NET MVC Framework Jeffrey Palermo Chief Technology Officer Headspring Systems Austin, TX Session Code: ARC402.
2 Architectural Concerns for Object/Relational Mappers (O/R-M) with Examples in NHibernate Jeffrey Palermo Chief Technology Officer Headspring Systems,
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Microsoft Advertising 16:9 Template Light Use the slides below to start the design of your presentation. Additional slides layouts (title slides, tile.
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
Principled N-Tier Design or, a Solution to the Solution Problem Steve | ardalis.com Telerik, Inc.
Benjamin Unit Testing & Test-Driven Development for Mere Mortals.
Nate Anderson So, You’ve Inherited an OnBase System.
Interface Segregation / Dependency Inversion
Structure of a web application
Better Unit Tests through Design Patterns: Repository, Adapter, Mocks, and more… Benjamin
Managed Extensibility Framework
Unit Testing & Test-Driven Development for Mere Mortals
Unit Testing & Test-Driven Development for Mere Mortals
Design and Maintenance of Web Applications in J2EE
Architectural Roadmap
Refactoring Legacy AngularJS
ARCH-1: Application Architecture made Simple
Software Design Lecture : 8
Unit Testing & Test-Driven Development for Mere Mortals
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Implementing Security in ASP.NET Core: Claims, Patterns, and Policies
Developing and testing enterprise Java applications
ARCH-2: OpenEdge Reference Architecture (OERA) Latest Thinking
Dependency Inversion principle
Mark Quirk Head of Technology Developer & Platform Group
Dependency Injection Mechanism
Presentation transcript:

Presenter - Donn Felker

 Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise solutions.  Certifications: ◦ Microsoft Certified Technology Specialist ◦ Certified SCRUM Master ◦ ITIL Foundation Certified  Bachelors of Science in Software Engineering  Member of FooTheory Community (  Blog: 

 Present Dependency Injection and Inversion of Control in an understandable fashion  Present each topic at a detailed but comprehendible level  Give you the resources used in this talk so you can reference them in the future.

 Confuse you.  Pretend to be an authority in patterns, because, well … I’m not.  Get all “Fowler” on you.  Have theoretical conversations about practicality of the example apps I’m using for demonstration purposes.

 What is a Dependency?  Dependency Injection Pros/Cons  Simple Application Architecture  Example Application High Level Architecture  Demonstration 1 ◦ Identifying and Breaking dependencies  What is Inversion of Control  Demonstration 2 ◦ Custom Dependency Container ◦ Introducing Microsoft Unity Container  Questions

 Some common dependencies include: ◦ Application Layers  Data Access Layer & Databases  Business Layer ◦ External services & Components  Web Services  Third Party Components ◦.NET Framework Components  File Objects (File.Delete(…), Directory.Exists(…))  Web Objects (HttpContext, Session, Request, etc)

Database Data Access Layer Which Depends On Business Logic Layer Which Depends On User Interface Depends on CI Server BROKEN BUILD!

Open IDE Get Latest Compile Run Tests Tests Pass And then…

 Code is tightly coupled  Difficult to isolate when testing  Difficult to maintain ◦ If I change ComponentX how do I know what else it will affect? Did I break anything?  If tests are in place they can be your safety net

 The ability to supply (inject) an external dependency into a software component.  Types of Dependency Injection: ◦ Constructor (Most popular) ◦ Setter ◦ Method

Injecting a ICustomerRepository and a ICustomerDTOMapper through the constructor. Note: This is the most popular type of injection.

Injecting a ICustomerRepository through the setter.

Injecting a ICustomerRepository as well as an integer dependency.

 Pros ◦ Loosely Coupled ◦ Increases Testability (A LOT!) ◦ Separates components cleanly ◦ Allows for use of Inversion of Control Container  Cons ◦ Increases code complexity ◦ Some Jr. Developers find it difficult to understand at First ◦ Can Complicate Debugging at First ◦ Complicates following Code Flow

DB Layer (Not implemented for brevity) Customer Domain Repository Layer Customer DTO Mapper Customer Service Layer Web UI or Console App (UI Layer)

Lets See Some Code…

 Sometimes referred to as Dependency Inversion Principle (DIP) ◦ The principle states that high level or low level modules should not depend upon each other, instead they should depend upon abstractions.  Specific implementations (object instances) are deferred to a higher level of abstraction of control. ◦ Examples:  Parent class(es)  A Container  Referred to as the “Hollywood Principle” ◦ “Don’t call us, we will call you.”

The best example is to see it in code.

 Containers ◦ Windsor: ◦ Unity: ◦ Structure Map: ◦ Spring.NET:  Unity Screencast (PnP Guidance) ◦  Good Book to help break dependencies: ◦ Working Effectively with Legacy Code (Michael Feathers)   Contact Me ◦ ◦  All resources from this talk will be posted within 24 hours on this blog.