All Projects → RefactoringGuru → Design Patterns Java

RefactoringGuru / Design Patterns Java

Licence: other
Design Pattern Examples in Java

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Design Patterns Java

js-training
JS Training Course
Stars: ✭ 39 (-86.51%)
Mutual labels:  design-patterns
Go Design Pattern
golang design pattern go 设计模式实现,包含 23 种常见的设计模式实现,同时这也是极客时间-设计模式之美 的笔记
Stars: ✭ 253 (-12.46%)
Mutual labels:  design-patterns
Php design patterns
PHP设计模式的使用
Stars: ✭ 273 (-5.54%)
Mutual labels:  design-patterns
DoFactorydotNetDesignPattern
http://www.dofactory.com/net/design-patterns
Stars: ✭ 17 (-94.12%)
Mutual labels:  design-patterns
Design
🎨 Everything Design related in OSCA
Stars: ✭ 23 (-92.04%)
Mutual labels:  design-patterns
Design Patterns Js
All the 23 (GoF) design patterns implemented in Javascript
Stars: ✭ 3,026 (+947.06%)
Mutual labels:  design-patterns
CSharpDesignPatterns
Examples of design patterns, using C# code.
Stars: ✭ 84 (-70.93%)
Mutual labels:  design-patterns
Django Service Objects
Service objects for Django
Stars: ✭ 289 (+0%)
Mutual labels:  design-patterns
software-design-pattern
Software design pattern
Stars: ✭ 43 (-85.12%)
Mutual labels:  design-patterns
Javascript Patterns
A collection of javascript algorithms, patterns, and techniques
Stars: ✭ 273 (-5.54%)
Mutual labels:  design-patterns
Software-Design
No description or website provided.
Stars: ✭ 23 (-92.04%)
Mutual labels:  design-patterns
common
常用的模式、方法、算法。Common patterns and methods.
Stars: ✭ 59 (-79.58%)
Mutual labels:  design-patterns
Examplesofdesignpatterns
设计模式的总结与例子(有XMind,Uml图和详细代码实现说明)
Stars: ✭ 265 (-8.3%)
Mutual labels:  design-patterns
design-patterns-for-parser-combinators
A Really Cool Calculator written in Haskell... or is it?
Stars: ✭ 29 (-89.97%)
Mutual labels:  design-patterns
Unity Programming Patterns
A collection of programming patterns in Unity with examples when to use them. These are primarily from the book "Game Programming Patterns," but translated from C++ to C#
Stars: ✭ 272 (-5.88%)
Mutual labels:  design-patterns
laravel-filters
Need some filters? This package is based on the Repository Design Pattern to let you create specific queries easily.
Stars: ✭ 19 (-93.43%)
Mutual labels:  design-patterns
Flawless Ios
Awesome iOS guides from the community, shared on Flawless iOS Medium blog 👉
Stars: ✭ 260 (-10.03%)
Mutual labels:  design-patterns
Ecsrx
A reactive take on the ECS pattern for .net game developers
Stars: ✭ 288 (-0.35%)
Mutual labels:  design-patterns
Game Programming Patterns
Source repo for the book
Stars: ✭ 3,096 (+971.28%)
Mutual labels:  design-patterns
Javascript Design Patterns
📎 ES5 + ES6 + CoffeeScript + TypeScript design patterns with some theory, real-world examples and UML diagrams
Stars: ✭ 266 (-7.96%)
Mutual labels:  design-patterns

Design Patterns in Java

This repository is part of the Refactoring.Guru project.

It contains Java examples for all classic GoF design patterns.

Requirements

The examples were written in Java 8, but also tested in Java 9.

For the best experience, we recommend working with examples in IntelliJ IDEA. The Community Edition of IDE is available for free (https://www.jetbrains.com/idea/download/).

After downloading or cloning this repository to your computer, import its root directory into a New project:

  • Either through start dialog: Select "Import Project" option and skip through the rest of the steps.

  • Or via the main menu: File > New > Project from Existing Sources...

After importing the project, you will be able to run examples by right-clicking "Demo" files inside every example and selecting the "Run" command from the context menu.

Roadmap

  • [ ] Add detailed comments all classes.
  • [ ] Add structure-only examples.

Contributor's Guide

We appreciate any help, whether it's a simple fix of a typo or a whole new example. Just make a fork, do your change and submit a pull request.

Here's a style guide which might help you to keep your changes consistent with our code:

  1. All code should meet the Google Java Style Guide

  2. Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars.

  3. Examples should match following package convention: refactoring_guru.{pattern}.{example_name}. Example:

    package refactoring_guru.factory_method.ui_example.buttons;
    
    class Button {
    ...
    
  4. Places classes into separate files.

  5. Group classes into sub-packages. It helps people to understand dependencies of a class by glancing over its imports. Example:

    package refactoring_guru.factory_method.example.buttons;
    
    class Button {
    ...
    
    package refactoring_guru.factory_method.example.factories;
    
    import Button;
    
    class Factory {
    ...
    
  6. Comments may or may not have language tags in them, such as this:

    /**
     * EN: All products families have the same varieties (MacOS/Windows).
     *
     * This is a MacOS variant of a button.
     *
     * RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows).
     *
     * Это вариант кнопки под MacOS.
     */
    

    Don't be scared and ignore the non-English part of such comments. If you want to change something in a comment like this, then do it. Even if you do it wrong, we'll tell you how to fix it during the Pull Request.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

Credits

Authors: Bohdan Herashchenko (@b1ger) and Alexander Shvets (@neochief)

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].