Home > technical > Slice By Slice Over Layer By Layer

Slice By Slice Over Layer By Layer

Assume that your team was tasked with developing a large software system in any application domain of your choice. Also, assume that in order to manage the functional complexity of the system, your team iteratively applied the “separation of concerns” heuristic during the design process and settled on a cleanly layered system as such:

Three Layers

So, how are you gonna manifest your elegant paper design as a working system running on real, tangible hardware? Should you build it from the bottom up like you make a cake, one layer at a time?

Layer By Layer

Or, should you build it like you eat a cake, one slice at a time?

Slice By Slice

The problem with growing the system layer-by-layer is that you can end up developing functionality in a lower layer that may not ever be needed in the higher layers (an error of commission). You may also miss coding up some lower layer functionality that is indeed required by higher layers because you didn’t know it was needed during the upfront design phase (an error of omission). By employing the incremental slice-by-slice method, you’ll mitigate these commission/omission errors and you’ll have a partially working system at the end of each development step – instead of waiting until layers 1 and 2 are solid enough to start adding layer 3 domain functionality into the mix.

In the context of organizational growth, Russell Ackoff once stated something like: “it is better to grow horizontally than vertically“. Applying Russ’s wisdom to the growth of a large software system:

It’s better to grow a software system horizontally, one slice at a time, than vertically, one layer at a time.

The above quote is not some profound, original, BD00 quote. It’s been stated over and over again by multitudes of smart people over the years. BD00 just put his own spin on it.

  1. Dick Danjin
    December 5, 2014 at 7:39 am

    Quality Function Deployment QFD ?

    • December 5, 2014 at 7:45 am

      That could be one way of defining the content of each slice and determining the ordering of slices. Use cases, user stories, “shalls” may be others.

  2. December 24, 2014 at 6:24 am

    I think you may have reversed the meaning of horizontal in your last equivocation. I’m not a strong believer in there being extra features in a domain specific API. Some people know more about a domain and will implement more features without being asked to. That it’s not to say that those features are excess because they are not needed for the specific vertical application’s domain. Slice by slice is an addition to horizontal building. Vertical slice by slice is early integration via agile methods where tests and requirements are developed in tandem across layers with domain specific requirements (read business requirements) driving the design and priority of features. IMHO The only thing you have to watch out for its inappropriate developer pushback. Where at any given time in the project one or many developers may be pushing inappropriate feature requests back to another layer to make the development easier or vice versa poorly thought out API that not only don’t provide the data but require extra wrangling to make the API usable. And then there it’s always the over done API or implementation that resists optimization. When it’s clearly doing many things wrong to require that much execution time, memory, disk space, etc. A good rule of thumb for optimization is to find the code that is handling one row at a time when the API let’s multiple rows to be passed in.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: