VB7 New Features Preview

zhaozj2021-02-08  277

On February 15 this year, on the Visual Basic Circle Summit (VBITS) held in San Francisco, Microsoft announced a series of exciting new features that would be included in VB7. Microsoft also said that this new version of VB will be released for about a year, so now I want to be eager to use VB7 friends, I am afraid I have to wait patiently for a while. But now, we can still take a look at Microsoft announced something new. It is said that there will be many core levels in VB7, which can be fully objective, and VB's form system has certain improvements, and also integrates part of Web technology. However, we don't plan to make a very detailed and comprehensive introduction to the new features of VB here. Here we just want to pay attention to significant improvements, as for detailed situations, interested friends can take a look at Technologies.

All along, everyone is always "object-oriented" or "object-oriented" or even "component" language and is not fighting. but! These debates are in front of the upcoming VB7, and they will immediately be able to do well - because, regardless of the standards, VB7 is definitely in line with each standard for object-oriented objects. Let us now look at what is characteristic.

Constructor: When we create an object, use constructor we can assign initial values ​​to this object at the same time, which helps we correctly initialize an object. Now, when you create an object, you must wait until the object is created, and then call a separate method to initialize it. In the future, in VB7, we can use the constructor to assign the initial value - so that we don't need to make a method of invoking the original value. The constructor simplifies the process of encoding and also reduces the chance of error.

Package features: The meaning of the package is that the program provides an interface that contains a series of processes and functions, and other programs can directly utilize this interface of the object, without having to understand the specific code inside the interface. The code in the interface generally always implements some relatively complete functions.

Free thread: thread is a very complex concept, and it will not explain it. However, basically, the thread means that our program can do two things to do at the same time. For example, we may need to make the program print a document in the background, but also let it respond to the current user's constant command. Threads are more useful when creating a highly scalability server program, and uses threads to prepare a very strong interactive user interface. For example, we can add a Cancel for a program that needs to run for a long time. Button allows users to have more choices. Everyone must remember the way to think about the thread when VB programming. The complexity and instability of the debug thread makes it complicated, because only the API is written, or the pseudo thread, it is better to say that it is better to say that the multi-process is.). Now VB provides the ability to write threads, thread writing is quite complicated in debugging, and VB7 has finally implemented a relatively simple form.

Inheritance: Whether a language has inheritance characteristics often used as a key criterion for judging whether it is an object-oriented language. Inheritance is a concept: if an object can obtain an interface and method of another object, and we can extend these interfaces and methods, we call this object inherited another object. For example, we can create a generic product object "product" that can handle all products in the product store program. From this object, according to whether you need to pay, I can derive a tax-free product object "NontaxableProduct" and a taxable product object "TaxableProduct". Both objects will inherit the interface and all methods of the original product object "Product", but will modify or extend the original object according to the different actual conditions in need. Initialization function: Now we need to declare a variable in VB, then we can assign a first value to it - so we need to write two lines of code. The initialization function allows us to merge these two steps in a row code. Although this is a tiny change, from the perspective of code, this improvement provides us with less, simpler, easier and easier code.

Object-based: For a computer language, it is relatively easy to object-oriented than orientable objects. However, what is object-based, and now there is only one vague definition - probably refers to a language that has direct and object interactions. VB3.0 is already based on object-based languages, and it is possible to interact with DAO objects and controls; later with versions of the version, these objects have expanded to ActiveX controls, RDO, ADO objects, and more.

Object-oriented: an object-oriented language requires at least three conditions. Packaging (already implemented in VB4). Inheritance (there will be in VB7). Parallel (huh, multi-morphology is a multi-form, which is the same interface of the object. There is a flash in VB3! Is it very surprised?) So in VB7, VB will achieve a complete object-oriented object Because he will meet these three conditions.

Overload: Objects often carry out the same functionality on similar data. For example, we need to add service and product items to a subscription object. Now we must separate a method and a method for the subscriber. With the function overload, we need to perform the ASS method, then let the VB language you choose to perform the correct function according to the situation.

Cover: When using inheritance function, our new class has been all methods from the parent class. However, perhaps we need to make one a clock or a few clock functions to perform additional actions. We can implement such functions by overwriting the original approach. Typically our new code can also call the original method of the original parent class object, so we can use the XX key to implement (such as My,)

Polymontist: Simply, is the ability to make two different types of objects to perform the same method. This allows us to write code, this code calls this method without the type of object used at that time. VB supports this by later bundling, while in VB5, by executing critical son and multiple COM interfaces. Now, in the 7th release, I will see that the inheritance interface can also have multiple planets. Finally, VB gives the program to a big flexible row when performing sexuality.

Shared members: also called static members and class members. These are methods and variables for all classes. Every object is created, based on a given class. Share these identical variables and functions. This means, for example, we can calculate how many instances have created, as long as we live a shared technician variable.

Structured error handling: replacing unstable also extremely unflexible inherrgoto statements, we have a new structure to handle errors. This is a structure contains TRY, CATCH, and DD keywords. The code block between try and carck is protected. If there is an error, this Catch code will run quickly. After the CATCJ is running, the code within the FAN block is the error and the end of the error. the work. Type Security Guarantee: VB is particularly avant-garde on the type of variable today. He will automatically convert the digital to a text in order to print, and more similar. Sometimes such a situation will lead to unknown side effects. With the type of safety control, we will be able to choose to let VB avoid automatic type conversion, avoiding some unssenced errors when programming, is very useful.

User interface inheritance: language inheritance is still insufficient, VB65 will also make VB's forms inheritance characteristics. This thought that we can create a basic form touch class, maybe in touch classes contain a standard toolbar, company logo, and color, then send other models that I need in this touch class. All other touching classes will inherit the style and code of the dating from the original touch. A change to the original touch class (CCC), which can automatically ignite all other forms that are derived again, only simple and inexpensive.

Web form: VB has been widely considered to be a powerful form design tool for many years. We also like to get used to double-click an encoded window in space, and then we can write which space in the window. The Web form brings this feature to HTML development. The web form is a browser to platform, and all the code runs on the WQEN server. But at the same time he gave us the ability to write the time code of the table design and dual-machine space. What is even better is that this is the true VB code is not a VBS code.

Web Services: A web service is a component that runs on a web service and allows the client to call his method through HTTP. Each method on the component appears as a URL and can return data (perhaps an XNL document) and accept parameter input. Such techniques are based on open SOAP standards, so our server components can actually be accessed by any customer, regardless of the language or platform.

Since we have a good understanding, the remaining problem is that Microsoft how to achieve these new features, and more importantly, how will we completely use it more efficient more powerful?

One thing is determined - with these changes, VB will become a completely object-oriented language. With these new features mentioned above, VB will still be the most widely used development tool in the world.

转载请注明原文地址:https://www.9cbs.com/read-1315.html

New Post(0)