There are very few samples of the Web Client Software Factory that you can download off the Internet, so I have created a sample that not only shows off the Web Client Software Factory v1.1, but also demonstrates the following 3 application blocks in Enterprise Library 3.1:
- Validation Application Block
- Policy Injection Application Block
- Data Access Application Block
Regarding the Validation Application Block, I also used the PropertyProxyValidator Controls in replace of ASP.NET Validation Controls to provide UI validation on the webforms. I mentioned the ASP.NET Integration before as a way to avoid duplicating your validation logic in both the UI and Business Layers. Because the PropertyProxyValidator Controls require a postback, I wrapped the form and validation controls in an AJAX UpdatePanel for a better user experience.
The Policy Injection Application Block uses the ValidationCallHandler and CachingCallHandler to provide both validation and caching of business objects for the CustomerDAO Service. The DAO uses a wrapped Data Access Application Block ( IDatabase ) for storage and retrieval of data to a SQL Server Express Database via stored procedures.
The View-Presenter Pattern in the Web Client Software Factory is implemented to keep the web pages as simple views. Dependency Injection is provided by the Composite Web Application Block and ObjectBuilder.
Application Controller classes are used in the sample only to introduce them. In such a simple CRUD style application they are un-necessary in my opinion. One could have easily just accessed the CustomerDAO, in this case, from the Presenter class.
It is a very simple example, but shows off quite a few features of the Web Client Software Factory and integration with Enterprise Library. Sample photos are shown below:


Download the Source Code from the Downloads Page.