When Microsoft Visual Studio .Net 2005 emerges, programmers will be faced with the prospects of refactoring their code to take advantage of the newest features and programming environment. Although Microsoft is planning to take a splash into the refactoring arena with seven refactorings built in, competitors believe they are not going far enough to ease the job of all programmers.
JetBrains, which makes a refactoring tool called ReSharper, hopes to make the transition easier with ReSharper 2.0, which is scheduled for delivery later this fall. The company has a successful background in the Java world, and is increasingly moving to cover the .NET world as well. The Visual Studio .Net 2005 add-in will include 27 refactorings, and other features to ease the pain of transition. It was demonstrated at last month's Microsoft PDC05 in Los Angeles, Calif.
Valentin Kipiatkov, co-founder, chief scientist and vice president of product development at JetBrains, said that the number of refactorings is not the only important difference. He said, ReSharper 2.0 does a better job at finding relationships between classes within the program that need to be changed, which should reduce some of the headache of programmers in having to manually scan the code.
ReSharper 2.0 will also make it easier to reuse an interface for different applications. Programmers can scan the code to find original references to the interface, so these can be reused in the new application. Kipiatkov said, "This can be a very difficult task to do manually. You can have hundreds or thousands of users of the exact class, and this can make switching the interface difficult. The refactoring done by Microsoft Visual Studio .Net 2005 just generates an interface and puts methods to it and inherits the original classes. But the second step, which is often required when doing refactorings is that you need to change the code in many places."
Refactoring involves many processes besides just transforming code from one program to another, which Kipiatkov feels are lacking in the new Visual Studio. He noted, "Refactoring is the transformation of your program to achieve some goal, while keeping the semantics. You not only copy code from program to program, you are also investigating your code, and in many situations you need to analyze it manually because no automatic tool works universally. ReSharper helps you with many of these processes, which are not strictly refactoring, but are a big help during the process."
For example, on the fly error checking, immediately highlight uncompilable code as you are writing.
ReSharper 2.0 will support Visual Studio 2005, VS 2003, ASP.NET and C# 2.0. Refactoring tools in the VB space include Refactor! from Developer Express Inc. and NET Refactor from Know DOT.NET.