Microsoft .NET Framework 2.0 Application Development Foundation 翻译系列2(第一章:框架基本原理)

 

Chapter 1: Framework Fundamentals

第一章:框架基本原理

Overview概述

The .NET Framework is an integral Microsoft Windows component designed to support next-generation applications and services.

.net 框架是微软windows组成的重要部分,它被设计用来支持下一代应用程序和服务.

 Many fundamentals of the .NET Framework will be familiar to developers who have worked in other object-oriented development environments;

.net 框架中的许多原理会让那些在OOD环境工作过的开发人员感到熟悉.

however, the .NET Framework also includes many unique elements that will be new to even the most experienced developers.

无论如何,.net 框架同样包含许多即使是大量富有经验的开发人员也会感到新颖的独特原理.

This chapter provides an overview of .NET Framework programming, including knowledge required for every other chapter in this book.

本章提供了一个.net框架设计的概述,包含了本书中其它章节会用到的知识.

 

.NET 2.0 

If you have worked with versions of the .NET Framework released prior to version 2.0, much of this will be familiar. However, version 2.0 of the .NET Framework includes several new features: generics, partial classes, and type forwarding (all described in Lesson 3, "Constructing Classes").

如果你已经使用过.net框架2.0以前的版本,很多都会感到熟悉.

无论任何,net2.0包含了几个新的特点:泛型, partial classes(没找到具体的名字.它的含义下面有介绍.暂时叫飞类),类型传递(不是很明白?下面有它的介绍.)这些在第三章的构建类都有描述.

什么是partial classes

Partial classes允许在多个不同文件上定义类。每个文件都包含一个规则的类定义。这不是.NET所采用的面向对象开发特征;恰当地说,它服务于Visual Studio .NET寻址问题(从微软的立场来说)。

熟悉Visual Studio并且知道它如何为WebWindows窗体等元素产生代码。这些元素的类文件使用窗体名并且包含在文件中。使用这些代码会有些迷糊,因为自动产生的代码与用户自己编写的代码混到一起。

Visual Studio 2005通过使用partial classes采用了不同的方法。IDE产生的代码包含在自身的类文件中。用户自己编写的代码通过单独的类文件添加进来,其他开发人员编写的代码也可以通过partial class类文件添加。编译器在编译过程中将多个partial class组合成一个类进行处理。编译得到的中间语言也是如此,它不管使用一个或多个类。

Type Forwarding指的是:.NET运行时将对某一个程序集(Assembly)之中定义类型的引用转递为对另外一个或者几个(更新的)Assembly之中同样类型的引用。

通过Type forwarding,所有引用(Reference)Original程序集的程序会去引用新的程序集。 

Exam objectives in this chapter: 本章目标

  • Manage data in a .NET Framework application by using the .NET Framework 2.0 system types. (Refer System namespace)
  • 通过使用.net2.0框架系统类型在.net框架应用程序中管理数据.
    • Value types值类型
    • Reference types引用类型
    • Attributes属性
    • Generic types泛型类型
    • Exception classes异常类
    • Boxing and UnBoxing装箱与拆箱
    • TypeForwardedToAttribute Class 将类型传递给属性的类.
  • Implement .NET Framework interfaces to cause components to comply with standard contracts. (Refer System namespace)
  • 使用标准规范实现导致控件响应的net框架接口
    • IComparable interface
    • IDisposable interface
    • IConvertible interface
    • ICloneable interface
    • IEquatable interface
    • IFormattable interface
  • Control interactions between .NET Framework application components by using events and delegates. (Refer System namespace)
  • 用事件和代理(委托)控制.net控件应用程序控件间的通信(交互).
    • Delegate class代理(委托)
    • EventArgs class事件参数类
    • EventHandler delegates代理(委托)事件句柄.

 

Before You Begin在你开始之前

This book assumes that you have at least two to three years of experience developing Web-based, Microsoft Windows-based, or distributed applications by using the .NET Framework 1.0, the .NET Framework 1.1, and the .NET Framework 2.0.

本书假设您已经拥有了最少2-3年的使用.net1.0,1.1,2.0开发基于web,微软window,或者分布式应用程序的经验,

Candidates should have a working knowledge of Microsoft Visual Studio 2005.

报考者具有Microsoft Visual Studio 2005的使用知识

Before you begin, you should be familiar with Microsoft Visual Basic or C# and be comfortable with the following tasks:

在你开始前,你熟悉微软Visual Basic C# ,并且能轻松的完成下列任务:

·         Create a console or Windows Forms application in Visual Studio using Visual asic or C#.

·         vbc#Visual Studio中建立控制台或windows 窗体应用程序

·         Add namespaces and references to system class libraries to a project.

·         给一个项目添加namespace(命名空间)和引用系统类库

·         Run a project in Visual Studio, set breakpoints, step through code, and watch the values of variables.

·         Visual Studio中运行项目,设置断点,逐步调试,和查看变量的值.

 

你可能感兴趣的:(application)