Mario Fusco | Devoxx

Mario Fusco
Mario Fusco Twitter

From Red Hat

...Mario is a senior software engineer at Red Hat working at the development of the core of Drools, the JBoss rule engine. He has a huge experience as Java developer having been involved in (and often leading) many enterprise level projects in several industries ranging from media companies to the financial sector. Among his interests there are also functional programming and Domain Specific Languages. By leveraging these 2 passions he created the open source library lambdaj with the purposes of providing an internal Java DSL for manipulating collections and allowing a bit of functional programming in Java. He is also a Java Champion and the co-author of "Java 8 in Action" published by Manning.

java Java Language

g ∘ f patterns

Conference

The book of design patterns known as Gang of Four has been a kind of Bible for all the developers of my generation. Its main pro has been giving us a common vocabulary: when a programmer says "here I used a strategy pattern" all colleagues know of what he is speaking about. Nevertheless the biggest issue with this is that almost all patterns listed in that book, especially the behavioural ones, are a only workaround for a missing abstraction: higher order functions. The introduction of lambda expressions in Java 8 finally allows all Java developers to remove this no longer necessary and cumbersome object oriented infrastructure from their code. The purpose of this talk is showing, through a series of live coding examples, how the most common GoF patterns can be rethought and reimplemented in a simpler and more concise functional way leveraging Java 8 lambdas.

Speaker Q&A


Who should attend your session?

Any developer with a strong object oriented programming background who wants to enrich their programming skills by learning some more functional paradigms.


What are the 'next steps' for an attendee to take after attending your session?

As I said, the main reason to attend my talk is to learn a bit more about functional programming which, despite the introduction of lambdas in Java 8, is still not a common skill for Java developers. Then I believe that the next natural steps would be to keep studying functional programming by buying a specific book on this topic or taking an online course.


What is your favourite British food/ drink?

I'm not a British food expert, but fish and chips is always a very welcome.


What is the most common Gang of Four pattern?

The biggest part of Gang of Four patterns are still widely in use, but in my experience the 2 most commonly (ab)used ones are the Command and the Strategy patterns. During my session I'll show how lambdas make their implementation far less verbose and almost trivial.


Is it possible to implement all of the patterns effectively in Java?

I think I'll answer to this question during my talk. Stay tuned? :)