Skip to main content
EnglishEnglish
Digital Skills and Jobs Platform

Refactoring.Guru: A Free Guide to Design Patterns and Code Refactoring

Software design patterns and refactoring are explained on Refactoring.Guru, a free learning website with illustrated guides, code examples and a catalogue of 22 classic design patterns.

Refactoring.guru is an online learning platform for software developers, with offices in Ukraine and Spain. Through explanations, illustrations and code examples, it presents 22 classic design patterns that developers working with object-oriented programming (OOP) can turn to when they face a design problem.

Developers who run into a design problem are rarely the first to do so. Design patterns collect typical solutions to problems that come up again and again, so that developers do not have to start from scratch.

What is refactoring?

Refactoring is the systematic process of improving existing code without adding new functionality. Its aim is to turn messy code into clean code with a simple design, which makes it easier for colleagues to understand and to maintain. The website also has a section on “code smells” (signs that code may need improvement) and on refactoring techniques, which are organised in six groups.

What are design patterns?

Design patterns are typical solutions to common problems in software design. They work like blueprints rather than ready-made code: a pattern cannot be copied directly into a program, because it is a general concept for solving a certain kind of problem. Developers follow its description and adapt the solution to their own program. Unlike an algorithm, which defines an exact sequence of steps, a pattern describes a solution at a higher level, so the code can differ from one program to another.

What can you find on the website?

The website’s catalogue of design patterns groups the 22 patterns into three categories: five creational patterns (on how objects are created), seven structural patterns (on how objects and classes are assembled into larger structures) and ten behavioural patterns (on algorithms and the assignment of responsibilities between objects).

Each pattern has its own page. On the Factory Method page, for example, the pattern is presented through its intent, the problem it addresses and the proposed solution, followed by a diagram of its structure and a pseudocode example. The page also covers when to use the pattern, how to implement it step by step, its advantages and drawbacks, and its relations with other patterns. Code examples are available in languages including C#, C++, Go, Java, PHP, Python, Ruby, Rust, Swift and TypeScript.

The website is free to read and available in ten languages, including Spanish, French, Polish and Ukrainian. Its authors also offer paid premium content, such as an eBook on design patterns and a refactoring course, which are not promoted here.

Methodology

Refactoring.Guru presents refactoring and software design patterns through explanatory articles, illustrations, diagrams and code examples. Its catalogue organises 22 classic design patterns into three categories (creational, structural and behavioural). Pattern pages, such as the one on Factory Method, follow a consistent structure: intent, problem, solution, structure, pseudocode, applicability, implementation steps, advantages and drawbacks, and relations with other patterns, with code examples available in several programming languages. The refactoring section describes “code smells” and refactoring techniques, which are organised in groups. The website is free to read, while an eBook and a refactoring course are offered as paid premium content.

Additional information

Target audience
Digital skills for ICT professionals and other digital experts.
Geographic scope - Country
Denmark
Albania
Austria
Belgium
Target language
Danish
English

Digital technologies

Skill levels