ArticleDirectory
- Silverlight version
- Understand Silverlight
- Comparison between Silverlight and flash
Web is the most popular environment for commercial software, but there are still some functional webProgramIt cannot be implemented or better. Even with the most cutting-edge JavaScript and Ajax on ASP. NET pages, you cannot copy the native features of many desktop applications, such as animation, sound, video playback, and 3D graphics. Although javascript can be used to respond to client focus changes, mouse movement, and other "real-time" events, you still cannot build a complex interface that is close to the sensitivity of the rich client application window (the new HTML5 standard greatly changes this situation ).
Developers are constantly surpassing web limitations. Recently, it has become very common to watch animations, industrial advertisements, videos, or design colorful games in browsers. Of course, this is not what common HTML, CSS, and javascript can do. ItImplemented through browser plug-ins, sometimes a Java Applet, but more common is Flash Content.
Microsoft's Silverlight technology is a direct competitor of flash. Similar to flash,Silverlight allows you to create interactive content that runs on the client and supports dynamic graphics, media, and animation, which greatly surpasses common HTML. Silverlight is deployed using lightweight browser plug-ins and supports different browsers and operating systems in a wide range..
Flash has many advantages over Silverlight because it is widely used and mature. However,Silverlight thinks that there are some structural features that cannot be compared with flash. The most important point is that it is based on Lite version. net public Language Runtime (CLR), which allows developers to use pure C # To write the clientCode.
Silverlight version
- Silverlight 1: The technology is relatively simple. It has 2D painting and media playback functions, but does not support. NET languages and does not contain CLR engines.
- Silverlight 2: supports. net, introduces a simplified version of CLR, and supports a subset of. NET Framework classes. It is based on the Windows Presentation Foundation user interface.
- Silverlight 3: adds more features based on the same underlying architecture
- Silverlight 4: adds more features based on the same underlying architecture
Understand Silverlight
Silverlight uses a well-known technology to surpass standard web pages: lightweight browser plug-ins.
The advantage of the plug-in model is that you only need to install a single component to view a large number of content created by different companies and individuals. To install a plug-in, you only need to download a small Installation File and force the user to confirm what operations the plug-in can do in at least one security dialog box (usually multiple.
Silverlight is designed to overcome the limitations of common HTML and allow developers to create more graphical and interactive applications. However, Silverlight is not used to break through the browser security sandbox.In most cases, Silverlight applications and common web pages use the same security restrictions.. For example, a Silverlight program can create and access files, but only files stored in an isolated storage area (isolated storage) that is specially separated. In terms of concept,The isolated storage method is like a cookie on a common web page. Files are separated by the current user and different websites, and the file size is also strictly limited.
You may add Silverlight content to display advertisements or provide enhanced experience (such as playing games, completing surveys, interacting with products, and virtual Navigation) for some website content ). Using Silverlight pages can present existing website content in a more attractive way, or present some value-added features to users who have installed the Silverlight plug-in.
Silverlight can also create websites, but you are unlikely to do so. It is still a new thing and does not support old clients (winme and Win98 ).Many commercial websites using Silverlight use it to distinguish it from competitors through cutting-edge content..
Comparison between Silverlight and flash
Currently, the most successful browser plug-in is Adobe Flash, which has been installed on more than 90% of Web browsers around the world and has a 10-year history. It was originally a simple tool for adding dynamic graphics, then it gradually developed into a platform for developing interactive content.
It is reasonable for ASP. NET developers to use Flash content to expand their websites. HoweverTo do this, you need a separate design tool and a completely different one.Programming Language(ActionScript) and programming environment (Flex ).In addition, there is no way to generate Flash content directly using server-side. Net code. After all, they are the products of two companies.
The goal of Silverlight is to provide a better choice for. NET developers to create rich web content. The browser plug-in provided by Silverlight has many similar features as flash, but it is designed based on. NET and supports C # language by nature,Developers can use C # To write client code for Silverlight and use many of the same technologies (stream, control, set, generic, and LINQ ).
The Silverlight plug-in provides attractive features, some of which are the same as flash, some of which are brand new or even revolutionary:
-
- 2D drawing: Silverlight provides rich models for 2D plotting, and Silverlight 3 provides perspective 3D support. Most importantly,The drawn content is defined as shapes and paths, so you can be proficient in operating them on the client. You can even respond to events.(Click the mouse of a part of the image)
-
- Widget: Developers do not want to start from scratch. Silverlight comes with some basic controls (buttons, text boxes, lists, and grids). You can also customize the appearance and style change.
- Animation: Silverlight has a timeline-based animation model used to define what needs to happen and how long it will last.The Silverlight plugin can handle trivial details, such as interpolating intermediary values and calculating the number of frames.
-
- Media: Silverlight supports playing Windows Media Audio (WMA), Windows Media video (WMV 7-9), MP3 audio and VC-1 (HD video.You will not be bound to the ActiveX control of the Windows Media Player. Instead, you can create any front-end display you want..
-
- CLR:This is the most attractive! Silverlight contains a lite version of CLR, including a set of key core classes, garbage collector, JIT compiler, generic support and threads. Developers can use the code written for the full version of. net. After a few modifications, the Code can be applied to Silverlight applications.
-
- Networking:Silverlight can call legacy ASP. NET web services (. asmx) or WCF (Windows Communication Foundation, Windows communication basics) Web Services. They can also send manually created XML requests over the HTTP protocol, or even open a socket connection to achieve fast bidirectional communication.. This allows developers to more easily combine rich client code with secure server applications.
-
- Data Binding: Although not as omnipotent as its eldest brother, WPF, Silverlight data binding also provides a convenient method. A large amount of data can be presented with a small amount of code.You can extract data from XML or memory objects, so you can call the web service and receive object set..
Likewise, it is important to note that Silverlight does not contain these components. Silverlight is a new and rapidly developing technology. developers who are accustomed to relying on. NET rich preset feature packages will encounter many obstacles. Lack of Database Support (No ado. Net), no 3D drawing, few rich controls (but many developers and component companies will build their own ). All of these features are available in Windows-centric WPF applications. All of these features may be migrated to the Silverlight world one day or not.