Showing posts with label InversionOfControl. Show all posts
Showing posts with label InversionOfControl. Show all posts

Friday, April 26, 2013

Enterprise Library 6 and Unity 3 are out today... (Semantic Logging and Transient Fault Handling Application Block added, other Blocks updated)

ALM and Beyond - Microsoft Enterprise Library 6 and Unity 3 Released

Microsoft Enterprise Library is a popular collection of reusable software components (called application blocks) designed to address common cross-cutting concerns of enterprise application developers (such as logging, validation, data access, exception handling, and more). Enterprise Library is provided as source code, test cases, and documentation that can be used "as is" or extended, and encapsulates the Microsoft recommended and proven practices for .NET application development.

Unity is one of the Enterprise Library application blocks which provides a lightweight, extensible dependency injection container with support for constructor, property, and method call injection, as well as support for instance and type interception. It facilitates building loosely coupled applications (including Windows Store apps).

...

What’s in the Box?

  • New Blocks
    • Semantic Logging Application Block [video]
    • Transient Fault Handling Application Block (this application block was previously a part of the Enterprise Library Integration Pack for Windows Azure; in this release it has been generalized and updated to the latest technologies).
    • Updated Application Blocks – 6 blocks from previous versions have been updated:
      • Data Access Application Block
      • Exception Handling Application Block
      • Logging Application Block
      • Policy Injection Application Block
      • Validation Application Block
      • Unity Application Block/DI Container (v3.0)
  • New Programmatic Configuration – Streamlining programmatic configuration of all blocks and improving ease of learning and ease of experimentation.
  • Configuration Console – largely unchanged from the previous release.
  • Reference Implementation – To versions of the same application: one using Enterprise Library 5 and one using Enterprise Library 6 to illustrate the changes and to help users migrate.
  • Guides – The “Developer’s Guide to Enterprise Library” is designed to introduce users to the library and explain how to use it through short, practical code examples. The new “Dependency Injection with Unity” guide introduces users to the Dependency Injection pattern, describes the problems it can solve, and shows how to use the Unity container in their own applications.

..."

InfoQ - Microsoft Enterprise Library 6.0 Adds Semantic Logging

...

Enterprise Library 6.0 comes 3 years after EL 5.0 with a new application block, Semantic Logging, providing consistent format and structure of logging messages based on strongly typed events. Log messages can be saved simultaneously to multiple  destinations including flat file, console window, database or Windows Azure storage. An example of generating a log message for a UI error in an application, taken from the Developer Guide (PDF), looks like this:

..."

Grigori Melnik: Thoughts on Agile Software Engineering and Beyond - Just released - Microsoft Enterprise Library 6

Five month ago we formulated our vision for the new version of Enterprise Library. Now we are delivering on it. I’m excited to announce the latest release of Microsoft Enterprise Library: version 6.

What is Enterprise Library?

Enterprise Library is made up of application blocks, each aimed at managing specific crosscutting concerns. Crosscutting concerns are those tasks that you need to accomplish in several places in your application. When trying to manage crosscutting concerns there is often the risk that you/different team members will implement slightly different solutions for each task at each location in your application, or that you will just forget them altogether. Writing entries to a system log file or Windows Azure table storage, dealing with transient error conditions and validating user input are typical crosscutting concerns. While there are several approaches to managing them, the Enterprise Library application blocks make it a whole lot easier by providing generic and configurable functionality that you can centralize and manage.

Enterprise Library application blocks are standalone. They work well together, but you only have to get the ones that you need. They are also customizable and extensible, so you can extend them to provide what you need in your specific contexts. You can choose to use it as a seedwork and grow your own library, which you can later reuse and sell. We ship under MS-PL, so this is allowed.

