Is this the way you build out a real-world codebase?

Posted by throwaway0134hdj@reddit | ExperiencedDevs | View on Reddit | 19 comments

Assume you are the sole developer and you’ve gathered all requirements from the client.

Starting from the ground up - all code is composed of some combination of variables, loops, conditions.

The meaningful combination of those variables, loops, and conditions we bundled up as a reusable function - a chunk of logic that can be called later in our codebase.

As things evolve, we might run into a situation where we need multiple occurrences of the some “thing” or “entity” (bank accounts, users, orders, abstract concepts) then you want to bundle that up as a class with self-contained state and methods. Here we can basically copy and paste the same entity indefinitely with custom state but with access to the same methods/behaviors.

We hook up a database and ORM to map out all the states and interactions of those objects.

Is this essentially how real-world codebases/apps are developed out?