Javen-Studio 咖啡小屋

http://javenstudio.org - C++ Java 分布式 搜索引擎
Naven's Research Laboratory - Thinking of Life, Imagination of Future

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  24 随笔 :: 57 文章 :: 170 评论 :: 4 Trackbacks
Enterprise Library 4.1 - October 2008
Design of the Validation Application Block

The Validation Application Block is designed to do the following:

  • Encapsulate the logic used to perform the most common validation tasks into minimal application code.
  • Relieve developers of the requirement to write duplicate code and custom code for common validation tasks.
  • Allow validation rules to be changed after the application has been deployed, and ensure that changes happen simultaneously and consistently.

Figure 1 illustrates the interrelationships between the key classes in the Validation Application Block.

Dd203123.a5baba41-5f55-4650-a7f9-e5084c0f6135(en-us,MSDN.10).png

Figure 1: Diagram of Validation Application Block

The client code can call the Validation façade, which allows you to create a validator and validate an object with a single line of code. Alternatively, it can call the ValidationFactory class to create a validator and then call the Validate method on the Validator class to perform the check.

posted on 2008-12-29 13:28 Javen-Studio 阅读(356) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理