My Stuff

2010 Conferences

OSGi DevCon @ JAX London

February 23 - Keynote titled OSGi in the Enterprise: Agility, Modularity, and Architecture’s Paradox

EclipseCon

March 22 - 25 - Tutorial on Modular Architecture

Über Conf

June 14 - 17 - Sessions titled Turtles and Architecture and Patterns of Modular Architecture

Catalyst

July 26 - 30 - Two sessions on rich mobile applications and one on agile development. Half day tutorial on software process improvement.

Tweets @ Twitter

re: #apple event "We sold more iPads than any PC manufacturer sold of their entire PC line." 2012-09-12

re: #Apple Event ""Our notebooks now rank #1 in the US in Market share in the last three months." 2012-09-12

Right on. I just won a Best Buy drawing worth $1000. Either that or I won a shiny new virus by clicking the link. Hmm...what to do. 2012-08-29

The #osgi alliance response (http://t.co/KrN8XNWg) to the @mreinhold #jigsaw announcement (http://t.co/9YvcDdqC). 2012-08-29

Good Q&A with @mreinhold on project #jigsaw. http://t.co/9YvcDdqC. Modularity will change the way we design and run apps! 2012-08-28

LinkedIn Profile

The opinions expressed on this site are my own, and not necessarily those of my employer.

Modularity by Example

Filed Under Agile, Architecture & Design, Java, OSGi |  

There are lots of benefits to modularity, some of which I discussed when introducing modularity patterns. But here’s a simple example, which serves as a prelude to some upcoming posts explaining a few of the patterns.

In the diagram at right (click to enlarge), the top left quadrant shows a sample system with a relatively complex class structure. When change occurs within a single class, shown in red in the bottom left quadrant, understanding the impact of change is difficult. It appears possible that it can propagate to any class dependent on the class highlighted in red.  Assessing the impact of change requires that we analyze the complete class structure. The ripple effect appears significant, and change instills fear.

But if the system is modular with classes allocated to these modules, as shown in the bottom right quadrant, then understanding the impact of change can be isolated to a discrete set of modules. And this makes it much easier to identify which modules contain classes that might also change, as shown in the top right quadrant. Change is isolated to classes within modules that are dependent on the module containing the class that is changing.

This is a simple example, but it serves as evidence of the need for modular architecture, and illustrates one reason why modularity is so important. Modularity makes understanding the system easier. It makes maintaining the system easier. And it makes reusing system modules much more likely. As systems grow in size and complexity, it’s imperative that we design more modular software. That means we need a module system for the Java platform. It means that module system shouldn’t be shielded from enterprise developers. And it means we need to understand the patterns that are going to provide the guidance necessary in helping us design more modular software.

Comments

13 Responses to “Modularity by Example”

  1. Thomas Hansen on August 14th, 2009 11:14 am

    Howdy, you might have some interest in looking at the Lego Software Process found at; http://legosoftwareprocess.org/ - which describes a collection of patterns and practices that tries to achieve just what your goal seems to be…

  2. Dew Drop – August 14, 2009 | Alvin Ashcraft's Morning Dew on August 14th, 2009 1:09 pm

    [...] Modularity by Example (Kirk Knoernschild) [...]

  3. Modularity Pattern - Manage Relationships : Software & Technology @kirkk.com on September 2nd, 2009 3:32 pm

    [...] to a specific set of modules, which is not something easily done at the class level. I provided an example of this in a previous post. In the example above, changes to the client module clearly indicate that the impact of change is [...]

  4. Modularity & Architecture : Software & Technology @kirkk.com on September 16th, 2009 4:37 pm

    [...] I illustrate this using the simple diagram at right, and it’s what I was referring to in the Eliminate Architecture post when I stated that modularity, in conjunction with design patterns and SOLID principles, represent our best hope to minimize the impact and cost of change. It’s easier to change a design embedded within a module than it is a design that spans modules. I provided a similar example in Modularity by Example. [...]

  5. John O'Hanley on September 17th, 2009 10:32 am

    The idea of package-by-feature is closely related to what you are discussing:

    http://www.javapractices.com/topic/TopicAction.do?Id=205

  6. Agile Architecture, Lean Principles : Software & Technology @kirkk.com on September 22nd, 2009 7:46 pm

    [...] to understand where we need the flexibility. My posts titled Modularity & Architecture and Modularity by Example show visual examples comparing designs that are isolated and insulated to designs that span the [...]

  7. The Use/Reuse Paradox : Software & Technology @kirkk.com on October 7th, 2009 5:08 pm

    [...] Modularity by Example - A simple visual example illustrating the benefits of modularity. [...]

  8. OSGi Adoption Increasing? : Software & Technology @kirkk.com on November 10th, 2009 7:32 pm

    [...] of overall Java jobs, it’s refreshing to see that folks recognize the benefits of modularity (here’s an example). I can only expect that this graph will continue to trend upward over the next several [...]

  9. Architecture All the Way Down : Software & Technology @kirkk.com on December 15th, 2009 4:42 pm

    [...] the service is composed of modules, it’s going to be much easier for me to understand the structure of the service, assess the impact of what’s it’s going to cost to change the service, [...]

  10. OSGi: Complexity is NOT the Problem : Software & Technology @kirkk.com on April 15th, 2010 6:40 pm

    [...] Modularity by Example - A simple visual example illustrating the benefits of modularity. [...]

  11. Farewell Blog, Hello POMA : Software & Technology @kirkk.com on May 7th, 2010 5:20 pm

    [...] and OSGi. From conceptual posts that discuss the important architectural benefits of modularity to simple examples that illustrate the benefit. From the beginning to the end, I’ve written about the benefits of modular architecture at a [...]

  12. Modularity and SOA : Modular Architecture on September 7th, 2010 6:54 pm

    [...] the service is composed of modules, it’s going to be much easier for me to understand the structure of the service, assess the impact of what’s it’s going to cost to change the service, [...]

  13. nike swoosh shoes on February 12th, 2014 3:23 am

    nike swoosh shoes…

    Modularity by Example : Software & Technology @kirkk.com…

Leave a Reply