Analysis of Silverlight-Based Simplified Framework

Source: Internet
Author: User

In the previous article, "Introduction to the Silverlight-Based Simplified Framework", the data request of Silverlight needs to be set up with WCF, WebService, or WebClient, and the intermediate data needs to be serialized and deserialized, or it can be parsed by itself using LINQ, ease of use is not very strong, and it is quite troublesome. Based on the Silverlight development model that is not yet unified and standardized, We have extracted the type from five or six self-developed Silverlight-based medium-sized projects.CodeA simplified framework is formed to facilitate calling, expansion, and distributed deployment.

I. The framework is divided into five parts (interface, server, business logic layer, data access layer, and general layer), including 15 projects. the remoting server can be removed and changed to the interface layer to directly access the logic layer.
See the figure below:

2. The following is the data request process.
1. The interface layer sends a request through the task, and finally calls the httprequest request for an httphandle
2. httphandle intercepts the request and sends it to the remotingserver for processing,
3. the server sends the requested data directly to the business logic layer for processing,
4. the business logic layer deserializes the methods and parameters in the request, and dynamically executes the corresponding methods at the data layer through method. Invoke (dalimpl, paras ).
5. Load the entity returned by method. Invoke into response, and response. tojson () returns the JSON result.
6. When returned to the interface layer, it will be deserialized to restore response. response. Data as entity is the entity returned by the data layer.

See the figure below:

3. core objects:

The next article will explain the three methods used (requestor, task, and taskmanager)
AndSource code: Http://files.cnblogs.com/guozili/EasySL.zip

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.