From VB programmer to vb.net programmer

Source: Internet
Author: User
Tags error handling goto inheritance logical operators
Program | Programmer One, accept the development tool upgrade, but that's all. Tools are better used, the program is basically the original writing, apply an old saying: no silver bullets.

Second, the first concern is the framework, that is, the structure of the entire system. There are many good structures to use, do not have to do everything yourself, but must understand, and do more exercises.

Third, learn some object-oriented concepts, such as the encapsulation of objects, inheritance, polymorphism.

Four, make full use of VB6 to vb.net migration tools, which can be familiar with a number of changes, some commonly used namespaces and classes can be mixed with this familiar.

If you always find that some code needs to be copied, pasted, then make them both components and custom controls, because in the. NET and the development of custom controls is simply too convenient.

Six, to be cautious about multi-layer architecture, its advantages are very attractive (what are the advantages?) )。 There are also drawbacks: The data will travel between the layers too many, more impact efficiency; tiering too much, for small projects appears to be very "heavy", before the development of the agreement to be very perfect, otherwise will only make the system more difficult to maintain, as the customer requirements of the changes, the benefits of multi-tier development will gradually disappear.

For small projects, the best architecture is "concise and adequate".

Be careful with modules (module).

Nine or one start planning the project's name space, try not to use the system default settings. Otherwise, you will regret it when you want to change it later.

Ten, strongly recommend form inheritance, but if you have to design it well, including font and picture properties. If you change it later, the already formed instance will need to be changed manually.

Xi. use of a try ... Catch... Finally go and arm your exception and throw away the annoying on Error Goto. (I found someone wrote error handling, but forgot on error Goto)

1. Make full use of the new features brought by vb.net. For example: Use OrElse and andalso as necessary logical operators with short-circuit functions, return as much as possible instead of functionname = result, logic-related code with #regin ... #end Regin for classification

12. The order of selecting Ado.net objects in Data retrieval is: Executesclare, ExecuteReader, filling dataset. < to Be continued >



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.