SlideShare a Scribd company logo
Resharper
Refactoring and productivity
extension by JetBrains
Refactoring
“A disciplined technique for restructuring an
existing body of code, altering its internal
structure without changing its external
behavior"
Abstraction Class fragmentation
Naming convention
Refactoring - Abstraction
• Techniques that allow for more abstraction
– Encapsulate Field – force code to access the field
with getter and setter methods
– Generalize Type – create more general types to
allow for more code sharing
– Replace Type
– Replace conditional with polymorphism
Refactoring - Class fragmentation
• Techniques for breaking code apart into more
logical pieces
– Componentization breaks code down into reusable
semantic units which present clear, well-defined,
simple-to-use interfaces.
– Extract Class moves part of the code from an existing
class into a new class.
– Extract Method, to turn part of a larger method into a
new method. By breaking down code in smaller
pieces, it is more easily understandable. This is also
applicable to functions.
Refactoring - Naming convention
• Techniques for improving names and location
of code
– Move Method or Move Field – move to a more
appropriate Class or source file
– Rename Method or Rename Field – changing the
name into a new one that better reveals its
purpose
– Pull Up – in OOP, move to a superclass
– Push Down – in OOP, move to a subclass
Features
• Code browsing
• Code clean-up
• Refactoring
• Coding assistance
• Micro code generation
• Other useful features
Support
• C# 5.0
• VB11
• JavaScript
• CSS
• HTML
• ASP.NET
• ASP.NET MVC
• Razor
• XML, XAML
• WinRT
• MSBuild and NAnt
build scripts.
Resharper
IDEA vs VS
• 2 different keyboard scheme
– IDEA more familiar to Intellij IDE
– VS scheme more familiar to VS users
– VS scheme will never override a key mapped by
visual studio
Part 1 : Code browsing
• Navigate : ART-R-N Find : ALT-R-F
• Navigate to : Alt-' File : ctrl-t / ctrl-shft-t / alt-
shift-t
• Related files : ctrl - alt - f7
• Goto implementation : ctrl-F12
• Goto definition : alt-F12
• Find usages : shift f12
Part 2 : Code clean-up
• quickfix trio :
– Alt-Enter
– Alt-PgDn
– Alt-PgUp
• moving code around: ctrl-alt-shift-arrows
• View file structure: ctrl-alt-f
• Code cleanup: ctrl-e-c
• see: resharper -> options -> c# -> formatting style
• Safe delete : alt-Del
Part 3 : Refactoring
• Convert
• Rename
• Change signature
• Encapsulate/extract fields/properties/classes
• Introduce field/method/variable
• Inline field/method/variable
• Move to folder
• Pull and push memebers
Part 4 : Coding assistance
• Code generation
• Code templates
• Code cleanup
Part 5 : Micro code generation
• Snippets
• Generators
• Templates
Part 6 - other
• Stack trace explorer
• goto decleration to decompiled MSIL
• TODO list explorer
• Test runner
• Globalization
• Patterns catalog
• XML document support
• MSBuild or nant build scripts support
• Javascript and CSS support
Pros and cons
• Helps enforce standards
• Boosts productivity
• Helps code reviews
• Good analysis tools
• Over-refactoring
• Tool reliance
• Shapes the way you
think
Learning tips
• Keep the keymap under your keyboard
• Focus on a few commands at a time
• Don’t be afraid to try new shortcuts
• Keep your hands on the keyboard
• Watch other people use Resharper
• Learn with friends and teammates
The end
Extra
What does it do?
• solution-wide static code analysis (error detection
on-the-fly, without the need to compile)
• provides additional features for error correction
• code completion, navigation, search
• syntax highlighting, formatting
• code generation and optimization
• carries out 40 automated refactorings and
streamlines unit testing using NUnit and MSTest
Sources
• http://www.jetbrains.com/resharper/webhelp
/Code_Analysis__Examples_of_Quick-
Fixes.html
• Wikipedia

More Related Content

PPTX
DConf 2016: Bitpacking Like a Madman by Amaury Sechet
PDF
24 Resharper Tricks Every .Net Developer Should Know
PPTX
Docker workflow
PPT
Car Decals
DOCX
Ficha de videos
PDF
Developer workflow with docker
PDF
Developing multi tenant applications for the cloud 3rd edition
PPTX
Deploying web apis on core clr to docker
DConf 2016: Bitpacking Like a Madman by Amaury Sechet
24 Resharper Tricks Every .Net Developer Should Know
Docker workflow
Car Decals
Ficha de videos
Developer workflow with docker
Developing multi tenant applications for the cloud 3rd edition
Deploying web apis on core clr to docker

