scea – decomposition strategies example – part 1

Decomposition strategies are described in the Cade & Sheil Sun Certified Architect (SCEA) study guide.  Or maybe I should say the Oracle Certified Master, Java EE 5 Enterprise Architect (OCMJEA) now.  When I read the study guide and and took SCEA part 1, I found this to be very straightforward.  Then I read a thread in the CodeRanch certification forum where two people asked for tutorials or examples.  I searched online and didn’t find anything so decided to write one.

What is decomposition?

Decomposition is taking a big thing and turning into a bunch of smaller things.  In software architecture/design, this is used in designing a system.  Suppose you have 1000 classes.  How do you separate them into projects and packages that are manageable.  Decomposition can also be thought of as organizing or categorizing.  (Thanks Scott! This is a good way to put it.)

Types of decomposition

Case & Sheil list the following types of decomposition.  It is common not to use all groups in the same system.

  1. Layering or Distribution – layering refers to layering of the system and distribution refers to distribution of resources.  While the book treats these as one category a large system may do layering within a particularly large distribution area.  For example, distribution may go by database vs application server.  Then layering may happen within the application server.
  2. Exposure, Functionality or Generality – exposure refers to black box vs white box type exposure on several levels.  Functionality is about the business domain  (and something we often think about when designing packages.)  Generality is about reuse between systems.
  3. Coupling and Cohesion or Volatility – these should be familiar to any developer.  Low coupling and high cohesion insulate packages.  And keeping the things you expect to change often away from the other things makes maintenance cheaper.
  4. Configuration – when environment/outside things change independently of other things, it makes sense to isolate them.
  5. Planning and Tracking or Work Assignment – when done with everything else, further separating by project management concerns makes sense.  Especially when teams are from different organizations.

Example

Suppose I have the following things in my sandwich shop.  We want to decompose the list in at least two passes so we have no more than 5 items in a category at the end. How you could decompose the list. What strategy would you use first? Why? What would you do next?

  • chicken
  • coupon
  • fork
  • knife
  • lettuce
  • gift card
  • mayonnaise
  • mustard
  • pickle
  • onion
  • paper cup
  • paper receipt
  • pen
  • roast beef
  • roll
  • rye bread
  • spoon
  • tomato
  • turkey
  • wheat bread
  • white bread
  • wrap

Answer

Check part 2 for my answer with explanation.  If you want to take a stab at it – either before or after I’ve posted the answer – go for it.  There is more than one correct answer.  If you post your answer as a comment in this thread, I will give my thoughts on it.  If you post it in the CodeRanch/JavaRanch thread, you may get feedback from others as well.

2 thoughts on “scea – decomposition strategies example – part 1

  1. I group them like this

    1.

    •chicken
    •lettuce
    •mayonnaise
    •mustard
    •pickle
    •onion
    •roast beef
    •tomato
    •turkey

    2.

    •coupon
    •gift card
    •paper receipt
    •pen

    3.

    •fork
    •knife
    •paper cup
    •spoon

    4.

    •roll
    •rye bread
    •wheat bread
    •white bread
    •wrap

Leave a Reply

Your email address will not be published.