Using the Visual Studio Code Refactoring Tools

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

Introduction

Code refactoring is a controller technique or process of restructuring your code without changing its external behavior for easier maintenance, better readability, understand and extend support. The main purpose of refactoring is to fight technical debt. Code refactoring transforms a mess into clean code and simple design. Visual Studio 2017 provides its own refactoring capabilities, also it supports a list of third party tools for code refactoring.

Visual Studio Code Refactoring Tools

Refactoring Essentials

Refactoring Essentials is an open source free Visual Studio extension for C# and VB.NET code refactoring. It makes your code better and easier to read. The extension provides recommendations on how to improve your code quality and converters C# code to Visual Basic and vice versa (VB to C#). VS Refactoring Essentials is available as a Visual Studio extension, NuGet packaged for build servers/IDEs, and Refactoring Essentials assembly (can be added in your solution from an add reference).

JustCode

JustCode is a Visual Studio extension for code analysis and refactoring that was developed by Telerik. The developer community mostly uses this tool as an agile development add-in for Visual Studio to boost .NET development. JustCode integrates seamlessly with your natural work-flow, with quick hints, code generation, unit test runner, and smart refactoring. It improves your code quality. It provides features for C#, VB.NET, ASP.NET, XAML, Razor, CSS, JavaScript, and HTML; it also supports multi-language solutions. JustCode also provides features such as code navigation and search, code generation, code templates, decompile for debugging, and so forth.

ReSharper

ReSharper is a code quality analysis and refactoring tool available for C#, VB.NET, XAML, ASP.NET, ASP.NET MVC, JavaScript, TypeScript, CSS, HTML, and XML. It's a renowned productivity tool developed by Jetbrains. ReSharper makes Visual Studio a much better IDE. ReSharper can help a developer with code quality analysis, navigation and search, coding assistance, refactorings, code generation, code templates, code cleanup, unit testing, internationalization, ASP.NET and ASP.NET MVC Tools, XAML editing tools, cross language functionality, NAnt and MSBuild Script Editing, and Open API.

CodeRush

CodeRush helps developers write better code faster; it also provides quick refactoring, the capability to run test cases quickly, and find and fix defects. CodeRush makes it easier for developers to create and maintain source code with extreme efficiency. CodeRush is recommended for test-driven development; nothing is faster than CodeRush. It has analyzed code coverage features to scan an entire project to find out what parts of your solution are covered by unit tests. CodeRush lets you create new test cases with a single keystroke. It also detects unit tests written using the NUnit, xUnit, MSpec, and MSTest frameworks. The analysis diagnostics feature helps you detect and correct possible code issues and code smells. With visualize code and intuitively debug, CodeRush makes it easier to review complex code.

Visual Assist X

Visual Assist is a plug-in for Visual Studio to enhance code suggestions; it provides refactoring commands and basic syntax mistakes, and spell checking support. Visual Assist reduces the complexity of code, improves its readability, and makes it extensible by refactoring your code. Visual Assist added Visual C++ support with the Visual Studio 2017 Community edition.

DPack

DPack is a free collection of Microsoft Visual Studio tools to increase a developer's productivity, automate repetitive processes, and extend Microsoft Visual Studio features. DPack provides various browser tools that allow the developer to quickly find solution files, types, particular type members, methods, or properties.

JS Refactor

JS Refactor is a Visual Studio code extension for adding refactorings to help speed up the development process and reduce a JavaScript developer's development time.

Code Style Enforcer

This tool gives instant visual feedback inside the C# code editor when someone violates any of the configurable code rules. The default rules are based on the C# coding standards from design, which is the most complete code standard available and it is free to download.

Conclusion

That's all for today on code refactoring. As you can see, there are lot of options available in Visual Studio 2017 for code refactoring and it's a very easy task. I am suggesting that developers use code refactor tools because they has many benefits that go beyond the obvious, and is an activity worthy of the time devoted to it. Refactoring doesn't just produce better code; it produces better coders.



About the Author

Tapas Pal

I am working in Microsoft Technology for last 15 years and presently working with Cognizant Technology Solutions, India as Senior Architect. I have completed TOGAF 9.1,Microsoft Certification on .NET 1.1 , .NET 2.0, SQL Server 2005 and Sharepoint. Please visit my Blog - http://tapas-pal.blogspot.com/

Related Articles

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date