• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Structure mapping your way to better software
 

Structure mapping your way to better software

on

  • 479 views

Slides corresponding to my devLink 2012 talk on StructureMap. Get the code at https://github.com/MattHoneycutt/Presentations, and find more info at http://trycatchfail.com.

Slides corresponding to my devLink 2012 talk on StructureMap. Get the code at https://github.com/MattHoneycutt/Presentations, and find more info at http://trycatchfail.com.

Statistics

Views

Total Views
479
Views on SlideShare
479
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • * To code!
  • * Code
  • * Back to code!
  • Back to code!

Structure mapping your way to better software Structure mapping your way to better software Presentation Transcript

  • StructureMapping Your Way to Better Software Matt Honeycutt @matthoneycutt http://trycatchfail.com
  • The Plan Better StructureMap StructureMap Advancedsoftware? Basics in Action Recipes
  • SOLID PrinciplesSingle ResponsibilityOpen-ClosedLiskov SubstitutionInterface SegregationDependency Inversion
  • SOLID
  • Why Use StructureMap? • Achieve loose coupling • Extensibility everywhereDesign • Improve testability • SOLID! • Mature: one of the oldest containers • One of the fastest IoC containersFeatures • Easy to learn Domain Specific Language • Fully-loaded
  • Code!
  • Everyone Loves WebForms!
  • Service Locator Design pattern which encapsulates theprocesses involved in obtaining a service. Requester Service Locator Based on configuration, builds Asks the locator for a up and returns the requested particular service. service.
  • Model-View-Presenter MVP is a user interface design pattern engineered to improve the separation of concerns within an application’s presentation layer. Model View Presenter Object that Interface that Acts upon thedefines the data displays the data. model, tells theto be displayed. view what to do.
  • ASP.NET MVC DependencyResolver http://mysite/Home/Index Hey, give me the HomeController! ASP.NET MVC Pipeline DependencyResolver Here ya go! Activator.CreateInstance( typeof(HomeController));
  • ASP.NET MVC DependencyResolver Hey, give me the HomeController! ASP.NET MVC Pipeline SmDependencyResolver Here ya go! Container.GetInstance( typeof(HomeController));
  • Decorator Pattern Design pattern that allows behavior to be added to an object at runtime. Service Interface Decorated Type Decorator Defines the public Wraps an instancecontract for the type Base type that of the service being extended. implements in interface to add the interface. new behavior.
  • Decorator Pattern SomeOtherDecorator : IProductRepository ProductLoggingDecorator : IProductRepository InMemoryProductRepository : IProductRepository
  • Think compositionally!“Favor composition over inheritance!”
  • We’ve only just begun!
  • To RecapIoC rocks. Use it. Embrace it!There’s a learning curve… but it’s worth it!Makes it easier to create SOLID code.Do it all with StructureMap!
  • Want to know more?http://trycatchFAIL.com @matthoneycutt Blog, Videos, and I might say something More! interesting some day…