What are the main themes for this release?
  • Simplifying the library all around
  • Embracing semantic logging
  • Increasing resiliency to errors
  • Enhancing Unity type registration
  • Supporting Windows Store apps (Unity, Topaz)
  • Streamlining programmatic configuration of all blocks
  • Integrating with other technologies (ASP.NET MVC and ASP.NET Web API)
  • Improving ease of learning, ease of experimentation (fast start), and ease of use

...

image

..."

Somasegar's blog - Enterprise Library 6.0

...

While this 6.0 release is filled with great things to talk about, I want to highlight three in particular:

  • .NET 4.5 saw the introduction of the EventSource class, which dramatically simplifies the task of doing ETW tracing in managed applications (ETW, or Event Tracing for Windows, is a fast and scalable logging mechanism built into the Windows operating system).  Enterprise Library 6.0 includes the new Semantic Logging Application Block, which enables you to have the simplicity and power of EventSource while still utilizing log formats and storage facilities you’re familiar with.  With this block, you can easily direct your log messages to a variety of destinations, such as rolling flat files, SQL Server databases, or Windows Azure table storage, while still maintaining the structured nature that ETW and EventSource provide.  This structure makes it much easier to later aggregate, query, and process the information you've captured.
  • LOB apps are more and more likely to be running in distributed environments, where intermittent error conditions are not uncommon.  The updated Transient Fault Handling Application Block, which helps to provide resilience against such conditions, has been updated with new detection strategies and with support for the new asynchronous programming features of C# 5 and Visual Basic 11, enabling increased scalability.  It’s also now available as a portable library for use with .NET 4.5, Windows Store apps, and Windows Phone apps.
  • Previous releases of Enterprise Library have included Unity, a lightweight and extensible dependency injection container that facilitates building loosely coupled applications.  With this release, it’s seen several important enhancements, including support for Windows Store apps.

As has been the case with Enterprise Library in the past, you can easily add to your projects just the blocks you need by using the NuGet package manager in Visual Studio:

...

You can check out the Enterprise Library at http://entlib.codeplex.com.

Microsoft Downloads - Microsoft Enterprise Library 6

Microsoft Enterprise Library is a collection of reusable application blocks designed to assist software developers with common enterprise development challenges. This release includes: Data Access Block, Exception Handling Block, Logging Block, Policy Injection Block, Semantic Logging Block, Transient Fault Handling Block, Validation Block, and Unity.

Quick details

Version: 6.0
Date published: 4/25/2013

Language: English

EnterpriseLibrary6-binaries.exe, 1.0 MB

EnterpriseLibrary6-source.exe, 7.5 MB

Microsoft.Practices.EnterpriseLibrary.ConfigConsoleV6.vsix, 726 KB

SemanticLogging-service.exe, 1.0 MB

Microsoft Enterprise Library is a collection of reusable application blocks addressing common cross-cutting concerns. This release includes: Data Access Application Block, Exception Handling Application Block, Logging Application Block, Policy Injection Application Block, Semantic Logging Application Block, Transient Fault Handling Application Block, Validation Application Block, and Unity Application Block.
This major release of Enterprise Library contains many compelling new features and updates that will make developers and IT professionals more productive. Two new application blocks are:

  • Semantic Logging Application Block
  • Transient Fault Handling Application Block (this application block was previously a part of the Enterprise Library Integration Pack for Windows Azure; in this release it has been generalized and updated to the latest technologies)
Other major new features include:
  • New programmatic configuration that doesn’t require a container
  • AsynchronousTraceListenerWrapper for the Logging Application Block, which enables existing listeners to write messages asynchronously
  • JSON formatter for the Logging Application Block.
New Unity Application Block includes many improvements:
  • Registration by convention
  • Support for NetCore (Windows Store apps)
  • Resolving objects of type Lazy<T>
  • The Unity assembly is now Security Transparent
  • Support for ASP.NET MVC and ASP.NET Web API

The detailed list of all changes is included in the Release Notes.

...

All application blocks are also available as NuGet packages.

Microsoft Downloads - Microsoft Unity 3

