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

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

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 how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

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

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

{{ parent.tldr }}

{{ parent.urlSource.name }}