Summary of Machine Room reconstruction

Source: Internet
Author: User

Machine Room reconfiguration has ended for half a month, today to make a summary of the machine room reconstruction. VB. NET version of the computer room from the database start, documentation, UML diagram and system design, according to the software development process. Vb. NET version of the computer room charge system more in line with the idea of object-oriented. Here's what I learned in the machine room refactoring and how it feels in this process.
Object Oriented

VB. NET version of the computer room charge system using OOP programming ideas, from the system's three-layer architecture can be seen. In the machine room reconstruction used to three layers of thought, so that each layer is highly decoupled . three layers between each other, each other, thus ensuring the normal operation of the system.

use of the SqlHelper class

At the beginning of the design of the D layer, each time with the database to interact with the link string to connect the Sqlconnection,sqlcommand,sqldatareader statement, so that the repetitive writing code is very troublesome, and then thought of the database linked to the statement with a class wrapped together , so it's OK to write the other code directly. Check on the Internet, know the existence of the SqlHelper class, but also the SqlHelper class code is studied, most of the code is still understood. In the process of machine room reconstruction, the use of SqlHelper class is also more skillful.

use of generics

The parameters passed between each layer of the engine room are entities, the data of the database queried in the D layer is datatabled, the use of DataTable as a parameter has some shortcomings, the biggest disadvantage is to reduce the security of the database, not conform to the idea of object-oriented. In this case, the generic type is used instead of the DataTable object to pass the data, which can not only protect the data, but also conform to the object-oriented thought. For details of this piece, see the blog, "Generic Collection Alternative DataTable"

use of design patterns

The previous study of the design pattern just follow the code in the book plus their own understanding, the example of the knock over, but did not get the actual application, this time the machine room reconstruction is a good practice opportunity. In the process of machine room reconstruction, learning to use some design patterns, such as the implementation of the function of the machine using the strategy to calculate the consumption time, the responsibility of the model calculation of consumption amount. In this process, I think the basic knowledge of the textbook is very important, only by understanding the principles of these design patterns, in the process of tapping the code to be more comfortable. When

Encapsulation of code

There are many functions in the system that involve determining whether the card number exists, whether the text box is NULL, etc., in order to simplify the code, these common functions can be encapsulated in a class. In this way, it is OK to call directly when implementing the function, which is also an object oriented idea.

feel Time Management : The Machine room reconstruction of the more than 40-day thinking of the use of the completed, but the project or postponed, in the final analysis, or their own time is not allocated well. From mid-January onwards, examinations, tests, self-test and other needs to do things to their original computer room plan disrupted, have to have to re-plan time. Through this thing, I can see that I still need to exercise in the field of time management.
serve The people wholeheartedly: this room acceptance two times, the first time did not pass, in addition to some of the features to achieve some defects, the most important is the system interface is not optimized, the user interface is the first impression of your system, no matter how well you realize the function, how perfect, As long as the user is not satisfied with your system interface, then this system is a failure.
the power of OOP : When you learn the first project of C/s, you know the object-oriented benefits. But only know, also did not see through the physical. This time with vb.net realization of the room really let me realize the power of OOP. In terms of code implementation and system maintenance, because of the low coupling between the layers, no matter what modifications to a class will not affect other classes. This is more reliable than the VB6.0 realization of the room. In future programming, OOP will lead the software design trend.
    SummaryThe Machine room reconstruction let oneself to the software development process has an understanding, also makes oneself toward specialization more step. The next stage is the machine room cooperation, walk up ....




Summary of Machine Room reconstruction

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.