首页 新闻 论坛 群组 Blog 文档 下载 读书 Tag 网摘 搜索 开源 FAQ 第二书店 博文视点 程序员
频道: 研发 数据库 中间件 信息化 视频 .NET Java 游戏 移动 服务: 人才 外包 培训

       
热门搜索: ASP.NET Ajax Spring Hibernate Java
【翻译】强声明式编程(strong declarative programming)
 
2007-1-30 8:30:04     来自: GingerbreadMan   
评论: .NET企业服务框架:应用.NET企业服务开发分布式业务解决方案   
  【原书评内容】
Nagel takes us on a guided tour of what .NET has to offer the programmer. The book shows the advantages of .NET over the earlier COM approach to writing distributed code in a Microsoft environment. A key advantage being that under COM, your components had to be registered with the Registry. Whereas under .NET, this is totally unnecessary. Very nice. Interacting with the Registry has been a perennial sore point for some programmers. So under .NET, your components are, in this sense, more encapsulated and hence easier to maintain.

The virtues of writing a multitier application are explained. This is where you factor your code into 3 parts - UI, business logic and database server. (Or even more parts, depending on your circumstances.) How to do this in .NET takes up the bulk of the book. For example, the UI code shows how you might use ASP.NET to help build those components. While connecting to a database server can involve the use of ADO.NET.

The subtitle of the book refers to business solutions. An important consequence is the need for atomic transactions when using a database. So an entire chapter is devoted to showing how .NET enables this.

An important strength of .NET that emerges from the book is that it lets you do a lot of declarative programming, instead of procedural programming, to invoke components with useful functionality. The declarative effort is done by changing attributes in the XML metadata describing a component. Often, this is easier than writing a desired function by hand, and more robust against bugs.

Reviewer: W Boudville (US)
【翻译内容】
Nagel向读者展示了.NET带给程序员的一切。本书展示了在微软编程环境中编写分布式代码时,.NET 相比COM方法的优点。其中重要一点是:在COM下,你必须将组件在注册表中注册。而在.NET下,这完全不需要。这非常棒。与注册表打交道总是让很多程序员头疼。因此,在.NET下,你能更好地封装组件并维护。
本书还解释了多层程序的优点。在这里,你将程序分解成三层--UI、业务逻辑和数据库服务器。(还可以更多,这拒绝于具体环境)如何使用.NET 完成这种程序占用了大量篇幅。例如,UI代码演示了如何使用ASP.NET编写组件。而连接数据库包含了ADO.NET的使用。
书的副标题提到了商务解决方案。使用数据库处理原子事务的需求非常重要。因此有一整章内容介绍如何使用.NET完成这项功能。
本书提到的.NET的一个重要优势是它允许你进行声明式编程,而不是顺序化编程。你可以根据功能调用函数。这是通过改变声明组件的XML元文件中的属性来实现的。通常,这比手工声明函数更容易,而且更不易出错。


 
此评论对0人有用 对你 有用   没用      
您的回应。。。。。。
验证码:   请先登录再留言