Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Bottom-Up Design

DZone's Guide to

Bottom-Up Design

· Java Zone
Free Resource

Learn how our document data model can map directly to how you program your app, and native database features like secondary indexes, geospatial and text search give you full access to your data. Brought to you in partnership with MongoDB.

The strangest thing I have read in the recent past (emphasis mine):

In his classic “Clean Code” Robert C. Martin describes a great (and widely adopted) way to object oriented programming. He says code should read from top to bottom like prose. Start with the most high-level concepts and break them down into lower-level pieces. Then when you work with such a source file, you may be able to more easily follow the flow and understand how it works.

I am not sure if Bob Martin actually said that, but for as long as I can remember, object-oriented programming was meant to be bottom-up design. OO design was supposed to be a relief from the top-down programming of procedural languages such as Basic and C, where you start with the problem that you need to solve and then break it into tiny pieces of functionality. In OO design, you think at the lowest level about objects that interact with each other and define properties and methods. Then you assemble them together to gain the desired functionality in your program.

The comparison here is to assembly lines. You take various components and then assemble them together to obtain the final product (car, truck or airplane). In object-oriented design, we want to gain the same advantage. Of course, the problem is that programming is not exactly like manufacturing, and traditional object-oriented languages have been found lacking. Hence continued innovation in the programming language space. We have been seeing new languages as well as dramatic improvements in existing languages (C# comes to mind).

As for the rest of the piece, there is weird stuff like “It takes some training to learn how not to write 2000-line classes and 500-line methods“. But this even violates top-down design. A 500-line method is not broken down into “lower-level pieces”. Someone who does that has no concept of code organization, reuse and maintainability. It is not an effect of OO programming, as the author seems to imply.

 

From http://www.thoughtclusters.com/2011/04/bottom-up-design/

Discover when your data grows or your application performance demands increase, MongoDB Atlas allows you to scale out your deployment with an automated sharding process that ensures zero application downtime. Brought to you in partnership with MongoDB.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}