Unity is a dependency injection container. It is full-featured, with support for instance and type interception and custom extensions. Unity 3 also supports Windows Store apps.

Quick details

Version: 3.0
Date published: 4/25/2013

Language: English

Unity3-binaries-only.exe, 401 KB

Unity3-binaries-symbols-source.exe, 1.6 MB

This major release of Unity includes the following new features:

  • Registration by convention.
  • Support for NetCore (Windows Store apps).
  • Resolving objects of type Lazy<T> by Unity.
  • The Unity assembly is now Security Transparent.
  • Support for ASP.NET MVC and ASP.NET Web API.

The detailed list of all changes is included in the Release Notes

...

Also available via NuGet.

Enough said?

Monday, February 25, 2013

Sacha say IOC you! Sacha Barber presents his BarbarianIOC...

CodeProject - BarbarianIOC : A simple IOC Container

Introduction

...

Thing is I have always wanted to try and make one of these  myself, just to see what is involved. I did not want to go too nuts on this, and  just wanted the following really:

  1. Instance configuration : singleton / transient
  2. Simple registration process, maybe some sort of fluent interface
  3. Use the Expression API to compile into delegates for quick creation of  objects
  4. Constructor / property injection
  5. Provide the ability to accept non IOC held constructor parameters

So those couple of points are ALL I wanted to get working. As I say there are  a whole slew of full fledged IOC containers out there (where I have named a few  above), this articles container is more of a learning exercise, that I thought  I would share, in case anyone else is interested in this sort of thing.

I am calling my container BarbarianIOC as the existing  containers all seems to have these short snappy names, and it's kind of play on  my name, and if you saw me without a shave I do kinda look a bit like a  barbarian.

So there we go. That's essentially what this article is about, but just  before we get into the guts of it, please read this important note below.

IMPORTANT NOTE

I should point out that you should stick to using one of the major IOC containers out there,  as this was an exercise  to see what you needed to do to create your own. That is not to say I am not  happy with it, I totally am, and I think with more tinkering, I could make it  act near enough like one of the "proper" IOC containers out there, but I just know that,  that tinkering will never happen, as I am always  eager to move on to something new. So yeah just stick to using one of the big  "proper" IOC containers out there.

What Does It Do

In this section I will should you how to use BarbarianIOC, and  what that looks like in a typical application

..."

Mare than anything I just like this Project's name... I've been meaning to jump into some real world IOC ("What? Greg, you're not IOC'ing every day in every app? ZOMG!" Yeah, yeah, I know... but my brain is only so big and I'm still trying was out the VB6'ness... sigh.. GC.Collect... GC.Collect.... ;)

Anyway, I like Sacha's past work and have learned a good bit from reading his articles, so this one looks like it's going to my "Must grok soon" list.

Wednesday, May 09, 2012

We don't need no IoC tutorials! [um..right? Okay... yeah... well maybe a "review" wouldn't hurt... um... yeah...]

CodeProject - Inversion of Control: Overview with Examples

"Introduction

Definition: “Inversion of Control is an abstract principal describing an aspect of some software architecture design in which the flow of control of a system is inverted in comparison to procedural programming.”

What happens in procedural programming is a chunk of code that uses or consumes another chunk of code is in control of the process. It knows what piece of code, which method, in which class, it uses and this way it knows about the implementation details in the code it uses.

...

What is Dependency in terms of classes?

The example mentioned in the start of this article is an example of dependent classes. When class X uses a method of class Y or class Y as a whole, we can say that class X has some level of dependency over class Y. Dependency may extend to several levels. X uses Y, Y uses A and B, A uses C, and more. This way this chain goes on and on. The problem with this is if we have any change in these classes, it may spawn to multiple classes. The solution to this dependency problem is define a loose relation between classes. One way to achieve this is the Inversion of Control pattern. This pattern uses Dependency Injection to eliminate tight coupling between objects. Let’s see dependency with some practical example.

...

image..."

