Silverlight和WPF browser application有什么区别呢?

nankezhishi 2008-03-19 01:09:08
如题目
...全文
254 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ourmessage 2008-04-19
  • 打赏
  • 举报
回复
silverlight是在IE或者Firefox里面的插件运行的程序,wpf需要安装.net 3.0以上的运行库,silverlight就不需要,可以在任意客户端下运行,所以微软也叫他(WPF/e)
liefeng123 2008-04-16
  • 打赏
  • 举报
回复
xbp是为了安全考虑所有在沙盒模型下去运行wpf程序,(客户端必须安装.net3.0)
而silverlight是在plugin里面去运行,silverlight原来叫wpf enverywhere
Allen_Chen_ 2008-04-02
  • 打赏
  • 举报
回复
Silverlight 跨平台,跨browser,跨device.后面的不可以.
lnwuyaowei 2008-03-19
  • 打赏
  • 举报
回复
silverlight实现的是WPF的子集。
可以设想微软的想法:第一步是silverlight占领市场,第二步是WPF大面积应用。如果微软实现第二个目标,那么互联网还是姓M的。
gyc 2008-03-19
  • 打赏
  • 举报
回复
前者可以跨平台, 后者只能在Windows上,并且还需要客户端安装.NET 3.0 (以上)
The Windows Presentation Foundation (WPF) is Microsoft’s latest development platform for building next-generation Windows client applications. Silverlight, a subset of WPF, extends the platform to the web via the add-on mechanism available in most current browsers. As a subset of WPF, the ability to create rich Internet applications is unprecedented; however, there are some significant differences between the capabilities of Silverlight and WPF, as well as important differences in the programming features of the two technologies. There are several architectural reasons for the discrepancies between WPF and Silverlight. First and foremost is that Silverlight 2 is a downloadable plug-in running within a browser. In order to insure that the plug-in is a small as possible, Microsoft built a smaller version of the .Net Framework, one that is highly optimized for size and is a small subset of the full .NET Framework, to embed within it. WPF, on the other hand, has full access to the main .Net Framework and all its associated assemblies. The difference between the smaller, downloadable .Net Framework and the full desktop version is one of the major disparities between the two platforms. In addition, the fact that Silverlight is rooted within the browser, and inherits the limitations of that environment, further differentiates the two platforms. This whitepaper documents both the identical (or nearly so) functionality as well as the differences. WPF and Silverlight have many technological concepts in common: Dependency Properties, Data Binding, Custom Controls and Animation to name a few. In addition, this paper documents functionality implementations that may be available in only one technology or the other. For example, WPF implements a large library of controls for document handling, including printing and formatting large documents. Finally, this whitepaper outlines some strategies in obtaining code reuse across both technologies. Due to minor differences in implementations of common elements, developers need to carefully plan their development in order to reuse code in both platforms. Of course, since certain functionality may not exist in one platform, developers may need to reduce the scope of the application in those cases. One last note about this whitepaper: where appropriate, some information about the future version of Silverlight 3 has been provided. Please note that Silverlight 3 is currently in beta and any information may be subject to change. In addition, more Silverlight 3 information can be found at www.silverlight.net
Book Description Silverlight in Action, Revised Edition is a fast-paced, comprehensive tutorial that guides the reader from creating “Hello World” to coding production-quality, data-driven rich internet applications with graphics, audio, and video content. Written for a developer who already knows how to code in C#, this fluff-free book covers the basics quickly and dives into the heart of Silverlight development using XAML (a language for creating user interface elements) and Visual Studio 2010. You’ll learn not only how to accomplish tasks, but how the underlying runtime works. In addition to the fundamentals, the book covers the new features in Silverlight like pixel shaders, webcam and microphone, as well as WCF RIA Services and patterns like MVVM (Model-View-ViewModel). It explains developing offline and “out-of-browserapplications, managing video and audio, handling validation, navigation and deep-linking, and how each Silverlight feature fits into the overall Silverlight ecosystem. About the Author Pete Brown is a Community Program Manager with Microsoft on the developer division community team lead by Scott Hanselman. Pete’s focus at Microsoft is the community around client application development (Silverlight, WPF, Windows Phone, Surface, Windows Forms, C++, Native Windows API and more). Prior to joining Microsoft, Pete was a Microsoft Silverlight MVP, INETA speaker, and RIA Architect with 17 years experience building applications in everything from Assembly and C++ to VB and dBase to C# and .NET. Pete lives with his wife and two children outside of Annapolis, MD.
Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 1216 pages Publisher: Apress; 3 edition (March 31, 2010) Language: English ISBN-10: 1430272058 ISBN-13: 978-1430272052 Microsoft's Windows Presentation Foundation (WPF) provides the foundation for building applications and high-quality user experiences for the Windows operating system. It blends the application user interface, documents, and media content, while exploiting the full power of your computer's operating system. Its functionality extends to the support for Tablet PCs and other forms of input device, and it provides a more modern imaging and printing pipeline, accessibility and UI automation infrastructure, data-driven UIs and visualization, and integration points for weaving the application experience into the Windows shell. This book shows you how WPF really works. It provides you with the no-nonsense, practical advice that you need in order to build high-quality WPF applications quickly and easily. After giving you a firm foundation, it goes on to explore the more advance aspects of WPF and how they relate to the others elements of the .NET 4.0 platform and associated technologies such as Silverlight. What you'll learn WPF basics: XAML, layout, control essentials, and data flow WPF applications: Navigation, commands, localization, and deployment Advanced controls: Custom controls, menus, toolbars, and trees WPF documents: Text layout, printing, and document packaging Graphics and multimedia: Drawing shapes, sound and video, animation, geometric transformations, and imaging Chapter 1: Introducing WPF describes the architecture of WPF, its DirectX plumbing, and the new device-independent measurement system that resizes user interfaces automatically. Chapter 2: XAML describes the XAML standard that you use to define user interfaces. You’ll learn why it was created and how it works, and you’ll create a basic WPF window using different coding approaches. Chapter 3: Layout delves into the layout panels that allow you to organize elements in a WPF window. You’ll consider different layout strategies, and you’ll build some common types of windows. Chapter 4: Dependency Properties describes how WPF uses dependency properties to provide support for key features such as data binding and animation. Chapter 5: Routed Events describes how WPF uses event routing to send events bubbling or tunneling through the elements in your user interface. It also describes the basic set of mouse, keyboard, and multitouch events that all WPF elements support. Chapter 6: Controls considers the controls every Windows developer is familiar with, such as buttons, text boxes, and labels–and their WPF twists. Chapter 7: The Application introduces the WPF application model. You’ll see how to create single- instance and document-based WPF applications. Chapter 8: Element Binding introduces WPF data binding. You’ll see how to bind any type of obje to your user interface. Chapter 9: Commands introduces the WPF command model, which allows you to wire multiple controls to the same logical action. Chapter 10: Resources describes how resources let you embed binary files in your assembly and reuse important objects throughout your user interface. Chapter 11: Styles and Behaviors explains the WPF style system, which lets you apply a set of common property values to an entire group of controls. Chapter 12: Shapes, Brushes, and Transforms introduces the 2-D drawing model in WPF. You’ll learn to create shapes, alter elements with transforms, and paint exotic effects with gradients, tiles and images. Chapter 13: Geometries and Drawings delves deeper into 2-D drawing. You’ll learn to create complex paths that incorporate arcs and curves and how to use complex graphics efficiently. Chapter 14: Effects and Visuals describes lower-level graphics programming. You’ll apply Photoshop-style effects with pixel shaders, build a bitmap by hand, and use WPF’s visual layer for optimized drawing. Chapter 15: Animation Basics explores WPF’s animation framework, which lets you integrate dynamic effects into your application using straightforward, declarative markup. Chapter 16: Advanced Animations explore more sophisticated animation techniques like key-fram animation, path-based animation, and frame-based animation. You’ll also consider a detailed example that shows how to create and manage dynamic animations with code. Chapter 17: Control Templates shows you how you can give any WPF control a dramatic new look (and new behavior) by plugging in a customized template. You’ll also see how templates allow you to build a skinnable application. Chapter 18: Custom Elements explores how you can extend the existing WPF controls and create your own. You’ll see several examples, including a template-based color picker, a flippable panel, custom layout container, and a decorator that performs custom drawing. Chapter 19: Data Binding shows you how to fetch information from a database, insert it into a custom data objects, and bind these objects to WPF controls. You’ll also learn how to improve the performance of huge data-bound lists with virtualization, and catch editing mistakes with validation. Chapter 20: Formatting Bound Data shows some of the tricks for turning raw data into rich data displays that incorporate pictures, controls, and selection effects. Chapter 21: Data Views explores how you use the view in a data-bound window to navigate through a list of data items, and to apply filtering, sorting, and grouping. Chapter 22: Lists, Grids, and Trees gives you a tour of WPF’s rich data controls, including the ListView, TreeView, and DataGrid. Chapter 23: Windows examines how windows work in WPF. You’ll also learn how to create irregularly shaped windows and use Vista glass effects. You’ll also make the most of Windows 7 features by customizing taskbar jump lists, thumbnails, and icon overlays. Chapter 24: Pages and Navigation describes how you can build pages in WPF and keep track of navigation history. You’ll also see how to build a browser-hosted WPF application that can be launched from a website. Chapter 25: Menus, Toolbars, and Ribbons considers command-oriented controls such as menus and toolbars. You’ll also get a taste of more modern user interface with the freely downloadable Ribbon control. Chapter 26: Sound and Video describes WPF’s media support. You’ll see how to control playback for sound and video, and how to throw in synchronized animations and live effects. Chapter 27: 3-D Drawing explores the support for drawing 3-D shapes in WPF. You’ll learn how to create, transform, and animate 3-D objects. You’ll even see how to place interactive 2-D controls on 3-D surfaces. Chapter 28: Documents introduces WPF’s rich document support. You’ll learn to use flow documents to present large amounts of text in the most readable way possible, and you’ll use fixed documents to show print-ready pages. You’ll even use the RichTextBox to provide document editing. Chapter 29: Printing demonstrates WPF’s printing model, which lets you draw text and shapes in a print document. You’ll also learn how to manage page settings and print queues. Chapter 30: Interacting with Windows Forms examines how you can combine WPF and Windows Forms content in the same application–and even in the same window. Chapter 31: Multithreading describes how to create responsive WPF applications that perform time-consuming work in the background. Chapter 32: The Add-In Model shows you how to create an extensible application that can dynamically discover and load separate components. Chapter 33: ClickOnce Deployment shows how you can deploy WPF applications using the ClickOnce setup model.
这个文档是我自己原创制作的,在别的网上肯定是没有的。 而且做得非常好看,和非常准确。 如果下载的人多,将会把中英文对照的版本也上传。 Knockout是一个以数据模型(data model)为基础的能够帮助你创建富文本,响应显示和编辑用户界面的JavaScript类库。任何时候如果你的UI需要自动更新(比如:更新依赖于用户的行为或者外部数据源的改变),KO能够很简单的帮你实现并且很容易维护。 重要特性: 优雅的依赖追踪 - 不管任何时候你的数据模型更新,都会自动更新相应的内容。 Elegant dependency tracking - automatically updates the right parts of your UI whenever your data model changes. 声明式绑定 - 浅显易懂的方式将你的用户界面指定部分关联到你的数据模型上。 Declarative bindings - a simple and obvious way to connect parts of your UI to your data model. You can construct a complex dynamic UIs easily using arbitrarily nested binding contexts. 轻易可扩展 - 几行代码就可以实现自定义行为作为新的声明式绑定。 Trivially extensible - implement custom behaviors as new declarative bindings for easy reuse in just a few lines of code. 额外的好处: 纯JavaScript类库 – 兼容任何服务器端和客户端技术 Pure JavaScript library - works with any server or client-side technology 可添加到Web程序最上部 – 不需要大的架构改变 Can be added on top of your existing web application - without requiring major architectural changes 简洁的 - Gzip之前大约25kb Compact - around 13kb after gzipping 兼容任何主流浏览器 - (IE 6+、Firefox 2+、Chrome、Safari、其它) Works on any mainstream browser - (IE 6+, Firefox 2+, Chrome, Safari, others) 采用行为驱动开发 - 意味着在新的浏览器和平台上可以很容易通过验证。 Comprehensive suite of specifications - (developed BDD-style) means its correct functioning can easily be verified on new browsers and platforms 开发人员如果用过Silverlight或者WPF可能会知道KO是MVVM模式的一个例子。如果熟悉 Ruby on Rails 或其它MVC技术可能会发现它是一个带有声明式语法的MVC实时form。换句话说,你可以把KO当成通过编辑JSON数据来制作UI用户界面的一种方式… 不管它为你做什么 Developers familiar with Ruby on Rails, ASP.NET MVC, or other MV* technologies may see MVVM as a real-time form of MVC with declarative syntax. In another sense, you can think of KO as a general way to make UIs for editing JSON data… whatever works for you :) OK, 如何使用它? 简单来说:声明你的数据作为一个JavaScript 模型对象(model object),然后将DOM 元素或者模板(templates)绑定到它上面. The quickest and most fun way to get started is by working through the interactive tutorials. Once you’ve got to grips with the basics, explore the live examples and then have a go with it in your own project. KO和jQuery (或Prototype等)是竞争关系还是能一起使用? 所有人都喜欢jQuery! 它是一个在页面里操作元素和事件的框架,非常出色并且易使用,在DOM操作上肯定使用jQuery,KO解决不同的问题。 Everyone loves jQuery! It’s an outstanding replacement for the clunky, inconsistent DOM API we had to put up with in the past. jQuery is an excellent low-level way to manipulate elements and event handlers in a web page. I certainly still use jQuery for low-level DOM manipulation. KO solves a different problem. 如果页面要求复杂,仅仅使用jQuery需要花费更多的代码。 例如:一个表格里显示一个列表,然后统计列表的数量,Add按钮在数据行TR小于5调的时候启用,否则就禁用。jQuery 没有基本的数据模型的概念,所以需要获取数据的数量(从table/div或者专门定义的CSS class),如果需要在某些SPAN里显示数据的数量,当添加新数据的时候,你还要记得更新这个SPAN的text。当然,你还要判断当总数>=5条的时候禁用Add按钮。 然后,如果还要实现Delete功能的时候,你不得不指出哪一个DOM元素被点击以后需要改变。 As soon as your UI gets nontrivial and has a few overlapping behaviors, things can get tricky and expensive to maintain if you only use jQuery. Consider an example: you’re displaying a list of items, stating the number of items in that list, and want to enable an ‘Add’ button only when there are fewer than 5 items. jQuery doesn’t have a concept of an underlying data model, so to get the number of items you have to infer it from the number of TRs in a table or the number of DIVs with a certain CSS class. Maybe the number of items is displayed in some SPAN, and you have to remember to update that SPAN’s text when the user adds an item. You also must remember to disable the ‘Add’ button when the number of TRs is 5. Later, you’re asked also to implement a ‘Delete’ button and you have to figure out which DOM elements to change whenever it’s clicked. Knockout的实现有何不同? 使用KO非常简单。将你的数据描绘成一个JavaScript数组对象myItems,然后使用模板(template)转化这个数组到表格里(或者一组DIV)。不管什么时候数组改变, UI界面也会响应改变(不用指出如何插入新行或在哪里插入),剩余的工作就是同步了。例如:你可以声明绑定如下一个SPAN显示数据数量(可以放在页面的任何地方,不一定非要在template里): It’s much easier with KO. It lets you scale up in complexity without fear of introducing inconsistencies. Just represent your items as a JavaScript array, and then use a foreach binding to transform this array into a TABLE or set of DIVs. Whenever the array changes, the UI changes to match (you don’t have to figure out how to inject new TRs or where to inject them). The rest of the UI stays in sync. For example, you can declaratively bind a SPAN to display the number of items as follows: There are items就是这些!你不需要写代码去更新它,它的更新依赖于数组myItems的改变。同样, Add按钮的启用和禁用依赖于数组 myItems 的长度,如下: That’s it! You don’t have to write code to update it; it updates on its own when the myItems array changes. Similarly, to make the ‘Add’ button enable or disable depending on the number of items, just write: 之后,如果你要实现Delete功能,不必指出如何操作UI元素,只需要修改数据模型就可以了。 Later, when you’re asked to implement the ‘Delete’ functionality, you don’t have to figure out what bits of the UI it has to interact with; you just make it alter the underlying data model. 总结:KO没有和jQuery或类似的DOM 操作API对抗竞争。KO提供了一个关联数据模型和用户界面的高级功能。KO本身不依赖jQuery,但是你可以一起同时使用jQuery, 生动平缓的UI改变需要真正使用jQuery。

8,734

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