Friday, May 14, 2010
IoC and the Unity Application Block - Going Deeper
http://weblogs.asp.net/podwysocki/archive/2008/02/22/ioc-and-the-unity-application-block-going-deeper.aspx
(...)
Update: Fixed code changed from CTP and More in the series:
IoC and Unity - The Basics and Interception
IoC and the Unity Application Block Once Again
IoC Containers, Unity and ObjectBuilder2 - The Saga Continues
IoC Container, Unity and Breaking Changes Galore
(...)
(...)
Update: Fixed code changed from CTP and More in the series:
IoC and Unity - The Basics and Interception
IoC and the Unity Application Block Once Again
IoC Containers, Unity and ObjectBuilder2 - The Saga Continues
IoC Container, Unity and Breaking Changes Galore
(...)
Unity Dependency Injection IoC Screencast
http://www.pnpguidance.net/Screencast/UnityDependencyInjectionIoCScreencast.aspx
(...)
Unity IoC Screencast
The Unity Dependency Injection / IoC Container is new from Microsoft Patterns and Practices. It will come in both a stand-alone version and bundled within Enterprise Library 4.0 as an alternate configuration mechanism for the application blocks. This screencast shows several common usages of Unity as well as how to use Unity with both the ASP.NET MVC Framework and with ASP.NET Webforms using Model-View-Presenter.
The screencast highlights:
ASP.NET MVC Framework.
ASP.NET Model View Presenter Pattern.
UnityContainer Resolve and BuildUp Methods
UnityContainer RegisterType and RegisterInstance Methods
UnityConfigurationSection for Web.config and App.config
(...)
(...)
Unity IoC Screencast
The Unity Dependency Injection / IoC Container is new from Microsoft Patterns and Practices. It will come in both a stand-alone version and bundled within Enterprise Library 4.0 as an alternate configuration mechanism for the application blocks. This screencast shows several common usages of Unity as well as how to use Unity with both the ASP.NET MVC Framework and with ASP.NET Webforms using Model-View-Presenter.
The screencast highlights:
ASP.NET MVC Framework.
ASP.NET Model View Presenter Pattern.
UnityContainer Resolve and BuildUp Methods
UnityContainer RegisterType and RegisterInstance Methods
UnityConfigurationSection for Web.config and App.config
(...)
Automatic Factories in Unity 2 - Unity 2 Tutorials and Samples
http://www.davidhayden.me/2010/01/automatic-factories-in-unity-2-unity-2-tutorials-and-samples.html
(...)
In Unity 2 there is the concept of Automatic Factories to allow classes or services to defer instantiation of their dependencies to the last possible moment. This is particularly useful when the dependency is expensive to create and is not always used by the service. Think of it as lazy loading of dependencies just like we have lazy loading in O/R Mappers.
I mentioned similar functionality in Autofac in the following tutorial: Auto-Generated Factories in Autofac for Lazy Instantiation - LazyDependencyModule. I recommend you read that tutorial as it talks more about the concepts, etc., whereas here I will only mention a few comments and show you an example. Autofac also goes a bit further than Unity 2 by supporting Lazy and Lazy when using Autofac with the .NET Framework 4.
(...)
(...)
In Unity 2 there is the concept of Automatic Factories to allow classes or services to defer instantiation of their dependencies to the last possible moment. This is particularly useful when the dependency is expensive to create and is not always used by the service. Think of it as lazy loading of dependencies just like we have lazy loading in O/R Mappers.
I mentioned similar functionality in Autofac in the following tutorial: Auto-Generated Factories in Autofac for Lazy Instantiation - LazyDependencyModule. I recommend you read that tutorial as it talks more about the concepts, etc., whereas here I will only mention a few comments and show you an example. Autofac also goes a bit further than Unity 2 by supporting Lazy
(...)
Microsoft Unity 2.0 – April 2010
http://msdn.microsoft.com/en-us/library/ff663144.aspx
(...)
What Does Unity Do? This topic provides a brief overview that will help you to understand what Unity can do, and explains some of the concepts and features it incorporates. It also provides a simple example of the way that you can write code to use Unity.
When Should I Use Unity? This topic will help you to decide if Unity is suitable for your requirements. It explains the benefits of using Unity, and any alternative techniques you may consider. It also provides details of any limitations of Unity that may affect your decision to use it.
About This Release of Unity. This topic contains information about the changes in this release, the target audience and system requirements, migration and side-by-side execution, and links to other Microsoft patterns & practices resources.
Configuring Unity. This topic describes how you can populate a Unity container with the type registrations, mappings, extensions, and other information required by your application.
Using Unity in Applications. This topic explains how to use Unity in your own applications. It explains how to add Unity to your application, how to resolve objects, and how to take advantage of the many other capabilities of Unity.
Design of Unity. This topic explains the decisions that went into designing Unity and the rationale behind those decisions.
Extending and Modifying Unity. This topic explains how to extend Unity and how to modify the source code.
Deployment and Operations. This topic explains how to deploy and update the Unity assemblies and use the instrumentation exposed by Unity.
(...)
(...)
What Does Unity Do? This topic provides a brief overview that will help you to understand what Unity can do, and explains some of the concepts and features it incorporates. It also provides a simple example of the way that you can write code to use Unity.
When Should I Use Unity? This topic will help you to decide if Unity is suitable for your requirements. It explains the benefits of using Unity, and any alternative techniques you may consider. It also provides details of any limitations of Unity that may affect your decision to use it.
About This Release of Unity. This topic contains information about the changes in this release, the target audience and system requirements, migration and side-by-side execution, and links to other Microsoft patterns & practices resources.
Configuring Unity. This topic describes how you can populate a Unity container with the type registrations, mappings, extensions, and other information required by your application.
Using Unity in Applications. This topic explains how to use Unity in your own applications. It explains how to add Unity to your application, how to resolve objects, and how to take advantage of the many other capabilities of Unity.
Design of Unity. This topic explains the decisions that went into designing Unity and the rationale behind those decisions.
Extending and Modifying Unity. This topic explains how to extend Unity and how to modify the source code.
Deployment and Operations. This topic explains how to deploy and update the Unity assemblies and use the instrumentation exposed by Unity.
(...)
Dependency Inversion Principle
http://blogs.developpeur.org/tja/archive/2010/02/10/design-patterns-partie-2-dip-dependency-inversion-principle.aspx
(...)
What Does Unity Do? This topic provides a brief overview that will help you to understand what Unity can do, and explains some of the concepts and features it incorporates. It also provides a simple example of the way that you can write code to use Unity.
When Should I Use Unity? This topic will help you to decide if Unity is suitable for your requirements. It explains the benefits of using Unity, and any alternative techniques you may consider. It also provides details of any limitations of Unity that may affect your decision to use it.
About This Release of Unity. This topic contains information about the changes in this release, the target audience and system requirements, migration and side-by-side execution, and links to other Microsoft patterns & practices resources.
Configuring Unity. This topic describes how you can populate a Unity container with the type registrations, mappings, extensions, and other information required by your application.
Using Unity in Applications. This topic explains how to use Unity in your own applications. It explains how to add Unity to your application, how to resolve objects, and how to take advantage of the many other capabilities of Unity.
Design of Unity. This topic explains the decisions that went into designing Unity and the rationale behind those decisions.
Extending and Modifying Unity. This topic explains how to extend Unity and how to modify the source code.
Deployment and Operations. This topic explains how to deploy and update the Unity assemblies and use the instrumentation exposed by Unity.
(...)
(...)
What Does Unity Do? This topic provides a brief overview that will help you to understand what Unity can do, and explains some of the concepts and features it incorporates. It also provides a simple example of the way that you can write code to use Unity.
When Should I Use Unity? This topic will help you to decide if Unity is suitable for your requirements. It explains the benefits of using Unity, and any alternative techniques you may consider. It also provides details of any limitations of Unity that may affect your decision to use it.
About This Release of Unity. This topic contains information about the changes in this release, the target audience and system requirements, migration and side-by-side execution, and links to other Microsoft patterns & practices resources.
Configuring Unity. This topic describes how you can populate a Unity container with the type registrations, mappings, extensions, and other information required by your application.
Using Unity in Applications. This topic explains how to use Unity in your own applications. It explains how to add Unity to your application, how to resolve objects, and how to take advantage of the many other capabilities of Unity.
Design of Unity. This topic explains the decisions that went into designing Unity and the rationale behind those decisions.
Extending and Modifying Unity. This topic explains how to extend Unity and how to modify the source code.
Deployment and Operations. This topic explains how to deploy and update the Unity assemblies and use the instrumentation exposed by Unity.
(...)
Enterprise Library 4.0 Logging Application Block and Unity IoC Screencast
http://www.pnpguidance.net/Post/EnterpriseLibrary4LoggingApplicationBlockUnityIoCScreencast.aspx
(...)
Enterprise Library 4.0 Logging Application Block with Unity IoC Integration Screencast
A new screencast showing off the use of the Enterprise Library 4.0 Logging Application Block using the EnterpriseLibraryCoreExtension and LoggingBlockExtension that provide Unity IoC Integration. It shows one how to register the Logging Application Block LogWriter Class and how Unity injects the LogWriter Class into your own custom classes.
The screencast highlights:
Enterprise Library 4.0 Logging Application Block.
Unity IoC.
EnterpriseLibraryCoreExtension.
LoggingBlockExtension.
UnityContainer
Injecting LogWriter Classes into Custom Classes.
(...)
(...)
Enterprise Library 4.0 Logging Application Block with Unity IoC Integration Screencast
A new screencast showing off the use of the Enterprise Library 4.0 Logging Application Block using the EnterpriseLibraryCoreExtension and LoggingBlockExtension that provide Unity IoC Integration. It shows one how to register the Logging Application Block LogWriter Class and how Unity injects the LogWriter Class into your own custom classes.
The screencast highlights:
Enterprise Library 4.0 Logging Application Block.
Unity IoC.
EnterpriseLibraryCoreExtension.
LoggingBlockExtension.
UnityContainer
Injecting LogWriter Classes into Custom Classes.
(...)
Subscribe to:
Posts (Atom)