Heard of IoC/Inversion of Control but that's about it? This is a nice article that will help you wrap your head around the idea.

Thursday, February 16, 2012

All in One Unity Demo and Information Series

CodePlex - Unity All In One

This projects intends to show features in Unity and different ways of working with it.

A couple of thing to know before starting is how the project is structured. The launching point for this project is UnityDemo.ConsolePresenter which has the Program files. To make it more relatable i've used the Duck analogy from HeadFirst deisgn pattern but in my own way. Solution has a Common and a Unity code Library folder where all the samples lie. Feature's are mostly broken down as assemblies . It's best to start with UnityDemo.RegAndResCode project but after that you can go through any feature you like. For convenience sake I have a dictionary or Features and within it a dictionary of Samples. All you have to do is change the index number to go directly to the code class. A detailed explanation about each feature can be found here

Features sampled uptill now are :

  1. Regitsering types
  2. Resolving Types
  3. ResolveAll
  4. DependencyAttribute
  5. LifeTime manager
    1. Transient
    2. ExternalControlled
    3. ContainerControlled
    4. PerThreadControlled
    5. HierarchicalLifetimeManager
  6. Injcetion constructor
  7. AutomaticFactory
  8. Interception
  9. Confuration File
    1. Adding Intellisense Support

..." [GD: Project Description Leach Level: 99%]

Unity All in One : 2 of N : Adding Intellisense in the App.config

"Visual studio Intellisense is one of the best feature’s in Microsoft arsenal. So if at any point I don’t have it working for me I end up spending more time then I probably should be. This is specially true while configuring the config file for Unity. May be I’m jumping ahead. Lets step back to the most crucial question here

“Why should i use a config file at all for Unity ? “

I generally tend to have behaviours and model split across assemblies. So there may be a situation where I havent referenced an assembly. But I know that by the time you get here it’ll be registered. So no harm done. But that just me.

Ok moving forward. How do I get an Intellisense in the config file for Unity configurations ? . The problem is Visual studio doesn’t have a schema defined for the Unity’s configuration section. A simple way would be to install the Enterprise Library by Microsoft. It come with a schema for Unity. To verify if you have a schema follow the mentioned steps

..."

This looks like a great resource, both the Codeplex Project and the blog, for getting up to speed and checking out Unity...

 

(via Microsoft Developer Network - Samples - Unity All In One)

Monday, August 01, 2011

Can we get a little Unity?

Developers' Hangout Blog - Introduction to Unity Application Block 2.1

“In this post I would like to do a simple introduction to Unity Application Block. Unity is a framework that supports dependency injection (DI) in constructors, properties, and method calls. Unity also supports intercepting method calls which I may cover in a later post.

The documentation for Unity is pretty detailed, so it is probably a good place to start for background information. I’ve also included a link to the download area in the references section at the bottom of the post.

What is Unity and why would you use it?

When you start a project, the code base is usually small so it is not difficult to maintain or test. As the project gets larger, it is often the case that it gets broken down into components, and each component is created separately, and then integrated into the rest of the project.

In the beginning, the components are self contained and testable on their own if the person doing the work was paying attention to object oriented design principles. Even if the component was carefully constructed, at some point during integration it is usually the case that component boundaries begin to break down and components start having strong dependencies on each other.

Part of the break down of component boundaries happens because components start to inherit responsibility for configuring the dependencies with other components. Once a component has built in knowledge on how to create and configure another component, it becomes difficult to separate the components and test them independently.

This is where Unity comes in. Not only does Unity take the responsibility for creating and configuring components, it does so in a consistent way. Components don’t have to know where their dependent components come from. In addition, Unity can automatically create the dependent components if, necessary, or use existing instances.

…”

Been a good while since I’ve blogged about, or [sheepish grin] looked at, Unity so a review of it, what it can do and how it can help use build better apps is timely…

 

