Microsoft Enterprise Library has a long and prominent history. Over the years, it has evolved into a mature collection of application blocks, each focused on addressing specific cross-cutting concern. New blocks have been introduced, while others become deprecated with the evolution of the .NET Framework and other Microsoft technologies.

In p&p we highly value openness and transparency, and we always look for opportunities to encourage these values. That’s why we are particularly thrilled and proud to announce the Open Development Model for all application blocks which make up Microsoft Enterprise Library.

Concretely, this means:

Starting Thursday, Nov 21, 2013, we will be accepting community contributions to the codebase (both new features and bug fixes), subject to the contribution guidelines.

Microsoft patterns & practices continues to staff the project to curate as well as engage in active development and sustained engineering together with the community.

In the spirit of true open source, the p&p project team will use the same process for making updates to the application blocks as any community member. No secret repositories, hidden issue trackers, or internal-only processes.

Our quality bars are not lowered in any way.

We target friction-free consumption and contribution:

We target friction-free consumption and contribution:

We’ve tried to make each block into a small single purpose library to lower the barrier of entry for both use and contributions. Dependencies have been minimized and most blocks can be used independent of one another.

The entlib.codeplex.com repo has been refactored and split into 10 individual repos and projects on CodePlex, 8 for the blocks, 1 for the common infrastructure and 1 for the reference implementation:

Just in time for the MVP Global Summit, I’m excited to announce the second edition of our guide-primer on the latest Microsoft Enterprise Library. The guide explains the concepts that drove development of the blocks, the kinds of tasks they can accomplish, and how they help you implement many well-known design patterns. And, of course, it explains — by way of code extracts and sample programs — how you can actually use the blocks in your applications.

Welcome to the era of software reuse! Microsoft Enterprise Library helps accelerate development by providing reusable components and guidance on proven practices. This guide helps you to quickly grasp what Enterprise Library v6 can do for you, presents examples that show it in action, and makes it easier for you to start experimenting with Enterprise Library.

Enterprise Library is made up of a series of application blocks, each aimed at managing specific crosscutting concerns. You can use them out of the box, modify them as required, and distribute them with your applications. The main themes for the latest v6 release are: simplifying the library all around, embracing semantic logging, increasing resiliency to errors, and streamlining programmatic configuration of all blocks. The main themes for the latest v6 release are: simplifying the library all around, embracing semantic logging, increasing resiliency to errors, supporting Windows Store apps (Unity, Transient Fault Handling), and streamlining programmatic configuration of all blocks.

The guide explains the concepts that drove development of the blocks, the kinds of tasks they can accomplish, and how they help you implement many well-known design patterns. And, of course, it explains — by way of code extracts and sample programs — how you can actually use the blocks in your applications. Benefit from the capabilities of Enterprise Library, spend more time focusing on your business logic and less on the plumbing. Enterprise Library will do the heavy lifting for you! Happy Coding!

“This guide is an absolute must read for anybody looking to put Enterprise Library into practice. Its clear and pragmatic advice is invaluable.”S. Somasegar, Corporate Vice President, Microsoft Developer Division

“You are holding in your hands a book that will make your life as an enterprise developer a whole lot easier.”Scott Guthrie, Corporate Vice President, Windows Azure

Check out the price on Amazon for the Kindle edition!

Here's a snap from the PDF

If you're thinking about EntLib, it's kind of a no-brainer to get this...

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).

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).

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.

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:

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: version6.

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.

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:

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)

"I love ELMAH – this is one those libraries which is both beautiful in its simplicity yet powerful in what it allows you to do. Combine the power of ELMAH with the convenience of NuGet and you can be up and running with absolutely invaluable error logging and handling in literally a couple of minutes.

Yet, as the old adage goes, with great power comes great responsibility and if you’re not responsible with how you implement ELMAH, you’re also only a couple of minutes away from making session hijacking of your ASP.NET app – and many other exploits – very, very easy. What’s more, vulnerable apps are only a simple Google search away. Let me demonstrate.

Update: I want to make it clear right up front that the out of the box ELMAH configuration does not make any of what you’re about to read possible. It’s only when ELMAH is configured to expose logs remotely and not properly secured that things go wrong. [GD: Emphasis added]

...

Summary

