现在的位置: 首页 > 综合 > 正文

Silverlight 2 初览

2011年12月16日 ⁄ 综合 ⁄ 共 8168字 ⁄ 字号 评论关闭
原文地址: http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx

翻译得更好的一片文章地址:
http://blog.joycode.com/scottgu/archive/2008/02/23/114891.aspx

First Look at Silverlight 2
Silverlight 2 初

Last September we shipped Silverlight 1.0 for Mac and Windows, and announced our plans to deliver Silverlight on Linux.  Silverlight 1.0 focused on enabling rich media scenarios in a browser, and supports a JavaScript/AJAX programming model.

去年9月的we shipped Silverlight 1.0 for Mac and Windows,并宣布了我们计划在linux上发布Silverlight. Silverlight1.0集中对浏览器的多媒体场景提供功能,并且支持JaveScript/AJAX程序模式.

We are shortly going to release the first public beta of Silverlight 2, which will be a major update of Silverlight that focuses on enabling Rich Internet Application (RIA) development.  This is the first of several blog posts I'll be doing over the weeks and months ahead that talk in more depth about it.

我们很快发布了Silverlight 2的第一个公共测试版本,它主要对RIA的开发提供功能,是Silverlight重要的一个更新。这是要发布的几篇文章的第一篇,我将重做先前几周和几月谈到的事,并且会更加深入。

Cross Platform / Cross Browser .NET Development
跨平台/跨浏览的.net 开发

