Friday, 20 May 2016

Introduction to Scala Functional Design Patterns



Introduction

In this post, I'm going to introduce some basics about Scala Functional Design patterns. We will pick-up each design pattern and discuss it in-detail with some useful examples in my coming posts.

As a Java Developer, we have already developed many Standalone, Mobile, Web and Enterprise applications using Design Patterns.

As we know, Core Java design patterns fall into 3 major categories:


  • Creational  Design Patterns
  • Structural Design Patterns
  • Behavioural Design Pattern


Apart from these design patterns, we have some Java EE, Enterprise Integration Design Patterns, Functional Design Patterns etc

Now we are going to discuss about new style of programming Design Patterns: FP (Functional Programming).

Scala Functional Design Patterns

Scala is an hybrid programming language: Both OOP and FP. It follows many Core Java Design Patterns and also supports Functional Design Patterns.

Functional Design Patterns are useful to develop highly Scalable, Highly Available, Highly Concurrent and Highly Performance applications.

The following are the Popular Scala Functional design patterns:

  • Memoization
  • Monoids
  • Monads
  • Functors
  • Stackable Traits Design Pattern
  • Lens Design Pattern
  • Cake Design Pattern
  • Lazy evaluation
Some Functional Design Patters which are also fall under Software or OOP Design Patterns:

  • Option/Some/None Design Pattern
  • Either/Right/Left Design Pattern
  • Try/Success/Failure Design Pattern


Thank you for reading my posts. 
Please drop me your valuable suggestions or comments.