All Projects → corywheeler → refactoringtopatterns

corywheeler / refactoringtopatterns

Licence: other
A place to practice Refactoring To Patterns that Kerievsky wrote about in his book

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to refactoringtopatterns

work
A compact library for tracking and committing changes to your entities.
Stars: ✭ 50 (+8.7%)
Mutual labels:  design-pattern, design-patterns, designpatterns, designpattern
design-patterns-for-humans-cn
Design patterns for humans 中文版 - 对设计模式超简单的解释
Stars: ✭ 2,432 (+5186.96%)
Mutual labels:  design-pattern, design-patterns, designpattern
When Ts
When: recombinant design pattern for state machines based on gene expression with a temporal model
Stars: ✭ 112 (+143.48%)
Mutual labels:  design-pattern, design-patterns
Php Patterns
A minimal and conceptual PHP 5.4+ pattern collection that *will* cover design patterns (not only GoF's), anti-patterns, closure patterns, refactoring patterns
Stars: ✭ 147 (+219.57%)
Mutual labels:  design-pattern, design-patterns
Dpmodel
《设计模式之禅》原书源码学习
Stars: ✭ 220 (+378.26%)
Mutual labels:  design-pattern, design-patterns
Lld Parking Lot
Repository for low level design solution of parking lot
Stars: ✭ 27 (-41.3%)
Mutual labels:  design-pattern, design-patterns
Designpatterns
The 23 Gang of Four Design Patterns.
Stars: ✭ 93 (+102.17%)
Mutual labels:  design-pattern, design-patterns
Unitysingleton
The best way to implement singleton pattern in Unity.
Stars: ✭ 185 (+302.17%)
Mutual labels:  design-pattern, design-patterns
Designpatternsphp
sample code for several design patterns in PHP 8
Stars: ✭ 20,158 (+43721.74%)
Mutual labels:  design-pattern, design-patterns
refactoring-for-testability-cpp
Hard-to-test patterns in C++ and how to refactor them
Stars: ✭ 40 (-13.04%)
Mutual labels:  refactoring, design-pattern
kata
TDD, Refactoring kata in many languages
Stars: ✭ 14 (-69.57%)
Mutual labels:  refactoring, kata
php-finder refactoring-kata
🐘🔍Incomprehensible Finder Refactoring Kata port for PHP
Stars: ✭ 22 (-52.17%)
Mutual labels:  refactoring, kata
Rest Api Design Guide
NBB's REST-ish API Design Guide
Stars: ✭ 643 (+1297.83%)
Mutual labels:  design-pattern, design-patterns
Entitas Csharp
Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
Stars: ✭ 5,393 (+11623.91%)
Mutual labels:  design-pattern, design-patterns
Designpatterns
Project : Design Patterns Examples in C#
Stars: ✭ 1,337 (+2806.52%)
Mutual labels:  design-pattern, design-patterns
Daisyui
⭐️ ⭐️ ⭐️ ⭐️ ⭐️  Tailwind Components
Stars: ✭ 382 (+730.43%)
Mutual labels:  design-pattern, design-patterns
Unity Design Pattern
🍵 All Gang of Four Design Patterns written in Unity C# with many examples. And some Game Programming Patterns written in Unity C#. | 各种设计模式的Unity3D C#版本实现
Stars: ✭ 2,600 (+5552.17%)
Mutual labels:  design-pattern, design-patterns
awesome-software-architecture
A curated list of awesome articles, videos, and other resources to learn and practice software architecture, patterns, and principles.
Stars: ✭ 1,594 (+3365.22%)
Mutual labels:  design-pattern, design-patterns
Object Oriented Design
面向对象设计的设计原则和设计模式
Stars: ✭ 313 (+580.43%)
Mutual labels:  design-pattern, design-patterns
Design Patterns
Contains examples of design patterns that implemented in php
Stars: ✭ 375 (+715.22%)
Mutual labels:  design-pattern, design-patterns

Refactoring To Patterns

A place to practice Refactoring To Patterns that Kerievsky wrote about in his book.

This repo contains source code that very closely or exactly matches that which is found in Joshua Kerievsky's book Refactoring to Patterns.

Have to say thank you to Joshua for putting all of these patterns together and for making them easily consumable. If you have landed here and are interested in other things Joshua has put out, I encourage you to check out the following links:

Getting Around

Language && IDE Concerns

All code samples are written in C#, and therefor will follow C# coding conventions (versus any Java coding conventions you might see in the book).

I have tested running this code in the following IDE's, and all seems to work fine:

There might be an issue with Visual Studio 2017 (on Windows), but I've not been able to dig into it as of yet.

Other Language Implementations

A big thank you to several friends that have converted this repo to other languages.

What you'll find here

Each refactoring that he walks through has it's own project. For example, you will notice that there is a project titled "ReplaceConstructorsWithCreationMethods". This project corresponds to code he offers up on p. 57 in his section titled "Replace Constructors with Creation Methods"

IntialCode folder

You will also notice that within the "ReplaceConstructorsWithCreationMethods" there is a folder titled "InitialCode". This folder is intended to contain working code that demonstrates the problem as he initially presents it in the book.

MyWork folder

There is also a folder titled "MyWork". This folder initially carries an exact copy of what's in the "InitialCode" folder. However, the intention of the "MyWork" folder is that it is a place for you to experiment with in implementing the refactoring. In this way, once you have implemented the refactoring, you have the ability to look at both the initial problem and the refactored solution and weigh the benefits of one pattern (or lack thereof) and the code refactored to or towards a pattern.

RefactoringToPatterns.Tests Project

This project also contains sections for each refactoring, but it differs from what I meantioned before in that it has unit tests that in some way excercise the code found in the implemented code project.

For example, if you look in the RefactoringToPatterns.Tests project you will see a section for "ReplaceConstructorsWithCreationMethods". This should sound familiar as I mentioned it before. This section of the tests project also has an "InitialCode" section and a "MyWork" section. Each of these sections contains unit tests linking out to the actual implmentations. Like before, your "MyWork" section is a place for you to experiment with as you move through the refactoring as it's discussed in the book.

Conclusion

Take a look around. If anything doesn't make sense once you peek at it, please just create an Issue here in GitHub where we can discuss it. Like any system, if you want to understand how it works, go look at the tests as they are a great durrable source of low level documentation.

On a Personal Note

I've put all of my work on a branch with my name on it corywheeler. There you'll see the refactorings implemented such that the MyWork folders will differ from the Initial Code folders so you can see the solution in before and after states.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].