Related Past Post XRef:
IoC? What? Man, I’m just a line of business dev trying to get through my day… What is this inversion of control/IoC, Dependency Injection thing?
Still trying to figure out what DI/IoC but are afraid to speak up?

Writing a MMC Plugin, with MVP and Unity
The Microsoft Patterns & Practices Catalog Cheat Sheet
Microsoft Enterprise Library 5.0 and Unity 2.0 RTW (& EntLib 3.x, 4.x to 5.0, Unity 1.x to 2 Migration Guide)

Wednesday, December 01, 2010

IoC? What? Man, I’m just a line of business dev trying to get through my day… What is this inversion of control/IoC, Dependency Injection thing?

Making the Complex Simple - Basic to Basics: Understanding IoC Part 2 (Creation)

“In my last back to basics post we talked about what inversion of control (IoC) is in regards to inverting control of interfaces.

We looked at how we can benefit from changing the control of the interface from the service to the client of that service.

This time we are going to tackle the more common form of IoC that is quite popular these days, and I’m going to show you why dependency injection is only one way to invert the control of the creation of objects in our code.

pagesnap2…”

I’ve really been enjoying John’s Back to Basics posts… Sometime you just need a review/brain cell refresh (or a jump start in breaking out of your day-to-day code grind and into learning something new… :)

Make sure you also catch the other posts in his series (to date);

Wednesday, April 21, 2010

Microsoft Enterprise Library 5.0 and Unity 2.0 RTW (& EntLib 3.x, 4.x to 5.0, Unity 1.x to 2 Migration Guide)

Grigori Melnik: Thoughts on Agile Software Engineering and Beyond - Microsoft Enterprise Library 5.0 Released!

“Last Friday I signed off on the last quality gates!  Yesterday we had our Release Readiness Meeting, which gave a resounding GO to the Enterprise Library 5.0 and a round of applause to the team. As one of the directors concluded “It is a beautiful thing… Not just the product, but also how you’ve got there.”

And now… a drum roll, please. On behalf of the patterns & practices Enterprise Library team I am very excited to announce the world-wide availability of Microsoft Enterprise Library 5.0.

What is Enterprise Library ?

Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development challenges (such as logging, validation, caching, exception handling, and many others). Application blocks encapsulate Microsoft recommended development practices; they are provided as source code plus tests and documentation that can be used "as is," extended, or modified.

image

…”

Microsoft Downloads - Microsoft Enterprise Library 5.0

“Microsoft Enterprise Library is a collection of reusable application blocks designed to assist software developers with common enterprise development challenges. This release includes: Caching Block, Cryptography Block, Data Access Block, Exception Handling Block, Logging Block, Policy Injection Block, Security Block, Validation Block, and Unity.

Version: 5.0
Date Published: 4/20/2010
Language: English
Download Size: 5.3 MB - 16.4 MB*

This major release of Enterprise Library contains many compelling new features and updates that will make developers more productive. These include:

  • Major architectural refactoring that provides improved testability and maintainability through full support of the dependency injection style of development
  • Dependency injection container independence (Unity ships with Enterprise Library, but you can replace it with a container of your choice)
  • Programmatic configuration support, including a fluent configuration interface and an XSD schema to enable IntelliSense
  • Redesign of the configuration tool to provide:
    • A more usable and intuitive look and feel
    • Extensibility improvements through meta-data driven configuration visualizations that replace the requirement to write design time code
    • A wizard framework that can help to simplify complex configuration tasks
  • Data accessors for more intuitive processing of data query results
  • Asynchronous data access support
  • Honoring validation attributes between Validation Application Block and DataAnnotations
  • Integration with Windows Presentation Foundation (WPF) validation mechanisms
  • Support for complex configuration scenarios, including additive merge from multiple configuration sources and hierarchical merge
  • Optimized cache scavenging
  • Better performance when logging
  • A reduction of the number of assemblies
  • Support for the .NET 4.0 Framework and integration with Microsoft Visual Studio 2010
  • Improvements to Unity

…”

