VB 2005 and Refactoring: Get it While It's Hot!

Visual Basic 2005 developers: Download a free beta version of Developer Express' Refactor! product.

Although you may have picked this up on one of the zillions of other blogs that will be mentioning this, let me risk redundancy by repeating the big news: VB 2005 will have refactoring support, after all! Because of an arrangement between Microsoft and Developer Express, Visual Basic 2005 developers will be able to take advantage of Developer Express' Refactor! product, for free. This isn't a crippled version or some sort of upsell, but a full, working copy of an excellent implementation of refactoring. (In case you've missed it, "refactoring" is the process by which developers can quickly and easily change the shape of their code: converting blocks of code into procedures, renaming tokens, converting public fields into property procedures with backing fields, and much more.)

This is really exciting news, and I'd like to add a special thanks to the folks on the VB team at Microsoft who proactively pulled this off. Rather than simply live with the lack of this competitive feature, the VB folks found a solution and made it work. (You'll probably be amused to know that there are not currently plans to make this product available for free to C# developers, although both C# and VB developers can currently "upgrade" to the Professional edition, including support, for $99US.)

Download the current beta (corresponding to Beta 2 of Visual Studio 2005) of Refactor! here, or visit the Visual Basic 2005 Developer Center for more information. (If you have a previous version of Refactor! installed, make sure you uninstall the old version before installing this new version.)

To get started using refactoring, try some simple activities:

  • Rename: Hover over a variable, note the graphic "..." symbol. Click on the symbol, and rename the variable. Note that as you change the variable name, all instances of the name change as well.
  • Convert to property: Create a public variable inside a class. Use Refactor! to convert the variable into a set of property procedures with a private backing field.
  • Extract a procedure: within an existing procedure, highlight a block of code, and use Refactor! to extract the block into its own procedure.

These are just a few of the many refactoring tasks you can accomplish. Have fun modifying your code. (My suggestion--make a backup of the code first! This is a beta product, and it's easy to get carried away with the refactoring efforts while playing, as well.)

Published Thursday, April 21, 2005 12:32 AM by KenG