Giter VIP home page Giter VIP logo

refactoring-to-solid-pluralsight's Introduction

Refactoring-To-SOLID-Pluralsight

Resources for my Pluralsight course on Refactoring to SOLID C#.

Watch the Course Now | More Courses by Steve

This course takes a look at a legacy sample application based on real world code and walks through how to improve its design using SOLID principles and refactoring techniques.

Table of Contents

  • Tour the Legacy Sample App
  • Assess the Sample Code
  • Refactoring to Apply SOLID
  • Assessing the Updated Code with Key Metrics
  • Next Steps

refactoring-to-solid-pluralsight's People

Contributors

ardalis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

refactoring-to-solid-pluralsight's Issues

Refactoring Tasks

  • Static method
  • string return type - replace with a return object
  • refType should be replaced with different objects / strategies
  • Refactor checking session for PricingOff
  • Remove unused locals
  • Refactor prices to use decimal
  • Declare locals where they're used
  • Remove DataTables - use strongly typed types
  • Refactor writing to Session - CAREFULLY
  • Move try-catch to a wrapper / decorator
  • Simplify validation/guards
  • Return a Result type with support for listing validation problems
  • Refactor Kitchen to use a Repository or similar to fetch from data source
  • Refactor all ADO.NET Connection blocks to use Dapper and/or helper methods
  • Replace if refType checks with polymorphism / strategy pattern / DI
  • Group locals into types or pull up fields/properties on class
  • Focus on the price calculation logic - pull in data as parameters or pass in ways to get data needed
  • Delete empty else block
  • Load actual Feature objects instead of using DataReader/DataTables
  • Make references to Color ID consistent everywhere (rename Color -> ColorId, etc.)
  • Refactor !IsIland logic into its own special method
  • Move String Format logic to an extension method (if still needed)
  • Use using for StringWriter to obviate finally block

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.