Microsoft Downloads - Microsoft Enterprise Library 5.0 Migration Guide

“…

Version: 5.0
Date Published: 4/20/2010
Language: English
Download Size: 649 KB - 1.3 MB*


This guide explains the opportunities open to you for migrating applications built using Enterprise Library versions 3.1, 4.0, and 4.1, and versions 1.0 and 1.1 of Unity to use version 5.0 or Enterprise Library and version 2.0 of Unity.

Because individual application scenarios and environments vary, and the way Enterprise Library and Unity are used within existing applications will differ considerably, this guide cannot guarantee success in every situation. However, it contains practical guidance that is based on knowledge gathered during the development of Enterprise Library 5.0, and through test migrations of a range of different existing applications.
…”

It’s like a RTM/RTW kind of month…

 

Related Past Post XRef:
Enterprise Library 4.0 RTW (May 2008)
Unity 1.0, Microsoft's Dependency Injection, Inversion of Control (DI/IOC) Container, has RTW'ed
Enterprise Library 3.0 - April 2007 Released
Enterprise Library for .NET Framework 2.0 RTM (January 2006)
Enterprise Library MSN Messenger Log Listener
"Avanade Integration Pack for Microsoft Enterprise Library Released"
Enterprise Library Logging : Rolling Flat File Sink
Microsoft Enterprise Library Tutorials
Microsoft Enterprise Library WebCasts
Download details: Enterprise Library
Enterprise Library (New release of the patterns & practices Application Blocks)

Wednesday, April 29, 2009

Reference Assistant – Commercial (with free 30 day trial) Visual Studio Add-in to help cure IoC reference headaches

Darren’s Blog - Announcing Reference Assistant 1.0

“The product I have been working on, Reference Assistant, was released a few weeks ago.  Reference Assistant is an extension for Visual Studio 2005 and 2008 (and soon 2010).  In short, the goal of the product is cut down the time spent debugging runtime errors due to missing dependencies or errors in configuration.

ra-logo-320-jpg

Here are a few highlights of the capabilities in version 1.0:

  • Configuration files for Spring.net, Windsor, and Unity can be parsed and displayed visually in a tool window.  Missing or incorrectly spelled types are pointed out (project reference paths are searched for required dependencies). 
  • Navigation to object definitions in supported IoC/DI configuration files
  • Any dependencies detected in configuration files can be automatically copied to the project output directory upon successful build.
  • Reference Paths can be setup automatically using rules setup in preferences.
  • Version conflicts between dependencies are displayed visually and in a tool window.
  • Generate a report of all required assemblies for a project’s deployment, including dependencies defined in IoC framework configuration files.
  • Extensions can be written to support custom file formats or configuration types.

For more detail in addition to the product pages, we have written a blog post walking through the functionality available in Reference Assistant for Spring.net XML configuration.

…”

“Friend of the Blog” Darren Stokes, of Visual Studio Links fame (yes, Daren, Fame!.. Is Visual Studio Links is cool and a must read link blog for Visual Studio developers, so just accept the adulation… ;) has recently released this cool sounding Visual Studio Add-in to help resolve reference pain and suffering. I don’t yet use Spring, Windsor, Unity (yeah, I know, I’m lame… um… shut up?  ;) but I can still see how this add-in could come in real handy.

Friday, September 12, 2008

Still trying to figure out what DI/IoC but are afraid to speak up?

CodeProject - Design pattern – Inversion of control and Dependency injection

  • “Introduction
  • The problem – tight coupling
  • Solution
  • Principles of IOC
  • Ways of implementing IOC
  • Implementing the DI
  • What’s wrong with DI FACTORY?
  • The container way
  • Implementation using Windsor
  • References
  • Other Interview question PDF's

