Loading…
SATURN 2018 has ended
Welcome to the SATURN 2018 program! Be sure to create a login for Sched.com and start building your program online.
View analytic
Wednesday, May 9 • 3:00pm - 3:45pm
Refactoring to Functional Architecture Patterns

Sign up or log in to save this to your schedule and see who's attending!

Feedback form is now closed.
Last year at SATURN I spoke about ideas from the functional programming (FP) community that are relevant to software architecture. This talk is a 45-minute experience report based on applying those ideas and represents one way to marry functional programming with traditional OO design advice.

We followed a pattern we call the Rich Service layer. It is implemented as pure functions plus a modified version of what Fowler calls an Anemic Domain Model. Historically, the Transaction Script pattern has been contrasted with the Domain Model pattern, where objects have methods expressing the business logic.

Our domain model expresses strictly defined types with as little optional data as possible, not just jumbled data bags. Our domain types are as strictly defined as possible. We check integrity at the system boundary. Compared to object-oriented programming, we don’t push much behavior onto the types, which are immutable. We grew an (internal) Domain Specific Language (DSL) organically so the code reads naturally. But the DSL mainly expresses predicates on state rather than mutations. There is little business logic, which is instead in functions in the rich service layer.

See the slides.
Watch the video.

Speakers
avatar for George Fairbanks

George Fairbanks

Google
George Fairbanks is a software engineer with academic leanings. His formative years were in the object-oriented world of Smalltalk, UML, and design patterns. He received a PhD in software engineering from Carnegie Mellon University, where he learned software architecture from David... Read More →


Wednesday May 9, 2018 3:00pm - 3:45pm
Prairie A Hilton Dallas/Plano Granite Park

Attendees (25)