Silverlight full series-Architecture

Source: Internet
Author: User
ArticleDirectory
    • Overview
    • Relationship between Silverlight and. NET Framework
    • A Brief Introduction to the Silverlight Platform

In fact, I am hesitant to talk about the Silverlight architecture. Generally, many people are reluctant to look at these theoretical things. However, it is helpful to understand your understanding and be familiar with Silverlight. Although you may be confused when you are reading it, I think I should reveal it later. So I decided to talk about it.

Overview
    • What is Silverlight?
    • Relationship between Silverlight and. NET Framework
    • A Brief Introduction to the Silverlight Platform
What is Silverlight?
    1. Similar to flash in Web pages, Silverlight only communicates well with the server. Silverlight can be used to provide better interface experience while being stronger than flash.
    2. It is a typical operation in the "sandbox"ProgramIn other words, it can only have limited access to resources on the client machine, but can provide a good user experience.
    3. For comparison, you can only compare it with the FLEX technology. I mentioned flash before for ease of understanding.

The above shows that if we want to run Silverlight, We must install its "plug-in", that is, Microsoft Silverlight 3 developer runtime.

When you install the Silverlight SDK or Silverlight tools 3.0 software for vs2008, it will be installed. The Silverlight application can be run only after Runtime is installed. This runtime installation package contains:

1. The plug-in that carries the Silverlight application.

2. Supporting the infrastructure of running programs.

Relationship between Silverlight and. NET Framework

Strictly speaking, Silverlight is a subset of. Net frameworkd. Silverlight has its own framework, known as. Net framewor for Silverlight.

Although this framework looks similar to the. NET Framework architecture, they are actually different .. Net Framework for Silverlight is brand new, but is supported by. NET Framework. If your machine does not install the. NET Framework Package, you can run Silverlight as long as you have installed Microsoft Silverlight 3 developer runtime. Note the following:

    1. If you create a. NET Framework-based project, you can apply the relevant Assembly of Silverlight in the project, including SDK and runtime.
    2. If you have created a Silverlight application or class library project, it is impossible to reference the Assembly in. NET Framework. Because. NET Framework is not supported in the scope of Silverlight.

That is to say, for. NET Framework, it supports Silverlight, but for Silverlight, it does not support development for. NET Framework. This means that if you are developing a Silverlight application, your original. NET Framework-based things cannot be directly used. However, in vs2008, you can adjust the attributes of a class library project to change the current. NET Framework project to A. Net Framework for Silverlight project.

Setting procedure: select the project file, right-click, and choose Properties> Application> check "use client framework only"

Now we are actually faced with two. NET framework, one is traditional and one is oriented to Silverlight. although they are using different frameworks for development, they have a high degree of similarity, almost defined in. the basic classes on the Net Framework are kept intact in the Silverlight framework, including the class name and usage. To do this, we only need to reference the corresponding assembly under different frameworks to implement the transformation from. Net framekwork to Silverlight.

A Brief Introduction to the Silverlight Platform

Before getting started with the Silverlight platform, take a look at the xap package mentioned in the previous section. You can set up a new Hello word application (maybe you have finished it. If you don't have it, you can create a new one and compile it directly) in helloworld in the clientbin folder. copy xap to any location and change its Suffix from xap to zip. then open it with a tool to see what is written in the so-called program package. If your program is simple enough, you will see two files.

Appmanifest. XAML and helloworld. DLL files are downloaded to the client and then run by the client runtime.

Here we have gone through several steps:

    1. After obtaining the request, the Silverlight xap package and related resources will be downloaded to the local device (this process is triggered by the Silverlight plug-in ).
    2. On the client, once the package is downloaded, it is loaded into the program domain for execution.

That is to say, the Silverlight Platform runs on the client, not on the server like Asp.net. The Silverlight platform consists of the core presentation layer framework,. NET Framework for Silverlight, and an installer and update component.

 

some parts of. NET Framework for Silverlight are deployed through applications. These "Silverlight libraries" are assemblies that are not included in the Silverlight runtime but will be provided in the Silverlight SDK. When the Silverlight library is used in an application, it is packaged with the application and downloaded to the browser. These libraries include new UI controls, xlinq, integration (RSS/atom), XML serialization, and Dynamic Language Runtime (DLR ).

& Lt; TD valign = "TOP" width = "585" & gt; & lt; P & gt. net Framework contains a subset of components and libraries, including data integration, extensible Windows controls, networks, base class libraries, garbage collection, and Common Language Runtime (CLR ).
component description

core presentation layer framework

components and services for UI and user interaction (including user input, lightweight UI controls for Web applications, and media) playback, digital copyright management, and data binding) and presentation layer functions (including vector graphics, text, animation, and images ). In addition, the Extensible Application Markup Language (XAML) is used to specify the layout ).

. NET Framework for Silverlight

installer and update

is a widget that allows you to install and update the application for the first time, automatic Updates with low impact will be available in the future.

I don't want to copy this from Silverlight documentation, but why not? Although the above explanation is not easy to understand, it is better to explain it on the basis of no standard.

At the same time, I need to copy a picture to illustrate them here, but after doing so, I will give a clear explanation of all this. So I hope you can read it.

 

 

You can see that I split the above into three parts.

C: components that support Silverlight installation and update. It can also be said that C is what we call plug-ins, but not completely.

Integrated Network Protocol Stack: It is required for network communication.

Dom integration: It is necessary to communicate well with the browser. Silverlight cannot deal with the browser.

Application Service: provides the necessary services to start, load, and maintain the application, and Silverlight cannot run without it.

Installer: with the technical upgrade, the corresponding Microsoft Silverlight developer runtime will also be updated continuously. It provides a way to intelligently update necessary components.

B: This part mainly deals with graphics, presentation, Media Processing, and receiving input. It mainly deals with operating system and hardware support. Without Silverlight, you will not be able to provide you with a variety of visual and Media Processing Effects.

Between B and A, you can see that it is XAML, And you can directly access the support provided by B through the definition of XAML (in the traditional concept, if we want to obtain similar support, we can only use it. the API provided by the. NET Framework is being accessed. But now you can not only access through APIs in programming mode, but also access through the methods defined by XAML. That is to say, here you have two sets of APIs that can be used for the same purpose. Of course, XAML is more than just accessing functions in B. Almost everything you can useCodeThe implementation can also be implemented using XAML. This is an interesting point.

A: Yes. net Framework for Silverlight, which is similar. net Framework architecture and even the class names are almost the same, although it is brand new relative.. NET Framework. I will not explain it here.

The gray area on the Right of A is not part of. NET Framework for Silverlight. It is designed to support the development of Silverlight through scripts in a browser.

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.