Application Block Structure Function Analysis on Smart Clients (1)

Source: Internet
Author: User
In order to allow users to better enjoy the convenience brought by distributed programs, and to allow programmers to write better distributed programs, microsoft integrated the concept of smart clients with fat clients and thin clients. This new technology will bring a brand new experience to users, it can be said that it combines the advantages of the original two client forms, and avoids the disadvantages, it should be popular in the future.
To implement the form of Smart Clients, Microsoft provides an Application Block for our programmers to help us. All application blocks are completely open, we can not only introduce the project to use them directly in the solution, but also view and modify all the source code (although Microsoft does not advocate modifying the source code, for different places, we can directly inherit and use it. After all, is it an object-oriented program?), even the structure design can be found, this complete openness is undoubtedly of great benefit to us. It not only gives us a taste of the sweetness of program module reuse, but also learns many excellent ideas from it.
Now, we will analyze the structure and functions of application blocks supporting the Smart Client based on what we learned in the learning process and some of our programming experience, and share them with you, make progress together.
First, we can see that each of the multiple application blocks proposed by Microsoft can complete a specific function, but they are not completely independent. They are closely related to each other, these connections enable them to form the intelligent client system together, and give full play to the functions that a single application block or simple addition does not have. This should be a point of view in the system theory.
Secondly, in the process of designing and implementing application blocks, a lot of design patterns are used, and the phrase "no program with no unused patterns" is true, this is also a great benefit for us to better understand the design model. Because it should be said that the design pattern is a good thing, but it is really not easy to use it. Below we can see from the design diagram how to use the design pattern in application blocks.
Next, let's take a look at the application Blocks Used in the implementation process of the Smart Client and their functions.
Mainly used Application Block
1. Data Access Application Block: responsible for data access operations. In this module, Microsoft attempts to achieve at least local ing transparency of distributed databases, because it uses an interface to perform operations on different databases, that is, whether it is Oracle or SQL Server or DB2 at the data layer, we do not need to program each type of database. We only need to pass the function value through this application block, this block automatically selects the corresponding method and SQL statement format. In this way, we do not need to write different programs for different database types in distributed programs.
2. Offline Application Block: responsible for processing services offline. This is because, when using a smart client, we will inevitably encounter an offline status. This operation mode is a disaster in B/S mode, because we cannot obtain relevant data from the server or feedback our operation results to the server, this makes our work impossible. In this application block, we can implement perfect offline functions. For this, we will surely think of data integrity and consistency issues. There are two ways to deal with this problem: one is for a file or a data table, only one user or terminal is allowed to operate. Once obtained, the file or data table is locked. Another method is to prevent locking and allow multiple users to make modifications at the same time. The security of the former can be well guaranteed, but the flexibility is very low, especially when a user leaves a file or data table after the operation is started, this will cause other users to be unable to use this file for a long time. The latter is highly flexible, but some measures must be taken to ensure data integrity and security. To balance these two types, Microsoft uses the latter one. Multiple users can modify one data at the same time, however, in the final processing, Microsoft provided a good solution in this block.

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.