Silverlight 2 includes a cross-platform, cross-browser version of the .NET Framework, and enables a rich .NET development platform that runs in the browser.  Developers can write Silverlight applications using any .NET language (including VB, C#, JavaScript, IronPython and IronRuby).  We will ship Visual Studio 2008 and Expression Studio tool support that enables great developer / designer workflow and integration when building Silverlight applications.

Silverlight 2 包含了一个跨平台,跨浏览器版本的 .net 框架,并且在浏览器运行时成为一个丰富功能的.net 开发平台。开发者可以使用任何.net 语言(包含VB,C#,JavaScript,IronPython IronRuby)来写Silverlight 程序.我们将装配在Visual Studio 2008Expression Studio工具上,支持开发者和设计者在开发Silverlight程序时顺利的完成工作流程和整合

This upcoming Beta1 release of Silverlight 2 provides a rich set of features for RIA application development.  These include:

这个即将来临的silverlight 2bate1版本为RIA程序发布提供了丰富的特性。它们包括:

  • WPF UI Framework: Silverlight 2 includes a rich WPF-based UI framework that makes building rich Web applications much easier.  In includes a powerful graphics and animation engine, as well as rich support for higher-level UI capabilities like controls, layout management, data-binding, styles, and template skinning.  The WPF UI Framework in Silverlight is a compatible subset of the WPF UI Framework features in the full .NET Framework, and enables developers to re-use skills, controls, code and content to build both rich cross browser web applications, as well as rich desktop Windows applications.

    WPF UI框架:Silverlight 2 包含一个丰富的基于WPFUI框架,它使得构建高效果的Web程序更加容易。包括了一个强有力的图形界面和活力的引擎,当然也充足的提供一个更高级别的UI能力,像控件,布局管理,数据绑定,样式,和模板皮肤。Silverlight 里的WPF UI框架在整个.net框架里是一个兼容的子集,并且使得开发者可以重复使用这些技能,控件,代码和内容去建造丰富的跨浏览器的WEB应用程序,当然也可以是丰富的桌面windows应用程序。

  • Rich Controls: Silverlight 2 includes a rich set of built-in controls that developers and designers can use to quickly build applications.  This upcoming Beta1 release includes core form controls (TextBox, CheckBox, RadioButton, etc), built-in layout management panels (StackPanel, Grid, Panel, etc), common functionality controls (Slider, ScrollViewer, Calendar, DatePicker, etc), and data manipulation controls (DataGrid, ListBox, etc).  The built-in controls support a rich control templating model, which enables developers and designers to collaborate together to build highly polished solutions.

    丰富的控件:Silverlight 2包含了丰富的内建控件,开发者和设计者可以使用它们快速的建造应用程序。这个即将到来的Beta1版本包含了核心Form控件(TextBox,CheckBox,RadioButton,等),内建的布局管理面板(StackPanel, Grid, Panel, ),公共的功能性控件(Slider,ScrollViewer,Calendar,DataPicker),和数据操作控件(DataGrid,ListBox,)。这些内建的控件支持丰富的模板模式,它使得开发者和设计者可以一起合作构造非常优美的解决方案。

  • Rich Networking Support: Silverlight 2 includes rich networking support.  It includes out of the box support for calling REST, WS*/SOAP, POX, RSS, and standard HTTP services.  It supports cross domain network access (enabling Silverlight clients to directly access resources and data from resources on the web).  Beta1 also includes built-in sockets networking support.

    丰富的网络支持:Silverlight2 包含了丰富的网络支持。它包含了对于现成呼叫Rest,WS*/SOAP,POX,RSS和标准的HTTP协议的支持。它支持跨域的网络访问(使得Silverlight客户端可以直接访问来自web资源和数据).Beta1 也包括了内建的 socket网络功能支持。

  • Rich Base Class Library: Silverlight 2 includes a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc).  It includes rich APIs that enable HTML DOM/JavaScript integration with .NET code.  It also includes LINQ and LINQ to XML library support (enabling easy transformation and querying of data), as well as local data caching and storage support.  The .NET APIs in Silverlight are a compatible subset of the full .NET Framework.

    丰富的基类库:Silverlight 2包含了一个丰富的功能性的.net基类库(collections, IO, generics, threading, globalization, XML, local storage, ).它包括丰富的可以使用.NET代码整合HTM DOM/JavaScript API.也包括LINQLINQ to XML库的支持。(使得更容易的转换和搜索数据),当然也包括本地数据的缓存和存储支持。这份Silverlight里的.net API也是整个.NET 框架的一个兼容子集。

Silverlight 2 does not require the .NET Framework to be installed on a computer in order to run.  The Silverlight setup download includes everything necessary to enable all the above features (and more we'll be talking about shortly) on a vanilla Mac OSX or Windows machine. 

Silverlight 2 的运行并不需要在电脑上事先安装了.net 框架。Silverlight的设置会下载包括了使用上面所说的特性(更多的后面讲后谈到)所必需的所有东西在vanilla Mac OSX 或者WINDOW机器。

The Beta1 release of Silverlight 2 is 4.3MB in size, and takes 4-10 seconds to install on a machine that doesn't already have it.  Once Silverlight 2 is installed you can browse the Web and automatically run rich Silverlight applications within your browser of choice (IE, FireFox, Safari, etc).

Silverlight2的这个Beta1版本大小为4.3MB,在没有安装它的机器上需要花费4-10秒的时候来安装。一旦Silverlight 2 安装好,你可以浏览网站,在你选择的浏览器里(IE,FireFox,Sfari,etc)自动的运行丰富的Silverlight应用程序。

Silverlight 2 Tutorials: Building A Simple Digg Client

Silverlight 2 教程:建造一个简单的Digg客户端

To help people come up to speed with Silverlight 2, I wrote a Silverlight application and put together a series of step by step tutorials that drill into and explain the different programming concepts behind it (controls, layout management, networking, data-binding, styles, user controls, templates, etc). I also added a tutorial post that demonstrates how to migrate the application outside of the browser and make it a desktop application using WPF and the full .NET Framework.
为了帮助大家可以更快的使用Silverlight2,我曾经写了一个Silverlight程序,并跟一系列的逐步的教程发表,这个教程深入训练和解释了它带来的(controls, layout management, networking, data-binding, styles, user controls, templates,)不同的程序感念.我也增加了一个教程,发表一篇关于如何使用WPF和整个.net框架移植浏览器外使得它成为一个桌面程序的例子。 

Below are the pointers to the 8 tutorials I've put together:

下面是我已经发表的8篇教程:

The application I've built the tutorials around is a simple search front end to the popular Digg.com site, and allows users to type in search topics and browse Digg stories that match them.
我已经创建的应用程序是一个简单的针对流行网站Digg.com的搜索前端,允许用户在搜索的标题里使用类型匹配并且能在浏览器里观看匹配的文章,

All of the UI in the application is built using Silverlight's WPF framework.  The application uses the Silverlight networking stack and cross-domain access support to query the Digg REST API directly, and uses LINQ and LINQ to XML to query/transform the returned data into DiggStory objects that I databind the UI against:

所以在应用程序UI都是使用SilverlightWPF框架构建的。这个应用程序使用了Silverlight的网路堆栈和跨域访问支持直接搜索Digg REST API,并且使用了LINQLINQ to XML去搜索和转换我绑定到UIDiggStory对象的数据:

 

The application supports a master/details data interaction model that allows users to select stories from the search list and quickly drill into more details about them.  A user can jump to the Digg article directly from the details form, or close it and pick another story to drill into:

应用程序支持一个 master/details 数据整合模式,它允许用户去选择来自搜索列表的文章,并且快速的得到关于它们详细资料.用户可以直接从详细资料表单跳转到DIGG文章或者关掉它,还可以挑选另外一篇故事浏览:

 

The entire application is implemented in about 35 lines of C# code and 75 lines of XAML page/user-control markup.  It only uses controls and libraries built-into Silverlight.

整个程序的实现大约用了35C#代码和75行页面XAML和使用的控标识。它仅仅使用了Silverlight内建的控件和库。

If you have used WPF before the UI concepts I discuss in the tutorial series will all be very familiar.  If you haven't used WPF before, the tutorials should provide a good overview of the fundamental programming concepts in it, and hopefully provide you with the basic knowledge necessary to start building Silverlight 2 applications with VS 2008 when Beta1 comes out.

在我在这系列教程里讨论这些UI概念之前,如果你有使用WPF你将发现非常熟悉。如果你之前没有过WPF,这份教程应该能提供一个很好的关于教程里提到的基础程序概念的概览,并且有希望能提供你当beta1发布的时候使用VS2008建造Silverlight 2程序所必需的基本知识

I'll post details on my blog once Beta1 is available for download.  I'll also upload the final Digg application to my site (along with the code + project file to open and edit it in VS 2008) once Beta1 has shipped.

一旦Beta1提供下载我将在我的博客上发表详细资料。一旦Beta1已经装配我也会上传最终的DIGG程序在我的站点.(连同代码和为了能在VS2008打开和编辑的工程文件)

Hope this helps,

Scott

 

 

抱歉!评论已关闭.