St Louis Day of.NET 2011 Taming Dependency Chaos with Inversion of Control Containers Steve Bohlen Senior Software Engineer SpringSource/VMware E-Mail:

Slides:



Advertisements
Similar presentations
Today’s session will be recorded and available 24/7 on RadControls for Windows Q1 Release.
Advertisements

Today’s session will be recorded and available 24/7 on What's New in Q for ASP.NET AJAX.
Silverlight Presenter: Kevin Grossnicklaus February 25 th, 2010.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
St Louis Day of.NET 2011 Refactoring to a SOLID Foundation Steve Bohlen Senior Software Engineer SpringSource/VMware Blog:
ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
Columbia, Maryland - Summer 2011 Introduction to Agile Principles, Practices, and Processes Steve Bohlen Senior Software Engineer SpringSource/VMware.
ASP.NET MVC Best Practices Simone Chiaretta Solution Developer, Avanade 21 Ottobre 2009.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
Free Training Courses for.NET Software Engineers Svetlin Nakov Telerik Corporation
On the horizon Chapter twenty-five of: Szyperski, Clemens et al. Component Software - Beyond Object-Oriented Programming. Second Edition.
Kansas City Developer Conference 2011 Unit Testing Patterns and Anti-Patterns Steve Bohlen Blog:
Kansas City Developer Conference 2011 Domain Driven Design Implementation Patterns and Considerations in.NET.
USING ANGULARJS WITH SITEFINITY
St Louis Day of.NET 2011 Unit Testing Patterns and Anti-Patterns Steve Bohlen Senior Software Engineer SpringSource/VMware Blog:
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
By Bob Bunson  Simulation of software development project  Fictitious system from Concept to Code  Oriented around the.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
Domain Driven Design Implementation Patterns and Considerations in.NET.
Full day of Sitefinity The process of delivering websites… PlanBuildTestDeliver Plan Idea management EstimationRequirementsScheduling BuildCustomization.
Daniel Levy Solutions Consultant, Telerik Testing Tools Division.
1 Aspects and Modularity: The Hope and the Challenge Jonathan Aldrich Institute for Software Research International School of Computer Science Carnegie.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Introduction to the Spring Framework By: Nigusse A. Duguma Kansas State university Department of Computer Science Nov 20, 2007.
Copyright 2006, Codeguild, Inc Spring Framework Fundamentals March, 2006 Larry Hamel Codeguild, Inc.
Presenter - Donn Felker.  Senior Consultant for Microsoft Gold Certified Partner- Statêra.  8 years of experience in developing and architecting enterprise.
Introduction to AOP.
Building SOLID Software with Dependency Injection Jeremy Rosenberg.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Intro to Silverlight Kevin Grossnicklaus. Introductions Kevin Grossnicklaus – SSE - ( ) Chief Architect Software.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
Exploring the NHibernate Ecosystem Steve Bohlen Blog:
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Todd Snyder Development Team Lead Infragistics Experience Design Group.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Building Web Sites with ASP.NET MVC Framework Noam King CTO Sela College
Course Introduction Svetlin Nakov Telerik Corporation
Real World Software Development Management and Solutions Joel Semeniuk April 5, 2011.
Copyright © 2005 Finetix LLC All Rights Reserved 0 SpringFramework.Net Developer Session Chris Donnan The Peer Frameworks Series -.Net and Java.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Sander Hoogendoorn Principal Technology Officer Capgemini The Netherlands SESSION CODE: ARC303.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
Inversion Of Control & Dependency Injection Break Apart The Dependencies Oren Eini Senior Developer We! Consulting Group
Aspect Oriented Programming Gülşah KARADUMAN.
WEB &.NET Web development trends in.NET World. Sanjay Jagarlamudi Associate Director at MATRIX Founder Dallas HTML5 Group Father of two girls.
Jean-Claude Trachsel Senior Consultant Trivadis AG Building a Website with ASP.NET MVC.
A Presentation By V AIBHAV S AHARAN Web-enHanced Information Management COMS E6125.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
Using Mock Objects with Test Driven Development Justin Kohlhepp
Introduction Better Faster Cheaper (pick any two) On-going issue that continues to motivate research in software engineering Applications: –continue to.
Jean-Claude Trachsel Senior Consultant Trivadis AG.
Aspect-Oriented Programming An Introductory Presentation Mike Landi MSCS Candidate Union University.
Searching for a Job, Writing CV and Cover Letter, Passing a Job Interview Telerik Academy for Software Engineers Jan 12 th 2012 – Sofia academy.telerik.com.
1 An Aspect-Oriented Implementation Method Sérgio Soares CIn – UFPE Orientador: Paulo Borba.
Alternative Architectures: Inversion of Control Mike Hadlow mikehadlow.blogspot.com.
Jeremy Thake Technical Product Building cross-platform apps that integrate with O365 API’s using Xamarin in Visual Studio.
Design for testability as a way to good coding Simone Chiaretta Architect, Council of the EU December 9 th,
Aspect Mining Jin Huang Huazhong University of Science & Technology, China
Kansas City Java User’s Group Jason W. Bedell July 12, 2006
Introduction to Yan Cui Aspect Oriented Programming by
#SPSSAN June 30, 2012 San Diego Convention Center WRITING TESTABLE CODE In SharePoint.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
Understanding Dependency Injection… and those pesky containers Miguel A. Castro Architect -
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
What is .NET.
MVVM Made Simple with Prism
Managed Extensibility Framework
ADO.NET Entity Framework Marcus Tillett
Working across the .NET Continuum
Presentation transcript:

