Silverlight 2 End to End教程:创建Digg搜索客户端

Part0 Silverlight 2 End to End系列教程:创建Digg搜索客户端

       



翻译人:ttzhangTechnology Life
翻译时间:2008/10/24  22:02:59
作者:ScottGu
出处:ScottGu's Blog

         

Silverlight 2 End to End Tutorial: Building a Digg Search Client

Silverlight 2 End to End系列教程:创建Digg搜索客户端      

To help people come up to speed with Silverlight 2, I've written a simple Silverlight application and put together a series of step by step tutorials that 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 enable it to run as a desktop application using WPF and the full .NET Framework.

为了帮助大家快速跟上Silverlight2,我已经写了一个简单Silverlight程序,并把一步一步学习的教程放在一个系列中,来向大家解释其中不同的编程概念(控件、布局管理、网络通信、数据绑定、样式、用户控件、模板等等)。另外,我也发布了一个怎样把Silverlight应用迁移到浏览器之外的示例教程,使用WPF.NET Framework Silverlight应用像桌面应用程序一样运行。

下面是我整理在一起的该系列的8个教程的链接:

注意:由于此部分教程已经存在中文版,所以本人从本篇教程起停止翻译,并在上面添加了英文和中文翻译的连接。

     (【中文版】 第零部分:简介)

        Part 1: Creating "Hello World" with Silverlight 2 and VS 2008

       (【中文版】 第一部分:使用Silverlight 2 和 VS 2008创建“Hello World”程序

       (【中文版】 第二部分:使用布局管理 (木野狐译) )

       (【中文版】 第三部分:使用 Networking取回数据并填充DataGrid

        Part 4: Using Style Elements to Better Encapsulate Look and Feel

       (【中文版】 第四部分:使用 Style 元素更好地封装观感 (木野狐译))

        Part 5: Using the ListBox and DataBinding to Display List Data

       (【中文版】 第五部分:用 ListBox 和 DataBinding 显示列表数据 (木野狐译))

        Part 6: Using User Controls to Implement Master/Details Scenarios

       (【中文版】 第六部分:使用用户控件实现主从表场景

       (【中文版】 第七部分:使用控件模板定制控件的观感

       (【中文版】 第八部分:使用WPF创建一个Digg桌面应用

 

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的简单搜索前端,它允许我们输入搜索主题,浏览符合搜索主题的DiggStory

<Download Code> Click here to download a completed version of the Digg client sample. </Download Code>

<Download Code>点击这里下载Digg客户端示例的完整源代码. </Download Code>

   

All of the UI in the application is built using Silverlight's built-in WPF UI 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:

  1. 程序中全部的UI都是使用Silverlight中内建的WPF UI Framework创建的。程序使用Silverlight的多种网络和跨域访问的支持直接查询DiggREST API,并且使用了LINQ LINQ to XML来查询/转换返回的数据为我在数据绑定到UI上的DiggStory对象:

       

       

    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:

    这个程序支持"主/详细"数据交互的模型,允许用户从搜索列表选择Stories,并快速显示他们的更详细的信息。在详细信息窗体,用户可以直接跳转到Digg上的文章,或者关闭这个窗体并选择查看另外一个Story的详细信息。

       

       

    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#代码和75XAML 页面/用户控件标记。它只使用了Silverlight内置的控件和类库。

    <Download Code> Click here to download a completed version of the Digg client sample. </Download Code>

    <Download Code>点击这里下载Digg客户端示例的完整源代码. </Download Code>

       

    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 either Silverlight 2 or WPF applications.

    如果你以前使用过WPF,那么你对我在这个系列教程中谈到的UI概念就会非常熟悉。如果你以前没有使用过WPF,这个教程应该会让你对它的基本编程概念有一个很好的了解,也希望能为你开始创建Silverlight 2 或者WPF应用程序提供必要的基本知识。

       

    这是我第一次翻译文章,有很多地方翻译的不好,希望园子里的朋友多多指点和支持!我会在接下来的二天里,把这8篇文章的翻译发到这里,请大家关注!

posted @ 2008-10-24 21:51  上不了岸的鱼  阅读(1386)  评论(3编辑  收藏  举报