Composition

Composition over Inheritance: Part 1

Reading Time: 4 minutes Inheritance Inheritance happens to be one of the prime features of the Java language and is one of the key requirements for Object-Oriented Programming. It provides a lot of help in reducing code repetition, helps in designing the application and whatnot. However, for the best use of this feature, we must also know when we shall avoid using it. Just like any other feature of Continue Reading

monads

ScalaFP: Welcome To The World Of Functors

Reading Time: 4 minutes In functional programming, we have various pillars like Functors, Monads, Applicative and more. Today we will try to explore one of these pillars called Functors. First let’s explore function composition: Function Composition:  In this diagram, we have 3 sets called A, B, and C. Set A contains an element called x. Suppose, we need to convert our Set A elements into Set C. But we have no Continue Reading

Knolx: The Hidden Mystery Behind Scala Functional Programming

Reading Time: < 1 minute Hello everyone, Knoldus organized a session on 25th January 2018. The topic was “The Hidden Mystery Behind Scala Functional Programming”. Many people attended and enjoyed the session. In this blog post, I am going to share the slides & video of the session. Slides:

Dependency Injection In Scala using Self Type Annotations

Reading Time: 5 minutes Dependency injection is a software design pattern that allows removing hard-coded dependencies and making it possible to change them, whether at run-time or compile-time. Dependency Injection has three kind of software components 1. Dependent or Consumer : Describe what software components, it depends on . 2. Dependencies on which consumer depends 3. Injector also known as provider : Decides what concrete classes satisfy the requirements Continue Reading