Viewers also liked (8)

PPTX
Building Multi-tenant, Configurable, High Quality Applications on .NET for an...
PPTX
Cloud architecture from the field v1 (in touch)
PPTX
ASP.NET Core MVC + Web API with Overview
PPTX
ASP.NET Core 1.0 Overview
PPTX
iOS Coding Best Practices
PDF
Introduction to Windows IoT via Raspberry Pi 3
PPTX
C# coding standards, good programming principles & refactoring
PDF
How to Become a Thought Leader in Your Niche
Building Multi-tenant, Configurable, High Quality Applications on .NET for an...
Cloud architecture from the field v1 (in touch)
ASP.NET Core MVC + Web API with Overview
ASP.NET Core 1.0 Overview
iOS Coding Best Practices
Introduction to Windows IoT via Raspberry Pi 3
C# coding standards, good programming principles & refactoring
How to Become a Thought Leader in Your Niche
Ad

Similar to Resharper (20)

PPTX
C++ & Data Structure - Unit - first.pptx
PPTX
ODP
Refactoring Techniques
PDF
OOP UNIT 1_removed ppt explaining object.pdf
PDF
08 subprograms
PDF
Git Advanced
DOC
Chapter 6
PPT
Lecture02
PPTX
Agile korea 2013 유석문
PDF
TDC2018FLN | Trilha Java - Implementando design patterns clássicos no Java 8 ...
PPTX
tech winter break workshop on git &git hub.pptx
PPTX
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
PDF
PHP Development Tools
PDF
System Programming and Administration
PDF
Refactoring Legacy Code
PPTX
Tech talks#6: Code Refactoring
PPTX
Terraform modules restructured
PPTX
Terraform Modules Restructured
PPT
Lecture: Refactoring
C++ & Data Structure - Unit - first.pptx
Refactoring Techniques
OOP UNIT 1_removed ppt explaining object.pdf
08 subprograms
Git Advanced
Chapter 6
Lecture02
Agile korea 2013 유석문
TDC2018FLN | Trilha Java - Implementando design patterns clássicos no Java 8 ...
tech winter break workshop on git &git hub.pptx
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
PHP Development Tools
System Programming and Administration
Refactoring Legacy Code
Tech talks#6: Code Refactoring
Terraform modules restructured
Terraform Modules Restructured
Lecture: Refactoring
Ad

More from Hanokh Aloni (20)

PPTX
Negev Game Devs 202304 Abandonware meetup
PPTX
SYSNGS BUGS - definition, lifecycle and what can I do with them as a developer
PPTX
How to code review for awesomeness and clarity
PPTX
NWD Total commander for fun and profit!!!
PPTX
CI CD OPS WHATHAVEYOU
PPTX
How to write proper GIT commit messages.pptx
PPTX
Architectural kata 0 of n.pptx
PPTX
Code smells (1).pptx
PPTX
NWD the73js.pptx
PPTX
top developer mistakes
PDF
Things senior developers should know
PPTX
Cynefin framework in software engineering
PPTX
Microservices
PPTX
Wcbpijwbpij new
PPTX
Trunk based vs git flow
PPTX
How to write unmaintainable code
PDF
How i learned to stop worrying and love the logs
PPTX
Game is ggj2018 presentation
PPTX
Microservices
PPTX
Game is ggj2017 presentation
Negev Game Devs 202304 Abandonware meetup
SYSNGS BUGS - definition, lifecycle and what can I do with them as a developer
How to code review for awesomeness and clarity
NWD Total commander for fun and profit!!!
CI CD OPS WHATHAVEYOU
How to write proper GIT commit messages.pptx
Architectural kata 0 of n.pptx
Code smells (1).pptx
NWD the73js.pptx
top developer mistakes
Things senior developers should know
Cynefin framework in software engineering
Microservices
Wcbpijwbpij new
Trunk based vs git flow
How to write unmaintainable code
How i learned to stop worrying and love the logs
Game is ggj2018 presentation
Microservices
Game is ggj2017 presentation

Recently uploaded (20)

PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Geodesy 1.pptx...............................................
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Digital Logic Computer Design lecture notes
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
ETO & MEO Certificate of Competency Questions and Answers
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
additive manufacturing of ss316l using mig welding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
PPTX
web development for engineering and engineering
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PPTX
Welding lecture in detail for understanding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Lesson 3_Tessellation.pptx finite Mathematics
Geodesy 1.pptx...............................................
Structs to JSON How Go Powers REST APIs.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Digital Logic Computer Design lecture notes
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
CH1 Production IntroductoryConcepts.pptx
ETO & MEO Certificate of Competency Questions and Answers
bas. eng. economics group 4 presentation 1.pptx
additive manufacturing of ss316l using mig welding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
web development for engineering and engineering
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mechanical Engineering MATERIALS Selection
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Welding lecture in detail for understanding

Resharper

  • 2. Refactoring “A disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior" Abstraction Class fragmentation Naming convention
  • 3. Refactoring - Abstraction • Techniques that allow for more abstraction – Encapsulate Field – force code to access the field with getter and setter methods – Generalize Type – create more general types to allow for more code sharing – Replace Type – Replace conditional with polymorphism
  • 4. Refactoring - Class fragmentation • Techniques for breaking code apart into more logical pieces – Componentization breaks code down into reusable semantic units which present clear, well-defined, simple-to-use interfaces. – Extract Class moves part of the code from an existing class into a new class. – Extract Method, to turn part of a larger method into a new method. By breaking down code in smaller pieces, it is more easily understandable. This is also applicable to functions.
  • 5. Refactoring - Naming convention • Techniques for improving names and location of code – Move Method or Move Field – move to a more appropriate Class or source file – Rename Method or Rename Field – changing the name into a new one that better reveals its purpose – Pull Up – in OOP, move to a superclass – Push Down – in OOP, move to a subclass
  • 6. Features • Code browsing • Code clean-up • Refactoring • Coding assistance • Micro code generation • Other useful features
  • 7. Support • C# 5.0 • VB11 • JavaScript • CSS • HTML • ASP.NET • ASP.NET MVC • Razor • XML, XAML • WinRT • MSBuild and NAnt build scripts.
  • 9. IDEA vs VS • 2 different keyboard scheme – IDEA more familiar to Intellij IDE – VS scheme more familiar to VS users – VS scheme will never override a key mapped by visual studio
  • 10. Part 1 : Code browsing • Navigate : ART-R-N Find : ALT-R-F • Navigate to : Alt-' File : ctrl-t / ctrl-shft-t / alt- shift-t • Related files : ctrl - alt - f7 • Goto implementation : ctrl-F12 • Goto definition : alt-F12 • Find usages : shift f12
  • 11. Part 2 : Code clean-up • quickfix trio : – Alt-Enter – Alt-PgDn – Alt-PgUp • moving code around: ctrl-alt-shift-arrows • View file structure: ctrl-alt-f • Code cleanup: ctrl-e-c • see: resharper -> options -> c# -> formatting style • Safe delete : alt-Del
  • 12. Part 3 : Refactoring • Convert • Rename • Change signature • Encapsulate/extract fields/properties/classes • Introduce field/method/variable • Inline field/method/variable • Move to folder • Pull and push memebers
  • 13. Part 4 : Coding assistance • Code generation • Code templates • Code cleanup
  • 14. Part 5 : Micro code generation • Snippets • Generators • Templates
  • 15. Part 6 - other • Stack trace explorer • goto decleration to decompiled MSIL • TODO list explorer • Test runner • Globalization • Patterns catalog • XML document support • MSBuild or nant build scripts support • Javascript and CSS support
  • 16. Pros and cons • Helps enforce standards • Boosts productivity • Helps code reviews • Good analysis tools • Over-refactoring • Tool reliance • Shapes the way you think
  • 17. Learning tips • Keep the keymap under your keyboard • Focus on a few commands at a time • Don’t be afraid to try new shortcuts • Keep your hands on the keyboard • Watch other people use Resharper • Learn with friends and teammates
  • 19. Extra
  • 20. What does it do? • solution-wide static code analysis (error detection on-the-fly, without the need to compile) • provides additional features for error correction • code completion, navigation, search • syntax highlighting, formatting • code generation and optimization • carries out 40 automated refactorings and streamlines unit testing using NUnit and MSTest

Editor's Notes

  • #16: TODO list explorer : Resharper -> tools -> todo items
  • #17: Over-refactoring Tool reliance Shapes the way you think