EntLib Contrib is just the newest release (released in September 2007) .
http://www.codeplex.com/entlib
The idea of Enterprise Library is to build reusable software blocks
to make .Net application more consistent, robust and to simplify
the development.
EntLib is built on top of .Net Framework. It is composed of a number
of blocks. Some blocks are depreciated in faver of the functionality of new .Net Framework version. The Security block, for example, is
depreciated in favor of the Membership in .Net 2.0.
The blocks include:
- Caching
- Data Access (now called Repositary Factory)
- Logging
- Exception Handling
- Cryptography
- Config Helpers Design
- Object Builder
- Instrumentation
Tom Hollander' blog provided three videos about Enterprise
Libraryhttp://blogs.msdn.com/tomholl/archive/2007/04/10/enterprise-library-the-videos.aspx
Introduction of Repository Factory
As part of Patterns and Practices, Repository Factory is a new
version of Data Access Guidance Factory. It was part of the Web
Service Factory and the team makes it a seperate package so that
it can be used generally.
Repository Factory is a package that automates the coding to map
database repository to entity classes. It is designated to
automate the domain model which most applications have.
However, Reporsitory Factory is not intended to be a full-
fledged ORM solution, but rather a light weight code generator
for most hand-coding effort in building domain model objects
and persist them to a database.
The following links to Microsoft Repository Factory Demo - MSN
Videohttp://video.msn.com/video.aspx/?mkt=en-us&vid=61ed607a-fd42-
48cb-bf8f-14cbf921a26f&wa=wsignin1.0
Exception HandlingA "Exception Policy" maps a type of exception to an action.
e.g.Type ApplicationException should be loggedSqlClientException should be caught and wrapped into
DataLayerException and rethrownSecurityException should be replaced with AccessDeniedException
and re-thrown
The actions inlude:LoggingWrappingReplacingand other custom actions
the code is like:
try{
// some code}catch(Exception ex){if(ExceptionPolicy.HandleException(ex, "DataLayer")){throw;} }
No comments:
Post a Comment