发新话题
打印

An Introduction to Windows Presentation Foundation中文翻译 一

本主题由 wpf 于 2007-12-12 14:08 设置高亮

An Introduction to Windows Presentation Foundation中文翻译 一

前言
        WPF是在.NET3.0中三个F(WCF,WPF,WWF)中的一个。
        WPF是将来应用程序中的一个非常重要有活力的组成部分,允许开发者在开发富媒体表现层时候拥有绝对的权利。
        我的第一个专业程序经验是通过使用VB3.0来开发文字界面和配置WINDOWS图像界面。。。通过使用WPF来开发windows用户富媒体界面会给用户一个很好的体验。
        这本书是基于七月WPF预览交流大会,到你买到这本书的时候,技术可能会稍微的发展——毕竟这是一本基础书籍;它将教你基本技术和了解基本开发过程。
        我希望你很愉快的阅读如同我写这本书一样。
Laurence Moroney



第一章WPF介绍
        欢迎来到WPF:WPF介绍。这本书将让你感受微软VISTA系统框架下的体验
        如果你还不知道WPF,没关系——马上就会了。您将体验到来自用户、开发者和设计人员令人注目的的强大体验,会有以前任何应用程序中所没有见过的效果。
        这章将带你进去一个WEB应用程序和用户界面开发的新格局,带给你应用程序架构和讲述WEB应用程序架构,并展示哪些地方适合WPF应用以及它怎么和WCF,WWF一起应用的。

        层架构介绍:从过去到未来
        表现层发展是从一个轻量级到重量级的循环的过程。用户额外功能性程序需求和简单安装部署升级以及维护需求。每一次循环,轻量级用户赢得了丰富的功能,重量级表现层也变得容易安装、升级和维护。
        最初的用户界面是对客户端要求最低——通过打卡机到中心服务器来实现打印结果数据。图1-1显示了这种简单的请求/相应模式。
        随着计算机的普及,打卡机和打印机被部署到终端来提供来自服务器的数据结果。For basic processing this was useful, but as the requirements for computer applications
became more sophisticated°(TM)for example, to support e-mail or network news°(TM)the termina
had to get smarter. If you remember the old terminal-based e-mail programs such as elm or
the network newsreaders, you°Oll remember needing three or four extra fingers to do anything useful! Architecturally, this wasn°Ot much different from the punch-card request/respons
architecture, but it unified the point of contact with the mainframe and changed the medium
from paper to electrons. So although the architecture did not change, the implementation
did°(TM)and it was this change in implementation that was a driving factor in improving th
overall user experience of applications, a fact that is still true today.这样基本的数据处理满足了,但是调整需求将变得  比如,在终端支持EMAIL和网络新闻变的巧妙。如果你记得老的email程序或者网络新闻阅读人,你将需要三四个动作去做有用的任何事情,但是他统一了通讯主服务器并改变从纸到电子的介质。所以尽管这种架构不改变,那么实施后会需要改进并且现在已经证实。
With the advent of the personal computer, much of the old server functionality wasn°O
necessary anymore. This was because the main use of servers at that time was for functions
that could easily take place on a personal computer, such as calculations or analyses
(see Figure 1-3). Functionality that required connectivity, such as e-mail and network
newsreaders, could still be achieved on a personal computer through terminal emulation.
        随着个人PC的出现,老式的服务器将不再需要。这是因为他们取代不了个人电脑比如计算或者分析(看1-3),程序需要联通比如EMAIL和网络以及新闻阅读者,仍可以通过终端的个人电脑获得。
Then someone had the bright idea of using the power of the personal computer to
enhance the online experience, moving away from the green-and-black terminal toward
a user interface that allowed content such as e-mail, news, and graphics to appear in full
four-color glory (see Figure 1-4). The personal computer flourished in power, and the early
personal computers gave way to much more powerful machines with better graphics, faster
processing chips, more memory, andpersistent storage through hard drives.
        如果有人想通过个人电脑的功能来争强这种联网体验,。。。。。这是讲发展历史省略翻译。
The Windows SDK
        The Windows SDK包含了所有开发下一代windows应用程序的api,包括VISTA和支持的操作系统。including the technology that was formerly available as part of the
WinFX API.并包含以前WINFX API。
The Windows SDK is centered on the .NET Framework 3.0, sometimes called NetFX,
which contains the classes you are familiar with from the .NET Framework 2.0 in addition to
WPF, WCF, and WWF.
        The Windows SDK 是基于.NET3.0框架,有时候称为NETFX,也就是在.NET2.0基础上添加了WPF WCF和WWF.

