All Projects → josephguan → scala-design-patterns

josephguan / scala-design-patterns

Licence: Apache-2.0 license
Design patterns implemented in Scala.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to scala-design-patterns

oh-my-design-patterns
🎨 Record the articles and code I wrote while learning design patterns
Stars: ✭ 33 (-75.56%)
Mutual labels:  design-patterns
clean architecture typescript example
This repository provides an implementation (or at least an attempt) of Uncle Bob's Clean Architecture with Typescript.
Stars: ✭ 78 (-42.22%)
Mutual labels:  design-patterns
JS-design-pattern
根据曾探所著《JavaScript设计模式与开发实践》整理的学习笔记
Stars: ✭ 31 (-77.04%)
Mutual labels:  design-patterns
design-patterns-typescript
Nessa seção falamos sobre 22 (de 23) padrões de projeto da GoF. Todos descritos em vídeo, com teoria e prática + exemplos de código.
Stars: ✭ 257 (+90.37%)
Mutual labels:  design-patterns
young-examples
java学习和项目中一些典型的应用场景样例代码
Stars: ✭ 21 (-84.44%)
Mutual labels:  design-patterns
Dermayon
Dermayon is Library for supporting build large application,distributed application, scalable, microservices, cqrs, event sourcing, including generic ef repository pattern with unit of work, generic mongo repository pattern with unit of work, kafka, etc
Stars: ✭ 66 (-51.11%)
Mutual labels:  design-patterns
CloudDesignPatterns
Welcome to the GitHub repository of the cloud design patterns. This repository contains the examples for the Pluralsight course series: Cloud Design Patterns for Azure. You can download a copy and follow along in the course.
Stars: ✭ 96 (-28.89%)
Mutual labels:  design-patterns
Swan
Topology Optimization Laboratory
Stars: ✭ 55 (-59.26%)
Mutual labels:  design-patterns
csharp-design-patterns-for-humans
Design Patterns for Humans™ - An ultra-simplified explanation - C# Examples
Stars: ✭ 1,086 (+704.44%)
Mutual labels:  design-patterns
DataStructure-DesignPattern
java集合源码、设计模式、常用算法、Mysql原理
Stars: ✭ 22 (-83.7%)
Mutual labels:  design-patterns
moon-design
Moon Design System for React
Stars: ✭ 209 (+54.81%)
Mutual labels:  design-patterns
ABAP-Library
Useful ABAP code snippets
Stars: ✭ 118 (-12.59%)
Mutual labels:  design-patterns
design-patterns
设计模式,经典样例
Stars: ✭ 35 (-74.07%)
Mutual labels:  design-patterns
Design-Patterns
Project for learning and discuss about design patterns
Stars: ✭ 16 (-88.15%)
Mutual labels:  design-patterns
gof design patterns
GoF Design Patterns implemented in modern C++.
Stars: ✭ 21 (-84.44%)
Mutual labels:  design-patterns
generic-for-core
🏗️ Generic Repository & UOW Pattern For ASP.NET Core
Stars: ✭ 55 (-59.26%)
Mutual labels:  design-patterns
data sciences campaign
【数据科学家系列课程】
Stars: ✭ 91 (-32.59%)
Mutual labels:  design-patterns
BasicExercises
📘 Personal basic practice test playground.
Stars: ✭ 84 (-37.78%)
Mutual labels:  design-patterns
Notes
My notes are about everything related to programming.
Stars: ✭ 104 (-22.96%)
Mutual labels:  design-patterns
design-patterns-cookbook
Design Patterns in simple words with examples on PHP
Stars: ✭ 26 (-80.74%)
Mutual labels:  design-patterns

Design patterns implemented in Scala

Inspired by Design patterns implemented in Java

Introduction

Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system. The classical design patterns are the 23 design patterns by GoF.

This project implements dozens of design patterns in Scala. The Scala language has several advanced features which make the implementations are different from other programming languages.

Design patterns are categorized into:

  1. Creational
  2. Structural
  3. Behavioral
  4. Other
  5. Persistence

For each design pattern, it tags:

  1. scala features indicates if the implementation uses scala language-specific features.
  2. functional indicates if the design pattern can be implemented in functional-programming style.
  3. Gang of four indicates if the design pattern is one of the classical 23 design patterns by GoF

Creational

Name scala features functional Gang of four
abstract factory no no yes
builder no no yes
cake yes(trait mix-in) no no
factory kit no yes no
factory method no no yes
prototype no no yes
simple factory yes(companion object) no no
singleton yes(object) no yes
value object yes(case class) no no

Structural

Name scala features functional Gang of four
adapter yes(implicit class) no yes
bridge no no yes
composite no no yes
decorator yes(stackable trait) no yes
facade no no yes
flyweight no no yes
magnet yes(implicit conversion) no no
proxy no no yes
type classes yes(impilict parameter) no no

Behavioral

Name scala features functional Gang of four
chain of responsibility yes(partial function) yes yes
command no yes yes
loan yes(structural type) yes no
mediator no no yes
memento no no yes
observer no no yes
state no no yes
strategy no yes yes
template method no no yes
visitor no yes yes

Other

Name scala features functional Gang of four
selfless trait yes(companion trait) no no
monad no yes no

Persistence

Name scala features functional Gang of four
data access object no no no
repository no no no

Getting Started

Run sbt assembly to compile, run tests and package all sub-projects.

If you want to operate specific sub-project, use project command in sbt shell to switch sub-project:

> projects          // list all sub-projects
> project builder   // switch to 'builder' sub-project
> project all       // switch to 'all' project which including all sub-projects

License

This project is licensed under the terms of the Apache 2.0 license.

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