Frame your system with. NET (base class building ideas)

Source: Internet
Author: User
. NET out, to our VB programmers have an unprecedented light of the feeling, not that he simply upgraded from the VB6.0 to the VB7.0, is a kind of not to be seen derogatory feeling. It used to be that VB programmers had a lower position than programmers in other languages. Not now,. NET to achieve the real object-oriented, it seems a little bit uncomfortable, but for people with a JAVA,PB foundation is still very bright thing, So we can build their own vb.net base class for the future development of a solid preparation, no need to develop and start from scratch, but to inherit their own gradually build up the base class can, this is a kind of thinking, is also a kind of accumulation, is a good full use of our knowledge. I would like to share with you the idea of the base class component:

1. Base class: The parent class of all classes, and all other classes are inherited by this class, the most primitive of which is a class.

I. Error-handling class: Inherited from the base class, primarily responsible for error setting, and acquisition in the event of an error in the program.

Ii. log Processing Class: Inherited from a base class, primarily responsible for recording critical information in a program into a log library.

These are three basic classes, and of course you can build:

Iii. public inspection Class: inherited from the base class, mainly responsible for some commonly used data checking methods in the program

Iv. public modules, controls, object generation classes: responsible for generating the effects of the controls that you want to display based on parameters

V. Common Interface Framework Generation class: Creating a large frame setting for the screen

Vi. Common Interface Framework Generation interface: Set an interface, in the actual generation of frame, the interface can be inherited and implemented by the common interface framework to generate classes to generate different styles of frame

In a base class, you can add the definition of subclasses (error-handling classes, log-processing classes, and so on) to be defined as shared forms. In other subclasses it is natural to include classes such as handling errors and log processing, instantiating these classes makes it easy to handle errors, log, and so on, and these two classes are defined as shared forms so that their properties and parameters are easily available in other subclasses, the values set in the subclass,




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.