Summary of individual restructuring the data room Charging System

Source: Internet
Author: User

The charging system for the individual version of the machine room is finally over. I am so sorry to see this process. At the beginning, it was difficult to write three layers. At that time, when I looked at the three-layer instances, I also knocked on them. However, you can't remember it, or even write it out. Slowly and slowly try to search for information through others' blogs. You can write a three-tier logon form. When I finish writing the three layers, I add the design mode, which is confusing. I don't understand the actual design mode, let alone adding the mode in the login form.

During the reconstruction, it was also difficult for the database. Although I knew about the data cool three paradigm, I understood it literally. However, data tables that comply with the charging system of the data center and comply with the Three-paradigm cannot be written.

Steamed Bread students one bite at a time, overcome difficulties one by one, read blog, and communicate with students, so that they can finally move around.

In the second half of the system knocking process, you will see that the system you have knocked on is full of loopholes. Where is the object-oriented design? The class is a mess. Adding Design Patterns to three layers should reduce code reuse and coupling between classes.

Cause Analysis: I don't want to talk about the issue of personal inertia here. For technical issues, I first wrote several lines in the process, then the system can be knocked out, so there will be no painting, but a brain is knocked out, and then you can draw a picture based on the pattern you have already typed. This is where the cause is. As a result, the overall view is not well grasped during system knock. In retrospect, the operation is required except for the UI Layer. First, let's talk about layer D, because there is a sqlhelper that reduces the reuse of database connection code. Instead of using a table to create a class to replace the previously messy class created based on the form. In this way, the creation of the D-layer form is reduced and the target table can be called and used flexibly during the call process. However, if I use a system that I have already typed, This method is suitable for a relatively small number of forms (but it certainly does not involve a lot of data tables for relatively small software, therefore, it is appropriate to create a D-layer class for the table. To put it bluntly, it is a waste of effort.) It turns out that the charging system for the data center is definitely not suitable. When talking about layer B, it is relatively simple for layer B. It is nothing more than calling the method of layer D. Some forms need to use multiple data tables, these ways reduce the coupling between the U layer and the D layer through the appearance mode, so that you only need to use several classes or even one class to complete the functions to be implemented by the U layer.

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: 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.