The .NET Framework
The .NET Framework is the core API that contains all the classes and data types that are
shared by Windows applications. It is a core Windows component that supports building
running managed applications. It provides a consistent, language-independent, object-
oriented programming environment where code is stored and executed in a controlled
manner. This code, called Microsoft Intermediate Language (MSIL) code, is byte code
compiled from source code that can come from many high-level languages, including C#
and Visual Basic 2005, and executes on a virtual machine, the CLR.
        .NET框架是包含开发windows程序的核心API库。它是windows允许应用程序的重要组成部分。它提供了一个稳定的,跟语言无关的程序设计环境。这种语言叫做MSIL语言,是各种高级语言如C#,VB.NET和CLR编译称机器语言的一个中间语言。
        It also provides a large suite of classes in the .NET class library, organized and grouped logi-
cally into namespaces, commonly called the .NET Framework class library or the .NET SDK.
        它同样提供了一个强大的类库,被成为.NET Freamework或者.NET SDK.
The CLR is the foundation of the .NET Framework, and it manages how the code exe-
cutes, providing services such as memory management, thread management, and, in the case of distributed applications, remoting. It enforces type safety and other forms of security serv-
ices that prevent applications from being exploited by hackers. Because the code runs as byte
code on the CLR, backed up by the .NET SDK, it is more distributable, and compiled program
(generally called assemblies) do not need to be distributed with a plethora of runtime depend
encies, as they did pre-.NET. Of course, if a program uses dependency assemblies that also ru
on the CLR that are not part of the standard SDK, then these would be distributed alongside
your program. So although the .NET Framework architecture has drastically improved the
ease in which an application is distributed, it still can have some complications.
        CLR是.NET框架的基础,它管理着代码怎么执行,提供各种服务象内存管理,线程管理,分布式应用程序管理,remoting等。它保证了应用程序的安全。。。。

以下是分别介绍wcf wpf wwf
Windows Communication Foundation
WCF is the core of service-oriented communications applications for the Windows platform.
It is built on top of web service standards and is designed for the needs of service-oriented
architecture (SOA) and software as a service (SAAS). Thephilosophy behind these is that soft-
ware should be built out of finely grained, loosely coupled components with well-defined
interfaces that communicate using standard protocols.
Web services were the beginning of this trend, where business logic is implemented in a
technology-agnostic manner, exposing an XML-based interface using a language called Web
Services Description Language (WSDL). Developers can then use an XML message in a format
called Simple Object Access Protocol (SOAP), which is derived from XML, to communicate
with the service.
However, web services are limited and do not support some enterprise-class functionality
such as security, reliability, and transactability without complicated add-ons at a minimum.
WCF is designed to allow for all of this and a whole lot more; it provides an API that allows
services to be implemented without having to think too much about the underlying plumb-
ing, which allows the developer to concentrate on the business logic.
WCF provides the service-oriented programming model, built on the .NET Framework, and
unifies the typically diverse suite of distributed system capabilities, including standard static
web services, messaging, transactions, and remoting into a single API. It also supports multiple
transport types, messaging patterns, encodings, and hosting models. It subsumes some of the
different technologies of .NET that you may already be familiar with, such as ASP.NET web
services (ASMX), Web Services Enhancements (WSE), .NET Remoting, Enterprise Services, and
System.Messaging.

TOP

WCF provides a new namespace, called System.ServiceModel, which provides the tools
for a number of distributed application scenarios:
?Messaging, both one-way and duplex
?Remote procedure calls
?Callbacks
?Sessions
?Reliability through queued messaging
?Multiple contract services
?Security
?Ordered delivery of messages
?Transactions
WCF is a huge and drastically important API in its own right and is worthy of several
books. I°Oll be touching on it from time to time in this book, particularly in some of the exam
ples that provide the back end to the WPF front ends that you°Oll be developing in this book




Windows Workflow Foundation
WWF, announced at Professional Developers Conference 2005, is a vital part of the three
pillars of the WinFX API; it providesa programming model that is used for developing and
executing applications that require a long-running, stateful, persistent workflow, as is crucial
in many business applications. It takes some of the functionality that was previously available
only to users and developers of the BizTalk family of servers and provides it to all servers and
their clients.
WWF includes a designer tool that allows developers to design workflows using Visual
Studio .NET and automatically generate the source code that compiles these into working
applications. Applicationsbuilt on this framework typically include document management,
commercial page flow, and line-of-business applications that require several steps of applica-
tion, some requiring human input.
Windows Presentation Foundation
WPF, as well as being the subject of this book, is the unified presentation subsystem for Win-
dows. It consists of a display engine and a suite of managed classes, similar in concept to the
.NET Framework you saw earlier. This runtime environment and SDK allows developers to
create, and users to run, rich visual applications. WPF introduces XAML as the glue that binds
everything together. XAML is a rich XML-based document format that allows for the declara-
tive development of WPF applications using the WPF object model.
WPF is based on managed code. When you build an application using XAML, you are put-
ting together a declarative command set for the WPF runtime engine. The runtime manages
everything for you.

TOP

发新话题