微软的应用程序块学习笔记

 

2004年项目组干到现在(有四个月了吧)吧,代码也有8万行了,但总感觉这些所以这些代码一直是我的一块心病,所以等2004年底项目阶段汇报告一段落后,终于有点时间对代码进行整改了。先上网google了一番,
    最近准备在项目中使用微软的应用程序块(Application Block), 主要是感觉项目中有一些核心代码有些乱,随着项目的不断推进,对这些代码的轻微更改,会影响所有的其它代码,而且这些代码对于任何一个项目开始时都会遇到,实际上微软已经为我们想到了,还有专门的网站,这就是patterns & practices
, 不妨直译为“模式与实践”吧,网站主要包括两部分内容:一部分是指南(guides另一部分是代码或应用程序块(Code/Blocks)指南就是微软的专业人士写的一些文章,对各个方面提出设计上的一些思路;应用程序块就是按照这些思想写的一套类库,当然同时提供了源代码。网上也有人翻译了其中的一些文章,但不全也不成体系,所以E文不错的话,最好还是到微软的英文站点上去吧。

首先,先来看看微软制作这个网站的目的是什么?在他的About网页上是这样说的:

If you design, deliver, or manage enterprise systems on the Microsoft platform, patterns & practices provides the best foundation to base your solution on. Patterns & practices provide proven architectures, production quality code, and lifecycle best practices. Download the guidance or order convenient books.

Microsoft patterns & practices guides contain specific recommendations illustrating how to design, build, deploy, and operate architecturally sound solutions to challenging business and technical scenarios. They offer deep technical guidance based on real-world experience that goes far beyond white papers to help enterprise IT professionals, information workers, and developers quickly deliver sound solutions.

Patterns & practices guides are reviewed and approved by Microsoft engineering teams, consultants, Product Support Services, and by partners and customers. Patterns & practices guides are:

l         Proven—They are based on field experience.

l         Authoritative—They offer the best advice available.

l         Accurate—They are technically validated and tested.

l         Actionable—They provide the steps to success.

l         Relevant—They address real-world problems based on customer scenarios.

Patterns & practices guides are designed to help IT professionals, information workers, and developers:

Reduce project cost

l         Exploit the Microsoft engineering efforts to save time and money on your projects.

l         Follow the Microsoft recommendations to lower your project risk and achieve predictable outcomes.

Increase confidence in solutions

l         Build your solutions on proven Microsoft recommendations so you can have total confidence in your results.

l         Rely on thoroughly tested and supported guidance, but production quality recommendations and code, not just samples.

Deliver strategic IT advantage

l         Solve your problems today and take advantage of future Microsoft technologies with practical advice.

总之,一句话,照微软说的做没错的。

 

然后,再来看看他的FAQ,发现FAQ还是相当的简单:

Q

What is the patterns & practices development process?

A

Microsoft product groups develop patterns & practices guides based on common customer scenarios. Each engineering solution described in a patterns & practices guide is developed and tested by an interdisciplinary team made up of representatives from Microsoft product development teams, Microsoft and partner consulting organizations, Microsoft Product Support, and the Microsoft Information Technology Group. Customers and partners with experience in the problem domain may also participate.

Every patterns & practice recommendation is rigorously reviewed and tested throughout the development cycle, including solution architecture, design, and code reviews followed by thorough software and content testing.

The result, in every case, is a thoroughly engineered and tested set of recommendations that can be followed with confidence by Microsoft customers and partners.

Q

How do patterns & practices guides relate to the MSDN .NET Architecture Center?

A

The MSDN .NET Architecture Center is the place to start for the overall Microsoft approach to enterprise architecture. The patterns & practices guides support the big picture with guidance geared to specific scenarios within the overall architecture.

Some patterns & practices guides address topics that are not architectural or are not based on .NET products.

Q

Where can I find patterns & practices guides?

A

The easiest way to find patterns & practices guides is through this Online Index. The Online Index provides links to the individual patterns & practices guides for easy review in HTML, no matter where the actual content is stored. Each guide can also be downloaded. Look for the link on the guide’s overview page.

Many guides also are published as books. If a guide has been published, you’ll see a link on its overview page. For a complete list of available titles visit the patterns & practices online shop.

 

微软已经提供了许多的模式与实践的指南,以及相应的应用程序块。在网站上有多种分类方式,由于我们的项目中想重点使用数据访问块、配置管理块、异常处理块、日志处理块,所以其它都先不看了。

另外从Coming Soon上知道,微软准备把一些常用的应用程序块集成在一起称为“企业库”(Enterprise Library),即将发布的1.0版本包括以下应用程序块:数据访问(data access),异常处理(exception handling),缓存(caching),配置(configuration),日志(logging),安全与加密(security and cryptography)不过这个库目前还没有正式发布,只是提供给合作伙伴使用,暂时不公开,现在我们还只能从网站上下载各个单独的应用程序块来使用。 (2005年1月,企业库发布了第1个版本,可以下载了)

 

中英文对照表:

patterns & practices

模式与实践

Application Blocks

应用程序块

Enterprise Library

企业库

data access

数据访问

exception handling

异常处理

caching

缓存

configuration

配置

logging

日志

security and cryptography

安全与加密

posted @ 2005-01-06 22:53  申龙斌的程序人生  阅读(2774)  评论(7编辑  收藏  举报