St Louis Day of.NET 2011 Taming Dependency Chaos with Inversion of Control Containers Steve Bohlen Senior Software Engineer SpringSource/VMware Blog:

St Louis Day of.NET 2011 Do I suck? Let me (and the world) know!

St Louis Day of.NET 2011 Who am I? …and why should you care? Steve Bohlen I Read Books + Write Software vs. “Read Software + Write Books” Blog, Screencast, Speak, Share, Learn

St Louis Day of.NET 2011 Steve Bohlen Nearly 20 years developing software LISP, Delphi, C/C++, VB, VB.NET, C# Senior Engineer Springsource/VMware Co-Founder, NYC Alt.Net User Group Co-Organizer, NYC DDD User Group Contributor: various OSS projects Nhibernate NDbUnit Spring.NET blog:

St Louis Day of.NET 2011 RAD Controls for ASP.NET AJAX RAD Controls for Silverlight RAD Controls for Windows Phone RAD Controls for Winforms RAD Controls for WPF Telerik Reporting Telerik OpenAccess ORM Telerik JustCode Telerik JustMock Telerik Extensions for ASP.NET MVC Test Studio Express Telerik TeamPulse Telerik Test Studio Sitefinity CMS Telerik JustDecompile C#/VB.NET Converter ASPX to Razor Converter

St Louis Day of.NET 2011

How much can you keep in your Head?

St Louis Day of.NET 2011 Our Application (or class, or method, etc.)

St Louis Day of.NET 2011 First Attempt at Decomposition Components!

St Louis Day of.NET 2011 Ideal Decomposition Level Units!

St Louis Day of.NET 2011 The Challenge: Turning this into something useful Decomposition carries overhead… …of re-composition for meaningful work!

St Louis Day of.NET 2011 …easily! The Goal: Units Assembled into Something Useful…

St Louis Day of.NET 2011 Code Demo: Refactoring for Decomposition

St Louis Day of.NET 2011 Reviewing Our Dependency Graph after Decomposition Logger ConnectionManager DataSorter Logger DataAccess Worker DataPrinter Logger

St Louis Day of.NET 2011 Code Demo: Refactoring to Ease (Re-)Composition

St Louis Day of.NET 2011 Reviewing Our Dependency Graph after IoC ConnectionManager DataSorter Logger DataAccess Worker Container Construction Dependency Graph Functional Dependencies Remain as Before DataPrinter

St Louis Day of.NET 2011 Aspect-Oriented Programming (AOP)

St Louis Day of.NET 2011 (one of) The Challenges of OO Software Design Not all common behaviors can be efficiently modeled by OO paradigms – Inheritance, Dependency Injection / Inversion of Control Simple Examples – Logging, Authorization, Transactions, Exceptions …more… We call these concerns of our application – They are all things our objects must ‘concern’ themselves with doing Because they cut across many objects in our application… – …we call them cross-cutting concerns

St Louis Day of.NET 2011 Example: Logging by Inheritance public abstract class LoggingBase { protected void Log(string msg) {…} } public abstract class LoggingBase { protected void Log(string msg) {…} } Public class Service1 : LoggingBase {…} Public class Service1 : LoggingBase {…} Public class Service2 : LoggingBase {…} Public class Service2 : LoggingBase {…} Public class Service3 : LoggingBase {…} Public class Service3 : LoggingBase {…} Common Abstract Base Class … … Awkward!  Rigid hierarchy!  How do you add logging after you design your application???  Inherit from Common Base

St Louis Day of.NET 2011 Public class Service1 { public Service1 (Logger logger) { _logger = logger; } Public class Service1 { public Service1 (Logger logger) { _logger = logger; } } Example: Logging by Dependency Injection Public class Logger { public void Log(string msg) {…} } Public class Logger { public void Log(string msg) {…} } Dependency Awkward!  Inject Logger Everywhere!  How do you add logging after you design your application???  Constructor Injection

St Louis Day of.NET 2011 The Promise of Aspect-Oriented Programming All (most) applications have these cross-cutting concerns – For fun (and because it’s a common convention) let’s call them Aspects Aspects can be applied to objects in our solution using AOP tools – Broadly applied to many classes in our solution – Minimally-invasive – Non-Manual introduction of Aspects Not by literal coding (directly)

St Louis Day of.NET 2011 Understanding AOP Terms Cross-Cutting Concerns the ‘problem’ we want to solve Advice code that solves the problem Pointcut where to apply the Advice Aspect Pointcut + Advice = Aspect

St Louis Day of.NET 2011 Code Demo: Defining and Applying Aspects

St Louis Day of.NET 2011 Reviewing Our Dependency Graph after IoC ConnectionManager DataSorter Logger DataAccess DoSomeWork Container Construction Dependency Graph Functional Dependencies Remain as Before DataPrinter

St Louis Day of.NET 2011 Reviewing Our Dependency Graph after AOP ConnectionManager DataAccess DoSomeWork Container DataSorter Logger DataPrinter Logger

St Louis Day of.NET 2011 Understanding the Mechanics of AOP Advised Type Advice Your Code Type with Advice Applied IoC

St Louis Day of.NET 2011 Thinking About Re-Assembly Presto!

St Louis Day of.NET 2011 Dependency Injection Frameworks StructureMap Spring.NET Castle Windsor NInject Funq Unity More…

St Louis Day of.NET 2011 fini Steve Bohlen Senior Software Engineer SpringSource/VMware Blog: