Try Modeling Behavior, Rather Than Data

Wasn’t that the original idea behind object-oriented programming, anyway?

Dave Taubler
Level Up Coding
Published in
12 min readDec 14, 2023

--

Photo by Kdwk Leung on Unsplash

When writing object-oriented (OO) code, we often find ourselves modeling data. That is to say, we create data classes: classes that contain some number of fields, each of which represents a piece of data. Importantly, these data classes contain little to no business logic…

--

--