Build Scalable Architecture (continued)-zt (2)

Source: Internet
Author: User
Tags web services
In addition to the database itself, this structure includes three layers (see figure 1 ). On the outside, it is the user interface or design layer for data access. You can build this layer in Windows Forms, Web Forms, or Web services. This layer interacts with an instance of the same data reader, data set, or my name is ESTD (extended or derived strong dataset) class. Then these classes interact with the same data access layer-the data access layer is the only layer that contains the database's hidden information.
I will describe how to derive from a strong data set to create an ESTD. ESTD can save data rules, such as range rules for a single field and more complex business rules. If your business rules are extensive, or another ESTD or an encapsulated data reader needs to use these business rules, you can encapsulate them into a separate class at this layer. For programmers who use this ESTD, this additional class has a high degree of transparency.
Let's imagine that because every lap or layer runs independently, you can adjust the program by combining any of the features I 've described. When you enhance the functionality of each layer, your program will make steady progress.
Generally, the UI determines your choice of data storage, but according to the overall structure, the insert layer can decide which type of storage to provide. Remember this flexibility when you study how to bind Windows Forms controls to ESTD as described here.
Hide data access
To clarify this structure, I have prepared a simplified DataAccessor class that encapsulates the data layer (see list 1 ). The attached program contains a more complete class with updates. By implementing a defined interface, such as IDataAccessor, you can recognize similar objects and know what actions will happen. Only your custom DataAccessor class has special database details

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.