DEV Community

Cover image for Design Patterns & Principles in Kotlin
Devansh Maurya
Devansh Maurya

Posted on

Design Patterns & Principles in Kotlin

Here are my notes I made while reading the book Head First Design Patterns. It has full and quality implementation of every design pattern in the book with notes on different patterns and principles. The examples are written in Kotlin.

The Head First Design Pattern is a great read if you are just starting to learn design patterns.

Check out the Github repo below and do star it if you find it useful:

GitHub logo Devansh-Maurya / Design-Patterns-And-Principles

A collection of a number of design patterns and principles written in Kotlin

A collection of design patterns and principles written in Kotlin

What are Design Principles?

A design principle is a basic tool or technique that can be applied to designing or writing code to make that code more maintainable, flexible, or extensible.

Explore the Design Principles in this repo

What are Design Patterns?

A design pattern is a solution to a problem in a context.

  • The context is the situation in which the pattern applies. This should be a recurring situation.
  • The problem refers to the goal you are trying to achieve in this context, but it also refers to any constraints that occur in the context.
  • The solution is what you’re after: a general design that anyone can apply which resolves the goal and set of constraints.

If you find yourself in a context with a problem that has a goal that is affected by a set of constraints, then…

Top comments (0)