u/eccentric_jin r/Clojure • Recommends
Bottom Up vs Top Down Design in Clojure - Mark Bastian
111K subscribers • 158 videos on Hallway
- Recommended by 8 people: 5 on Hacker News, 1 on Lobsters, 1 in engineering communities and 1 curated list.
- A classic. People kept recommending it from 2016 to 2021.
- Presented by Mark Bastian
- An opinion. It argues one side of a question engineers disagree on.
Intermediate. Assumes working knowledge.
29K views10 years ago8 recommendations
Software designProgramming languagesFunctional programmingDesign patternsSoftware architecture
Mark Bastian contrasts top-down object-oriented design with bottom-up, data-oriented design in Clojure by modeling a board game.
The standard approach to developing a program or API in Object Oriented Programming is to take a "Top Down" approach in which the modeler starts with the domain at large and decomposes this domain into smaller pieces, generally in the form of classes. This often results in complex, interconnected type hierarchies. In Clojure, the standard approach is to design "Bottom Up," in which the developer first models an actual domain instance using Clojure data structures and then writes simple functions for manipulating the domain data. These functions can then be recombined and composed into more powerful functions. Ultimately, a program emerges. This approach has several advantages including: 1) bottom up functions have more reuse, 2) bottom up design allows for immediate domain modeling using actual data, 3) it is easier to reason about what is going on in bottom up design. This talk will first describe the two approaches, then it will walk through the development of a program using bottom up design in Clojure, culminating in a live demonstration of the program. Attendees will gain an appreciation for this technique and see it in action. In particular, they will see how Clojure is especially well suited to this approach. About the speaker: Mark Bastian has been developing applications in the Java ecosystem for over 10 years. He started doing Scala and Functional Programming over 5 years ago and has been programming in Clojure personally and professionally for over a year. He is a programming languages and paradigms enthusiast and loves finding and evangelizing the best practices from all the languages and paradigms he encounters. In his spare time he blogs about Clojure and Functional Programming at fn-code.blogspot.com.Why it's here
8 people recommend thisWhat people say. Highly recommended for its clear contrast between traditional OOP class hierarchies and functional, data-oriented modeling.
Moments people linked to
lewisl9029on Hacker News • Recommends
On “A Database Model for Simple Board Games”
lewisl9029on Hacker News • Recommends
On “How I Learned to Stop Worrying and Love the State Machine”
bederson Hacker News • Recommends
On “Show HN: Tetris Implemented in ClojureScript”
robtoon Hacker News • Recommends
On “Making a Lego Domino Machine [video]”
programming-talkscurated list on GitHubRecommends
Under “Clojure”
lewisl9029on Hacker News • Recommends
On “Ask HN: Why don't more web projects start with a JVM stack?”
cygnedon Hacker News • Recommends
On “Modern Software Over-Engineering Mistakes”
abc_lisperon Hacker News • Recommends
On “Making the move from Scala to Go”
u/MalloZupin r/Clojure • Mentions
u/kontravariantin r/Clojure • Mentions
On “I'm looking for a YouTube video of a talk about making a board game with Clojure”
u/jaen-ni-rinin r/Clojure • Mentions
On “New Clojurians: Ask Anything”
u/jschmin r/Clojure • Mentions
On “Are "world-state" parameters a code smell in Clojure?”
u/klujerin r/Clojure • Mentions
On “How do you deal with state? Is it best to just keep passing to and receiving from all functions?”
u/brad_radberryin r/Clojure • Mentions
On “How to convert code from imperative to functional?”