Skip to content

Commit

Permalink
Merge pull request #311 from turingschool/mm-refactoring-patterns
Browse files Browse the repository at this point in the history
SOLID and Refactoring
  • Loading branch information
memcmahon authored Sep 8, 2023
2 parents 9737e18 + 02961af commit 4843e2d
Show file tree
Hide file tree
Showing 4 changed files with 588 additions and 3 deletions.
9 changes: 6 additions & 3 deletions module5/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ In Module 2, students will begin to dive into the skills and mindsets necessary

## Curriculum

* [Lessons](./lessons)
* [Projects](./projects)
<!--
### Week 1
* Error Handling: [Prep](./preparation/Week1/ErrorHandling) &#124; [Lesson](./lessons/Week1/ErrorHandling) &#124; [Lab](./labs/Week1/ErrorHandling) -->
* Error Handling: [Prep](./preparation/Week1/ErrorHandling) &#124; [Lesson](./lessons/Week1/ErrorHandling) &#124; [Lab](./labs/Week1/ErrorHandling)
* Refactoring Patterns: [Prep](./preparation/Week1/RefactoringPatterns) &#124; [Lesson](./lessons/Week1/RefactoringPatterns) &#124; [Lab](./labs/Week1/RefactoringPatterns)
-->

39 changes: 39 additions & 0 deletions module5/labs/Week1/RefactoringPatterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: page
title: Refactoring Patterns Lab
---

## Disordered Orders

Today, you are joining the Disordered Orders development team. You have been tasked with refactoring their order-creating application.

### Setup

* Fork and Clone this [starter repo](https://github.com/turingschool-examples/DisorderedOrders)
* Run `update-database` in the DisorderedOrdersMVC project
* Run all test in the DisorderedOrdersTests project
* If you run into any errors, reach out to your instructor!

### The Refactors
Implement the following refactoring patterns. Check out a new branch (from main) for each of the refactoring patterns. That way you can always start fresh if you need to!

In your submission, we will ask for some reflection on each, so it would be helpful to keep notes as you go!

[ ] Extract Interfaces

[ ] Extract Methods

[ ] 🌶️ Move Methods

[ ] 🌶️🌶️ Extract Classes (We didn't cover this one in class!)

[ ] 🌶️🌶️🌶️ Any other refactoring pattern that you think would make this code better

As you refactor, keep in mind that refactors **should not** cause any existing tests to break. You may need to add tests, but you should not remove or change any existing tests.

### Submission

Create a slack message to all of your instructors. For each refactor that you completed, reflect on the following:
1. What problem were you trying to solve?
2. What refactoring pattern did you use, and why did you choose that pattern?
3. How did the refactor go? What was easy/difficult about it, and would you do anything different if you had more time?
Loading

0 comments on commit 4843e2d

Please sign in to comment.