As Object Oriented programmers, we follow SOLID Design Principles for improving OO design of our applications.

If you take the SOLID principles to their extremes, you arrive at something that makes Functional Programming look quite attractive.

Objects are merely a poor man's closures. And ultimately Closures are a poor man's objects.

This talk explains about how applying SOLID Design principles like Single Responsibility Principle (SRP) leads to many small classes. Furthermore, if you rigorously apply the Interface Segregation Principle (ISP), you'll eventually arrive at the ultimate Role Interface: an interface with a single method.

If you apply the SRP and ISP like that, you're likely to evolve a code base with many fine-grained classes that each have a single method.

Objects are data with behaviour. Closures are too are data with behaviour.

This talk will enlighten how applying Object Oriented Design Principles to their extreme will lead you to Functional Programming.

It's necessary for Object Oriented programmer to understand why Functional programming makes sense.

At the end, this talk will also cover essential basics of Functional programming needed to be known for every Object Oriented Programmer.

 
 

Outline/Structure of the Talk

This talk will take a sample code example written with Object oriented design.

Then it will apply Single Responsibilty Principle (SRP) and Interface Segragation Principles (ISP) to their extremes.

It will prove how objects are similar to closures. Also prove closures are objects.

At last, it will cover basics of functional programming necessary to be known for any Object Oriented programmer.

 

 

Learning Outcome

This talk will help Object Oriented Programmers to get into Functional programming. It will also enlighten why Functional programming matters 

Target Audience

Developers who daily write Object Oriented Code and are interested to learn Functional programming.

schedule Submitted 5 years ago

Public Feedback

comment Suggest improvements to the Speaker
  • Naresh Jain
    By Naresh Jain  ~  5 years ago
    reply Reply

    Hi Anil, thanks for submitting this proposal. I must admit, that I'm intrigued by the topic. I'm not sure if I would agree with you on the following statement:

    This talk explains about how applying SOLID Design principles like Single Responsibility Principle (SRP) leads to many small classes. Furthermore, if you rigorously apply the Interface Segregation Principle (ISP), you'll eventually arrive at the ultimate Role Interface: an interface with a single method.

    Can you please point me to an example that will help me understand this perspective better?

    Thank you.

    • Anil Wadghule
      By Anil Wadghule  ~  5 years ago
      reply Reply

      Hi Naresh,

      Nice to know that you got intrigued by the topic. You can check this great post by Mark Seemann http://bit.ly/solid-the-next-step-functional-post My talk will be along the same lines. I will mostly use Ruby/Java programming language to evolve OO code to functional style code.

      Hope that answers your question. Thanks.

      • Naresh Jain
        By Naresh Jain  ~  5 years ago
        reply Reply

        Thanks for the prompt response. I'm curious to know your personal experience/example. Thanks.

        • Anil Wadghule
          By Anil Wadghule  ~  5 years ago
          reply Reply

          Hi Naresh,

          Gist link shows a simple example how applying SRP and ISP principles converts a OO code to functional style code. 

          https://gist.github.com/anildigital/1f3fbb90ac630c802bad

          In first file, I have used Java, in second file, example uses role interfaces with single method, third, fourth and fifth shows how it evolves to functional style and used Scala for these files.

          I hope this example helps you to understand the perspective better.