The analysis of the simplified framework based on Silverlight

Source: Internet
Author: User
Tags silverlight

With an introduction to the "Lite framework based on Silverlight", Silverlight data requests need to be set up with WCF, WebService or WebClient, and intermediate data needs to be serialized and deserialized, or it is not very user-friendly to use LINQ parsing. And cumbersome, based on the lack of a unified and canonical Silverlight development model, the extraction of kernel-type code from five or six of its own, Silverlight-based midsize projects is a streamlined framework for easy invocation, expansion, and distributed deployment.

First, the framework is divided into 5 pieces (interface, service side, business logic layer, data access layer, universal layer), including 15 projects, through the configuration of Web.config, where the remoting server can be removed, into the interface layer direct access to the logic layer.

Refer to this figure below:

Two, the following is the process of data request

1. The interface layer sends request requests through task, and finally calls the HttpRequest request a Httphandle

2.httpHandle will intercept this request and send it to remotingserver processing,

3.server will send the data of this request directly to the business logic layer processing,

4. The business logic layer will deserialize, extract the method name and parameters in the request, and dynamically execute the data-layer corresponding method through Method.invoke (Dalimpl,paras)

5. Load the entity returned by Method.invoke into the Response, Response.tojson () returns the JSON result

6. Return to the interface layer will be deserialized, restore response,response.data as entity that is the data layer returned entity

Refer to this figure below:

Related Article

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.