In case I didn’t make it perfectly clear the first few times, this is not a flaw in ELMAH, in fact I think it’s a fantastic tool and I use it extensively in ASafaWeb: https://asafaweb.com/elmah.axd

Whoops, you can’t access that though, can you?! And that’s really the point I’m making – ELMAH can be implemented securely and everything above is no way a recommendation not to use it. But please, please, apply a little due diligence and lock it down properly.

If you do discover your ELMAH logs were publicly visible then decide to lock them down, there’s still the real risk they’ve already been indexed and cached versions are still available, in fact I saw this several times when researching for this post. If you’re in this camp, you want to take a good look at what’s in your (now secure) ELMAH logs and consider what information may have been exposed and is now searchable via the various search engines (remember, it’s not just Google).

...

..."

"With great power..." and all that. When I read this, and clicked on some of the search links, I cringed. I mean, ouch...

Monday, December 27, 2010

[Full Disclosure Notice: The mentioned book was provided to me free by the publisher. This review is my own. The publisher has not seen it, nor prompted me in its content in any way, shape or form. All they did is provide the book free and asked me to review it… ]

Special Offer just for you (my blog readers)! Use the below promotion codes for a 18% discount on the print or ebook editions.

Overview

First off, I’d like to thank Packt for giving me the opportunity to review this book. I’ve been following the Enterprise Library (EntLib) for years (as you can see in the “Related Past Post XRef:” section below) and so when they offered me the chance to review this book I jumped at it.

This book is a high level, from a dev point of view, look at Microsoft’s Enterprise Library. Each of the major Application Blocks that make up EntLib are covered in their own chapters. Given that the book is 257 pages, it provides an introductory, overview, first dev look at these Blocks. Think “Enterprise Library 101.”

The book first gets you the Enterprise Library/code and sets them up to begin their Enterprise Library journey. The following chapters then take the you through the given Block, first introducing you to the given Block, their project references, as in Visual Studio/Add References references, the relations between Blocks, how to configure, call and use each Block. Each chapter is not code heavy, but there is enough to get the message across.

Likes

Clear Inter-Block Dependences. No bones about it, the Enterprise Library can be a monster. This version is much better than past versions, where using one thing would lead to another dependency and then to another and so on and and so on… EntLib v5 is much better in than respect, but there are still times when a given Block’s feature relies on another Block’s capability. I really liked how this book made those dependencies, both required and optional ones, clear.

References (as in Visual Studio Project References). While newly released utilities, like NuGet, make managing Project References much easier, I still liked how the book made the required and optional references crystal clear.

Just enough printed code to get you going. Since this is an overview book, too much code would be a determent. This book provided enough code to get you over the initial learning curve, without being too much. i.e. No pointless code dumps with little purpose just to fill pages…

Block Based Chapters. Being organized into Block based chapters makes it much easier to learn what you need to learn and to use the book as a reference.

Unity. I liked how instantiating each block was shown three different ways; traditional, and two Unity based approaches. This felt like a real world approach to using EntLib fully.

GUI Config and Options. Like I’ve said, EntLib can be a monster. There are just SO many options, switches, knobs and widgets that getting things going and configured can be daunting. Again EntLib v5 is much better than past versions, but there’s so much in it that some config overload is almost impossible to avoid. That’s why I like how the EntLib GUI configuration was shown and discussed for each Block. Just enough information and walk-through to get you going and comfortable without filling the pages with every, single, possible option and choice. Just enough to get going and up the config learning curve.

Improvements/Thoughts (i.e. what else I’d like to see)

These thoughts are not digs at this book, but more toward how this book got me hungry for more… After reading this book I’m very much ready for the “201/301” book. I’m ready to see more real world usage scenarios, deployment and post-deployment/operation information. The book got us started on the road, but from start to finish, the road is long and windy.

I’d also like to see more information about contrib projects and means for extending Enterprise Library. There’s a ton of third parties doing some cool things to extend EntLib. It would be cool to see more of these projects, to avoid re-inventing any wheels, etc.

While the GUI config information was cool, I’d also like to see more config details and options. For example, I’d really like to know more about code based config for EntLib, more information about the EntLib Fluent Config, etc.

