All Projects → ostera → Reason Design Patterns

ostera / Reason Design Patterns

🗺 An unofficial collection of "design patterns" for Reason and OCaml

Programming Languages

ocaml
1615 projects
reason
219 projects

Projects that are alternatives of or similar to Reason Design Patterns

Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (-68.34%)
Mutual labels:  patterns, design-patterns
Node.js Design Patterns Third Edition
Node.js Design Patterns Third Edition, published by Packt
Stars: ✭ 239 (-36.94%)
Mutual labels:  patterns, design-patterns
Designpatternsincsharp
Samples associated with Pluralsight design patterns in c# courses.
Stars: ✭ 149 (-60.69%)
Mutual labels:  patterns, design-patterns
Patterns Demos
Examples of Design Patterns in Java
Stars: ✭ 67 (-82.32%)
Mutual labels:  patterns, design-patterns
notes
My personal tutorials and notes.
Stars: ✭ 34 (-91.03%)
Mutual labels:  patterns, design-patterns
Designpatterns
DesignPatterns samples by csharp on dotnetcore 《大话设计模式》 中设计模式总结/C#(.NETCore)代码
Stars: ✭ 73 (-80.74%)
Mutual labels:  patterns, design-patterns
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-41.69%)
Mutual labels:  patterns, design-patterns
Cloud Design Patterns
Prescriptive Architecture Guidance for Cloud Applications
Stars: ✭ 484 (+27.7%)
Mutual labels:  patterns, design-patterns
Java-Programs
Java Practiced Problems including concepts of OOPS, Interface, String , Collection.
Stars: ✭ 51 (-86.54%)
Mutual labels:  patterns, design-patterns
Nodejs-Design-Pattern
Resumen de patrones de diseño extraídos de mi lectura del libro "Node.js Design Patterns de Mario Casciaro 1ra edición"
Stars: ✭ 45 (-88.13%)
Mutual labels:  patterns, design-patterns
Go Pattern Examples
Examples of implement for awesome go patterns including usual design patterns, in easy understanding examples.
Stars: ✭ 65 (-82.85%)
Mutual labels:  patterns, design-patterns
go-design-pattern
go的设计模式实例
Stars: ✭ 45 (-88.13%)
Mutual labels:  patterns, design-patterns
Guardclauses
A simple package with guard clause extensions.
Stars: ✭ 767 (+102.37%)
Mutual labels:  patterns, design-patterns
React Recipes
React Recipes & Patterns.
Stars: ✭ 86 (-77.31%)
Mutual labels:  patterns, recipes
Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: ✭ 485 (+27.97%)
Mutual labels:  patterns, design-patterns
Reactpatterns
React patterns & techniques to use in development for React Developer ⚛ .
Stars: ✭ 201 (-46.97%)
Mutual labels:  patterns, design-patterns
Go Patterns
Design patterns for the Go programming language
Stars: ✭ 432 (+13.98%)
Mutual labels:  patterns, design-patterns
Go Patterns
Curated list of Go design patterns, recipes and idioms
Stars: ✭ 17,827 (+4603.69%)
Mutual labels:  patterns, design-patterns
goodcode
A curated collection of annotated code examples from prominent open-source projects
Stars: ✭ 184 (-51.45%)
Mutual labels:  patterns, design-patterns
software-design-pattern
Software design pattern
Stars: ✭ 43 (-88.65%)
Mutual labels:  patterns, design-patterns

🗺 Reason Design Patterns

An unofficial collection of "Design Patterns" collected from learning, experimenting, and working with Reason and OCaml.

These "patterns" have worked well for me, but, since experience is subjective, YMMV. They are not infallible, they are 100% not something I invented (but merely rediscovered), and if you have any input please send PRs!

If you've found this content useful, consider becoming a Patron with the link above.

Project Layout

  1. Yawaramin's Modular Project Structure

Working with Types

Whether you are modeling TODO lists or mission-critical stuff, these patterns should help you build types that are safe to use, refactor, and evolve.

  1. Smart Constructors, to give your types additional refinements that can only be done at runtime
  2. Constructor + View, to keep your types abstract without losing pattern-matching

Domain Modeling

If your code says too much about how things are done, fights records and variants, or is plagued by empty lists and booleans that mean special things, take a look at these:

  1. Boolean Blindness
  2. "Pretend" Modules

Module Design

When you are writing modules and libraries, it's foundational to get some things right. A stable interface that leaks no implementation details, good containment of concerns, and the right amount of flexibility are some of the things to consider.

Find below some patterns to help you write modules:

  1. Interface First
  2. "Pretend" Modules
  3. 1 Module for 1 Thing
  4. Interpreter Pattern
  5. 100-Named-Args Functions
  6. Private Types

Error Handling that Scales

  1. PolyVariant Error Propagation
  2. Rresult's Guide to Custom Error Types

Examples

  1. smart_constructors
  2. constructor-views
  3. boolean-blindness
  4. providing-evidence
  5. interface-first
  6. pretend_modules
  7. interface-first
  8. one-module-one-thing
  9. 100-named-args-functions
  10. private-types
  11. Interpreter Pattern

To run examples:

npm install
npm start
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].