First glance at Silverlight 4 and its Architecture

Source: Internet
Author: User
Tags types of functions

Introduction 

To learn Silverlight 4. This article will talk about the initial understanding of Silverlight 4 and some ideas related to the Silverlight 4 architecture from multiple perspectives.
Silverlight 4 was released earlier this year. This technology has brought us a lot of innovation. It not only brings rich interactive Internet and multimedia content to users, but also provides a powerful lightweight platform. We can develop portable, cross-platform, and network-based applications on this platform, and integrate services and data from different sources. Compared with the traditional Web application interface, the Silverlight application interface is refreshing. It seems that the Windows Form application has been moved to the Web.

 

Why Silverlight 4

 

When developing Web applications, we encountered many technical difficulties, such as platform compatibility, different file formats and communication protocols, and the same page performance on different browsers, there are also different browser interpretations of Javascript, often working overtime and staying up late for these problems, and we don't have to worry about trying to solve these headaches. With Silverlight technology:

  • We can overcome the incompatibility and inconsistency of existing technical platforms.
  • We have the ability to create a consistent user experience on multiple platforms and various browsers. No matter where it is, the application is consistent in appearance and behavior.
  • We can use the classes and functions of the familiar. net Framework to integrate data and services from different network locations into an application.
  • We can provide users with a multi-media, rich-performing, and operational user interface.
  • Silverlight 4 provides more controls and more powerful functions for us to develop more powerful applications to better cope with business challenges.

What new things does Silverlight 4 have? 

  • Some practical controls, such as RichTextBox, ViewBox, WebBrowser, and WebBrowserBrush.
  • It supports running outside the browser. Running outside the browser can be like the features of common windows, such as changing the size and topping.
  • Enhances trusted applications, allowing trusted Silverlight programs to read and write user files and directories, full screen, and call Windows APIs.
  • More media can capture the video signal and microphone voice.
  • More powerful printing functions
  • More convenient UI, supports drag and drop, supports clipboard, and so on.
  • Better data binding and WCF Data Service
  • The wcf ria Service provides stronger support for multi-tier applications.
  • DLR support

What systems and browsers are supported by Silverlight 4?

 

To build an effective Silverlight 4 Application, developers need to understand the Silverlight 4 architecture.

 

Components of the Silverlight Platform

 

As a whole, Silverlight consists of three parts, as shown in the following table:

Parts

Description

Core Components

Displays the UI elements of XAML, including common controls and multimedia controls, and processes user input and events.

. Net Framework in Silverlight

A subset of the. net Framework. Including components and libraries, including data integration, extensible Windows controls, networks, basic class libraries, garbage collection, and CLR.
Some Silverlight. net frameworks are deployed with applications. These "Silverlight libraries" are some assemblies that are not released along with the Silverlight runtime and are released in the Silverlight SDK. These Silverlight libraries must be packaged together with the application. You can download it to your browser. These libraries deployed with applications include some new UI controls, XLINQ, RSS/Atom, XML serialization, and Dynamic Language Runtime (DLR ).

Client installer and Updater

When you browse the Silverlight application for the first time, you need to install the browser plug-in on the client browser. This installer and Updater is responsible for installing the plug-in for the client browser and keeping the client browser plug-in up-to-date.

 

It is an official graph of MSDN that shows components of the Silverlight platform and some related components and services.

Core presentation components Core presentation framework includes XAML parser, UI Core, Inputs, DRM (digital rights management), Media, and Deep Zoom, most of them are functions that need to deal directly with specific operating system APIs, so there is no CLR Execution Engine.

  • The XAML parser is responsible for parsing the XAML and is compatible with the XAML of different specifications.
  • UI Core is responsible for vector, bitmap, animation, and text rendering.
  • Inputs processes input from the keyboard, mouse, and other devices
  • DRM manages the digital copyright of digital media
  • Media is responsible for processing multimedia and supports different Media formats and encoders.
  • Deep zoom is used to zoom in and out high-resolution images.
  • Layout is responsible for locating UI elements.

. Net framework for Silverlight is a commercial "library" for supply applications ". Including Data, WCF, WPF, and BCL.

  • BCL provides basic types, collections, generic Generics, and encryption on the. net platform.
  • WCF provides some types of functions for applications to process WCF, such as SOAP, REST, RSS, and ATOM.
  • Data provides the ability to write Data such
  • WPF provides some UI controls to bind data to these controls, layout, and process user input functions.

. Net framework for Silverlight is distributed in several. net Programming sets. Some assemblies (such as BCL) are installed with the Silverlight installer in the user's browser, and some are referenced by the application in the Silverlight SDK, will be released to the server along with the application. When a user accesses the application. the. net framework Assembly is downloaded to the user's browser together with the application assembly and executed by the CLR Execution Engine.

CLR Execution Engine (CLR Execution Engine) is the core of the application. net code and. net framework. net code. CLR is always based on a host. Generally, the host is a browser. In a scenario outside the browser, the host is an operating system process. Silverlight 4 makes improvements to its CLR, and the difference between the CLR of Silverlight 4 and the CLR of desktop applications is further reduced.

DLR provides support for dynamic languages. Currently, JScript, Iron Python, and Iron Ruby are supported. This is a new feature of Silverlight 4.

Silverlight 4 also has some programming-related features, such as independent storage (Isolated storage), Background threads, secure file management, serialization, XAP packaging, XML processing, and interaction between HTML and managed code.

  • Independent storage provides a secure way for the Silverlight program to access the local file system of the browser.
  • Background threads make Asynchronization and multithreading possible on Silverlight.
  • Secure File Management provides a secure file opening dialog box that allows file upload.
  • Serialization makes serialization storage and restoration of Objects Possible.
  • XAP package provides the Application class and tool to pack XAP .. The xap package has applications and entry points, so that the user's browser plug-in can run this. xap package. An. xap package is required for application release.
  • XML processing includes the ability to process Xml. The XmlReader and XmlWriter classes provide the most basic XML processing functions. At the same time, XLinq allows developers to use c # Or VB.net to query Xml data.
  • The interaction between HTML and managed code allows developers to directly use html dom in managed code to manage UI elements on HTML pages. At the same time, they can also write Javascript code to call the managed code function, access methods, attributes, and events. This function provides the Javascript Engine and ms ajax Library.

Browser Host is an environment provided by the user's Browser plug-in. It provides a basic environment for running a Silverlight Application, such as Application service, html dom integration, network communication, and installer. The Silverlight Application that uses the managed API has a class that inherits the Application class and has a program entry point. The Browser Host has created a runtime environment for the Application, before calling the application entry.

 

Conclusion

The above is a rough understanding of Silverlight 4. Is what any Silverlight developer wants to know. If you have a deeper understanding, you can learn from several aspects: its principle, processing cycle, its deployment, its security, its scalability, and its distributed computing capability, its fault tolerance capability and so on. I am also a beginner and have limited knowledge. Further study is required. Write something later.

ASIDE: the most important thing is quick learning and analysis. This capability enables you to quickly learn and master new technologies when facing new technologies.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.