More code. Yeah, I know, I know. I just said that the level of code in the book was a good thing and now I saying that I wish there was more? While I am happy with the level of printed code, if I put on my dev hat, I just want more. I learn by example, I learn by seeing code, in seeing stuff being used. So with my dev hat on all I’m saying is that I’m ready for more EntLib usage code snips.

What Did I Learn?

Even though I’ve been following Enterprise Library developments for years, there’s still a good bit that I learned. For example, I did not know that the Data Access Block had the capability to automatically map between POCO’s and data. Yeah, you can use the Data Access Block and its Accessor capability to map an object to parameters and results. Think kind of like Entity Framework, but all in code…

Another example of something I learned was how the Validation Block can be used to validate objects via configuration. Through config only you can set up objects/properties to validate and change the validations post-deployment. Think about having classes where you don’t own the code, but you want to add validations to them, to even change the validations post-deployment. That’s where this capability comes into play. I really liked this idea and have been thinking about how I can use it since I read it…

And that’s just a couple things I picked up from this book. Sometimes to pick something up, to get the zen of it, you need to see the whole of it in front of you (i.e. not broken into bits and pieces that you get from online doc’s, chm’s, blog posts, etc)

Final Thoughts

Who is this book for? I think the perfect person for this book is the technical development manager or project lead who wants/needs an overview of the Enterprise Library. It’s not really for the down and dirty coder looking for depth, but a higher level (but not “business manager” level) look at the Enterprise Library. Say you’re a dev who’s seen this Library, downloaded it and now want to use it in a project, but you have to sell it to your Lead/Manager/etc. They need to learn just enough about the Library to feel comfortable in it and what it does… THAT, in my opinion, is the sweat spot for this book.

All in all I think the book is a good resource and one I will very likely use (to “sell” EntLib to a Lead/Manager/etc ;) in future.

Special Offer (Limited Time)

Below are the discount codes for the following formats: 1. acprbk - Print Book 2. acprebk- e-book

These discount codes are exclusively for you, my readers , which give you a discount of 18%. All you need to do is enter the code in the 'Promotion Code' field on the Packt website and click 'Update' during checkout. The discount will automatically be applied and these discount codes are only valid until January 31st , 2011.

Packt is pleased to announce Microsoft Enterprise Library 5.0, a new book that helps programmers to develop enterprise applications using the enterprise library application blocks as well as set up the initial infrastructure configuration of the application blocks using the configuration editor. Written by Sachin Joshi, this book provides an in-depth knowledge about the individual functional Application Blocks as well as enabling reconfiguration of various applications in order to improve testing of the application in isolation.

Microsoft Enterprise Library is a collection of reusable application blocks designed to assist software developers with common enterprise development challenges. It provides an API to facilitate best practices in core areas of programming including data access, security, logging, exception handling and others. Enterprise Library is provided as pluggable binaries and source code, which can be freely used and customized by developers for their own purposes.

Microsoft Enterprise Library 5.0 gives programmers an overview of the different reusable software components in the Enterprise Library and their inter-dependencies which helps in increasing productivity through the satisfaction of common application concerns. It gives a thorough analysis on the implementation of custom trace listener, log formatter, and log filter as well as configuring the Exception Handling block and wrap.

This book's step-by-step tutorial provides complete guidance towards the development of small applications in order to implement the functions in each application block. Users would be able to configure the Exception Handling block, and wrap or replace exceptions using a Wrap Handler or a Replace Handler. They can also implement a custom Hash Provider and Symmetric Cryptography Provider.

Programmers, consultants or associate architects, interested in developing enterprise applications will find this book an interesting and beneficial read. This book is out now and available from Packt. For more information please visit www.packtpub.com/microsoft-enterprise-library-5-0/book”

Wednesday, April 21, 2010

“Periodically I create a simple summary table of our patterns & practices collection of assets. This helps me analyze the collection as a catalog. To keep it incredibly simple, I organize the catalog by guidance types. This way, at a glance, I can see the collections of guides, patterns, factories, reference implementations, and EntLib. In this case, I also added any work in progress that I was aware of to get a real bird’s-eye view of the catalog.

…

…”

In short, don’t reinvent the wheel if you don’t have to…

Related Past Post XRef: [There’s just to many to reference, I’ve blogged about many/most of these in the past, please search or check the appropriate tags on the right of the blog… thanks :]

“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.”

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.

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. …”