topics that matter; ideas worth sharing

share a tip, submit a link, add something new

Moving to Visual Basic.Net

March 16, 2001, 05:23 PM —  InfoWorld — 

Microsoft's Visual Basic is about to sprout some powerful legs this year in the form of Visual Basic.Net. Companies planning to adopt Visual Basic.Net will be able to leverage application capabilities, such as inheritance, that were previously confined to other languages, C++ for example. But the move to Visual Basic.Net is not merely a programming language upgrade; developers who have expertise in Visual Basic 6 will need to learn major new programming concepts.

Business leaders face the tough choice of whether to migrate or rewrite existing Visual Basic 6 applications using Visual Basic.Net or to adopt a different business application development platform altogether, such as Java. Either choice will require a sizable investment in both developer coding and training.

If your company has invested in the Windows platform as its primary application-serving vehicle and doesn't see a strategic need to deviate from that, then investing in Visual Basic.Net is a good choice. On the other hand, if your company's application needs will potentially outgrow Microsoft technologies, then this may be a good time to perform a cost/benefit analysis that includes other platform choices.

Decisions to rewrite business applications using Visual Basic.Net will require a significant amount of work. IT directors will want to redesign applications to leverage the powerful capabilities that Microsoft has introduced with Visual Basic.Net. This means that your company will need to invest in another round of design, coding, testing, and developer training that should be viewed as a long-term effort toward a successful implementation.

Developer tips

IT managers and development teams should begin a series of projects that examine their existing Visual Basic 6 code with an eye toward forthcoming changes.

1. Get business logic out of forms. Applications that contain business logic at the form layer will not easily migrate to Visual Basic.Net. Move the logic into components and classes for a smoother transition.

2. Get SOAPed up. Take a look at Microsoft's SOAP (Simple Object Access Protocol) implementation, as it will enable Visual Basic.Net objects to interact via the Web.

3. Don't use currency and variant types. Visual Basic.Net will not support these types. Use decimal types instead of currency. Visual Basic.Net will replace variants with support for object types.

4. Check your arrays. Visual Basic.Net supports only zero-based arrays. Change existing arrays to be zero-based to make the transition easier.

5. Don't use default properties. Visual Basic 6 saves you time by letting you access the default properties for an object. In contrast, Visual Basic.Net requires that you explicitly define the property, function, or method you want to use. Existing objects should be inspected and explicitly defined.

6. Check for obsolete keywords. Visual Basic has, until now, carried backward support for QuickBasic-compatible keywords. With Visual Basic.Net, that support goes away, so locate any of the keywords that will become obsolete and remove them from your code.

7. Watch out for variable declarations. In Visual Basic 6, you can declare a variable anywhere in a routine, and it will be available. Visual Basic.Net introduces the concept of block-scope, which changes variable declaration. The easiest way to grapple with this change is to declare all variables at the top of a routine.

8. Change your form-loading process. In Visual Basic 6, a load is formed by merely referring to it. With Visual Basic.Net, you'll need to declare a form variable, instantiate it, and then show it.

9. Expect conditionals to be processed differently. Both parts of a conditional are evaluated in Visual Basic 6, but because Visual Basic.Net shares a common run time with other languages, it handles Boolean logic differently. For example, if the first part of a conditional is false in an AND operation, the second part of the conditional will not be evaluated.

10. Simulate the enhanced use of inheritance and object concepts. Get a jump on learning the object-oriented concepts supported in Visual Basic.Net. Look for materials that discuss how to simulate the way Visual Basic.Net will treat concepts, such as inheritance, using Visual Basic 6.

Next steps

Those are but a few things Visual Basic developers need to consider as they prepare for Visual Basic.Net. Because no additional effort will be required to adopt a new application development strategy, now is a good time to reevaluate your company's commitment to Microsoft's Visual Basic programming language.

Ensuring the future of Visual Basic applications

1. Decide whether to migrate or rewrite applications for Visual Basic.Net or to move to another platform.

2. Inspect your code and make changes with your future platform in mind.

3. Invest in developer training to get up-to-speed on new concepts.

4. Redesign, migrate or rewrite, test, and implement your new applications.

» posted by ITworld staff

InfoWorld

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Resources
White Paper

Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.

Webcast

Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.

White Paper

Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.

Free stuff
Featured Sponsor

Get a broad understanding of important regulations and how you can make sure your site is in adherence.





Learn how VeriSign SGC-enabled SSL Certificates can help improve site security and customer confidence in the free white paper, "How to Offer the Strongest SSL Encryption." In this paper you will learn the differences between weak and strong encryption and what they mean for your site's performance.

Get VeriSign's free white paper: "The Latest Advancements in SSL Technology" and learn about the benefits of strong SSL encryption, Extended Validation (EV) SSL and security trust marks and what these SSL offerings can do for your site.

Now with Extended Validation (EV) SSL available from VeriSign, you can show your customers that they can trust your site. Learn about EV SSL benefits in this free VeriSign white paper.

More Resources