A.Quick Overview
Microsoft Pattern and Practices Enterprise Library (FAQ & Overview)
General Question
What is Enterprise Library
It is collection of reusable configurable and flexible classes that solved repetitive task such as opening/closing data bases, logging etc in plug and play style.
What is the current release
5.0 is the latest release
What purpose it solve
It reduces the overall development time by providing out of box solution for crosscutting concerns like data access, logging , security etc. A feature analysis can be found here
What are main consumers of this library
Any one who is developing enterprise level solution and need adopt a rapid development approach.
What are the main component of the library
How does this library works
Library request container (Unity) to provide a particular service object like Database
Unity looks for DI/PI and return a particular application block (such as database)
Client can use this instance to get the services exposed by instance (such as query/update to database)
What is Container in reference of Enterprise Library
Container can be assumed as very advance version of object factory where object factory creates object and forgot but containers creates object and do complex task like life cycle management, service location , and runtime dependency resolution. It can be viewed as a complex configurable factory + object manager.
What is "Enterprise Library objects"
Theses are conceptual object such as Database that hides level details and provide uniform way of performing intended task
Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>("QuickStarts Instance");
How many ways we can get service object in EntLib
There are two way using default Using the Enterprise Library service locator and Using the container as the service locator both has there own pros and cons as below
Data Access Application Block
What is Data Accessors
It is a mechanism that translate raw data row to strongly typed business entities i.e domain model.
Accessors accept information that is required to extract the data, and mappings that indicate how the input parameters correspond to the parameters of the underlying query.
They use output mappings that define how the returned columns map to the properties of the objects the developer wants to work with, and return a sequence of objects of the specified type.
Data Accessors are designed for querying data only, and not for updating it. They are not designed to provide an Object-Relational Mapping (ORM) solution. Read "Returning Data as Objects for Client Side Querying "
Does DAAB support Asynchronous data access
In Enterprise Library 5.0, the only database type that supports asynchronous operation is the SqlDatabase class.The Database class exposes a Boolean property named SupportsAsync that you can check at run time to determine if asynchronous operations are supported. http://msdn.microsoft.com/en-us/library/ff664710(PandP.50).aspx
Unity Container
What is Unity container ?
Unity container that holds the Enterprise Library configuration information. It provide required information to service locator how to find a particular service instance object such as Database
Cache Application Block
Advance Question
Entity Framework Vs Data Access Application Block
http://forums.asp.net/t/1622820.aspx/1
http://msdn.microsoft.com/en-us/library/ee658113.aspx
More Advance FAQ at codeplex