Click here to Skip to main content
15,881,797 members
Articles / .NET

Refactoring Tools Review - Part II

Rate me:
Please Sign up or sign in to vote.
4.25/5 (3 votes)
12 Mar 2010CDDL5 min read 14.3K   7   3
DevExpress CodeRush and Refactor! Pro Review

(Cross post from IRefactor)

Oh, my God!
I am definitely in love!
I finally had the time to play with the latest DevExpress's Refactor! Pro and Code Rush.
Two distinct main features capture my eyes immediately:

  • The ability to highlight the changes/code smells and refactorings inside the Visual Studio's Editor.
    It seems that the team invested a lot of effort in order to enable painting on the Visual Studio's editor and canvas.
    This enables a smooth user experience, without prompting and stalling with unnecessary dialogs.
    The changes are visualized directly on the source code.
    Below is one of my favorite refactoring steps: "Extract Method" visualized in Visual Studio 2008.
  • A huge amount of automated tasks: navigations, refactoring steps and code improvements.
    Refactor! Pro has more than 150 refactoring steps to automate the burden of the day to day refactoring.
    Code Rush brings smooth navigation within the code, markers (like the bookmarks in VS, but they work across different files/projects), templates to enhance the development and "on the fly" static code analysis.
    Below is a partial list of the Refactoring Catalog:

    Here is a screenshot of a Code Issue found in the code, by the "on the fly" code analysis. Pay attention to the blue indicator being painted on the editor's scroll bar:

    Navigation features and Templates allow a very fast development experience.
    The CodeRush window trains and suggests interactively, templates or other actions that are applicable at the current position.

However those are the small things that make these tools so great. It's unbelievably easy to develop clean code in the first place and to refactor it later. Meet your new friend; Hit "Ctrl+`" and all your dreams will come true. :)

The tools allow you to develop fast and smoothly: you will double your productivity, you will find that it is easier to navigate through the code and finally you will find that you can give up the mouse. Being a Software Craftsman it's very important to know the tools of the trade (IDE commands/shortcuts). CodeRush and Refactor! Pro can help you to achieve that. Moreover, these tools provide a good sense of living in one place. Everything is achievable through the Visual Studio Editor and accessible through one keyboard combination or another.

If you have seen my previous post, you have probably noticed the Editor layout I used in the past. Code Metrics Window, Code Definition Window and Source Length Guides hack (in the registry) were combined together to enhance the IDE. The combination, using default Visual Studio's windows, was to say the least, a bit unnatural.

Here is my Editor's layout that utilizes the CodeRush's features:

You can easily see that the code metrics are placed very conveniently adjusted to a method. The source length guides is configurable and can be easily modified (without hacking the registry) and the references window is awesome as it allows colored Code Definition Window's experience.

Notwithstanding; Though CodeRush and Refactor! Pro are great tools, there will be quite a learning curve in order to master all (or at least a great deal) of its features. There are so many that each day I discover new and exciting ones. Therefore, in order to maximize your experience you will need to invest time learning the features. For that purpose, DevExpress provides a descent help (coming installed with the tools) and also maintains a good training video series, here. In addition, as stated above, the CodeRush Window provides an interactive learning experience while you are working on your code base.

I would also suggest adding the following to the refactoring catalog:

  • "Move Method" - an ability to move a method to a different class/file.
    Refactor! Pro provides a very close feature, called "Extract Method To Type", but there are several issues with the later:
    • Sometimes the method is already given, but should be moved to a different location.
    • Extracting a method to a different type is a combination of two basic steps: Extract Method and Move Method. Refactoring usually preaches to do small changes followed by compilation and unit tests execution. Combining those two steps can affect beginners; They can either premature utilizing the refactoring or can fail, to correctly interpret the right location for the method.
  • "Remove Parameter" - an ability to remove a parameter from a method's declaration.
    Also here, Refactor! Pro provides a close feature, called "Remove Unused Parameter". Though, I easily can degenerate the use of the parameter inside the method and then use the "Remove Unused Parameter" step, I still find it useful to remove first the parameter from the method itself.

CodeRush comes with TestRunner and now supports several xUnit Test Frameworks.
A nice to have feature is also:

  • A support for a parametrized Unit Test Attribute, such as TestCaseSource.

From the performance perspective, I have found CodeRush and Refactor! Pro satisfying. I didn't feel any unnecessary pauses or delays during my work, while utilizing the tools.

Finally, the most important note :). Would I consider purchasing these tools?
My answer is, it depends: As a corporate that wants to boost its developers performance, buying the whole package of CodeRush and Refactor! Pro for 249.99$ makes sense. As an individual developer, the only less expensive option is to consider a purchase of just the Refactor! Pro license for 99$. I will add, that if DevExpress will cut of the number of features in CodeRush and Refactor! Pro, but will provide a license from 50$ - 120$ it will make the individual developer's life easier.

A disclaimer: I have received a fully functional copy of the CodeRush and Refactor! Pro in order to allow the investigation of the features over the time.

This article was originally posted at http://urilavi.blogspot.com/feeds/posts/default

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Other
Israel Israel
Uri Lavi is a development lead with extensive experience in Data Intensive, Business Compound, Distributed and Scalable Software Systems. Uri specializes in mentoring, coaching and consulting for complex software engineering topics, among which: Software Architecture, Design Patterns & Refactoring.

Comments and Discussions

 
GeneralMy vote of 2 Pin
RenateN12-Mar-10 21:22
RenateN12-Mar-10 21:22 
it doesn't go into depth
GeneralRe: My vote of 2 Pin
Rory Becker12-Mar-10 22:16
Rory Becker12-Mar-10 22:16 
GeneralRe: My vote of 2 Pin
Uri Lavi13-Mar-10 1:06
Uri Lavi13-Mar-10 1:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.