In this section we will discuss about how IOC and DI can help us build loosely coupled software architecture. I am not sure should we call this a design pattern or more of a approach. If you search around the web you will see lot of controversy on whether IOC is a design pattern or not. From my point of view it is a design pattern as it solves a problem context.
It would be great to see actual architectures implementing IOC using container oriented approaches. I am sure it will change the way we think about interaction between components.
So let’s understand in detail about IOC and DI.
…”
I’m not afraid to say it… I’m still trying to wrap my head around DI/IoC. There, I said it! I mean I get it but I am not sure I really "GET” it, know what I mean? (Note to Self: And I probably won't until I start coding with it, so start coding with it dummy!  ;)  (You can tell it's a Friday and I start talking to myself and calling myself a dummy... lol)

And I'd bet there's a silent developer majority our there who might be in the same boat as me. We've heard about it, seen few casts, read a few articles, but have yet to actually jump in...

The above Code Project has a few translation issues, but I liked it. I thought it presented one of the problems DI/IoC is trying to solve well and did a good job (with pictures! ;) explaining why DI/IoC is a good solution. The code samples, using Castle Windsor, are also easy to follow and understand.

This article will not be your only stop on the groking DI/IoC, but it's work a quick pitstop...
 

Friday, April 04, 2008

Unity 1.0, Microsoft's Dependency Injection, Inversion of Control (DI/IOC) Container, has RTW'ed

Microsoft Downloads - Unity Application Block (RegWare)

"...

The Unity Application Block (Unity) is a lightweight, extensible dependency injection container. It facilitates building loosely coupled applications and provides developers with the following advantages:

  • simplified object creation, especially for hierarchical object structures and dependencies.
  • abstraction of requirements; this allows developers to specify dependencies at run time or in configuration and simplify management of crosscutting concerns.
  • increased flexibility by deferring component configuration to the container.
  • service location capability; this allows clients to store or cache the container.

...

  • Microsoft .NET Framework 2.0, 3.0, or 3.5
  • Microsoft Visual Studio 2005 or Visual Studio 2008 development system (any of the the following editions):
    • Stand Edition
    • Professional Edition
    • Team Edition for Software Developers
    • Team Edition for Software Testers
    • Team Edition for System Architects
    • Team Suite
  • " [Description leached in near full]

    Microsoft Downloads - Unity Application Block Documentation for Visual Studio 2005

    "The integrated documentation for the Unity Application Block (Unity) to be used with Visual Studio 2005.

    ..."

    Microsoft Downloads - Unity Application Block Documentation for Visual Studio 2008

    "The integrated documentation for the Unity Application Block (Unity) to be used with Visual Studio 2008.

    ..."

    Now if only I truly knew how to best use and apply this...

    Oh well, I guess you have to start somewhere.  :)

    Friday, March 14, 2008

    Another list from Scott Hanselman - Inversion of Control/Dependency Injection (IoC/DI) Frameworks for .Net

    Scott Hanselman's ComputerZen.com - List of .NET Dependency Injection Containers (IOC)

    "I'm trying to expand my mind around dependency injection in .NET (beyond the two frameworks I've personally used) and an starting to put together a list of .NET Dependency Injection Containers and IOC resources.

    Here's what I've got so far. What am I missing?

    ..."

    The major players are listed as are a few lessor known/mentioned ones. Make sure you also view the comments as there are a couple list there too. Also included are links for additional IoC/DI information.

    Saturday, February 23, 2008

    More IoC - A Castle Windsor and Unity Application Block Comparison

    Matthew Podwysocki's Blog - IoC and the Unity Application Block - Going Deeper

    "I thought after my recent F# post, I'd get back to the Unity post that was halfway done before the firestorm began...

    In a previous post, I showed how easy it was to create a basic application using the Unity Application Block. I'm always finding new ways to solve my problems and new tools to do it.  Since Inversion of Control (IoC) containers are near and dear to my heart, I thought I'd investigate to see whether it meets my needs or not.  It's something you need to determine on your own, whether it works for you.  Some like Spring.NET, others StructureMap, Castle Windsor and so on.

    ...

    Compare/Contrast with Windsor

    Anyhow, today I will focus on a little compare/contrast with Castle Windsor just to show the different styles used.  I'm not going to say one is better than the other, because quite frankly, that's up to you to decide...  I want to thank Dustin Campbell for his help in getting a better code formatter via this post here.

    ..."

    More IoC (Inversion of Control) reading material.

    Also I believe this is my first reference to the very recently released Unity Application Block (a "lightweight extensible dependency injection container with support for constructor, property, and method call injection").

     

    Related Past Post XRef:
    Getting to know IoC (Inversion of Control) Container
    Take a Lunch Break with Windsor IoC Container (part of the Castle Project)

    Thursday, February 21, 2008

    Getting to know IoC (Inversion of Control) Container

    sfeldman.NET - Understanding IoC Container (Part 1)

    "In a multi layered application architecture, loosely coupled code is more than a important. It's the basic which can either help the entire project progress, or drive it down the slope to the end (in the bad meaning of the word). One of the basics to keep coupling as low as possible is Inversion of Control (IoC) container.

    I will try to show how to put in place a simple version of IoC container to allow loosely coupled design. The solution will contain several projects to emulate a layered application as much as possible. The choice of console application is only driven by intent to keep it as simple as possible.

    ..."

    sfeldman.NET - Understanding IoC Container - Part 2

    "I try to lower expectations in order not to be disappointed, but in this case I was asked by several individuals to address the fact that IoC container power is in the ability to "hook" implementer with the contract through an external file, leaving application code unaware of the actual implementer till the run-time, having no reference to implementers' assembly or whatsoever. I am going to expand the sample from the part 1 post to achieve that goal in a couple of days.

    In the last post we left with the application with an ApplicationStartup() method that would register all implementers against the contracts they implement. That causes a serious coupling between the ConsoleApp assembly and the one that implements the XmlLogger, AssemblyTwo. This is not a good idea, especially when we want to be able to replace the implementer without touching/modifying the application itself (by recompiling it).

    ..."

    I've been hearing and seeing discussions on IoC for a bit now and have been wanting to learn more about it (among the zillion other things I want to learn... Man I LOVE software development! :).

    Based on my very limited understanding of IoC Container, it seems that it could help me solve a number of problems (some abstraction and coupling issues I want to address). I've reinvented the wheel a couple times implementing design and runtime abstraction/de-coupling, and I hate that... So I'm thinking/hoping that IoC Container can help me do it "right"...

    (via Reflective Perspective - The Morning Brew #37)

    Sunday, July 29, 2007

    Take a Lunch Break with Windsor IoC Container (part of the Castle Project)

    Digital Blasphemy - Windsor IoC Container in a Lunch Break

    "This is the first post in what will (hopefully) be an occasional series on great tools that are found in many agile developers' toolbox.  The goal of this series is to provide a light introduction to a given technology all the way from the ground up to being able to use the tool in some limited fashion...all in the period of about an hour.  That said, this means that we'll likely be light on theory and edge cases of the tool allowing us to focus only on what we need to start using the tool and then showing you where to look when you need deeper answers.

    Windsor is the Inversion of Control (IoC) container piece of the Castle Project, the same guys that bring you MonoRail.  In the short, IoC containers act as a holding structure for the components of your application allowing you to easily decouple them from one another.  This gives you the flexibility to refactor as necessary, replace live implementations of objects with mocked ones, and basically do whatever is necessary to get your system running well in the shortest amount of time.  Although we'll be talking about Windsor exclusively, you may want to check out other .Net IoC containers such as Spring.NET or Jeremy Miller's StructureMap.

    ..."

    This is a short, lunch break length, example of using Castle to uncouple your components, to provide a method of switching out implementations as needed.

    I've mention in the last that I've thought Windsor and the entire Castle Project looks pretty interesting. And this post just reinforces that...

    (via DotNetKicks.com - Windsor IoC Container in a Lunch Break)