I moved this weekend and as I was boxing up all my stuff, I thought about generic components and services. Tape, cardboard, moving wrap, and a rental truck are all simple things but when you put them together they become something far more valuable. It seems simple to combine tape and cardboard, but when combined, they make another powerful component (box) and make a larger service possible (moving). During this strange line of thinking, I tried to find the characteristics that made the most sense when creating generic components and services, here are a few that came to mind:
Can I use this component over and over?
Can I use the same box N times? (box has some wear and tear but can be used N times)
Can I use a piece of tape N times? (tape is more single use, it gets unsticky)
How easily can this component be combined with itself or another component?
Tape + Tape + Cardboard = Box
Ink + Quill = Pen
((Box + stuff) * 35) + Truck + 9 hours = Move across town
Are there side effects when I combine components? The fewer side effect, the easier things can be combined.
Example: Does the steering wheel (component) affect the gas peddle (component)? Say I turn right, does the car speed up? Say I turn left does the car slow down? Not good.
Can I make a component do something it wasn’t intended to do. Can I stretch it, bend it to make what I need?
Example: Splice two boxes to hold something unique in size/shape
How many different ways can I use a generic components or service?
Example: Tape and cardboard are used for many different things.
Can you assemble new components at runtime? Can you combine components and make new components here and now without a recompile?
Example: HTML has a beautiful set of generic components that can be reassembled into billions of different configurations. Instead of sending down components, you send the recipe assuming all the generic elements are present.
During the move I found the most useful generic component to be moving wrap. This stuff is magic as it adds a little layer of plastic around things and sticks to itself. In packing up the kitchen I wrapped everything breakable in this stuff to protect it and bundle things together. It allowed me to take a stack of glasses and make them virtually unbreakable and one solid element. During the move not a single item broke or scratched and it was largely do to this wrap. It was a simple generic component that really improved my move.
I am looking to build IFBIN 2.0 atop generic components and services that can be reused in other applications. In designing out the component/services it is useful to explore how other applications might use these. As you think about building components and services for use within the applications you build, take a look at what can be made generic and reusable.
I am glad I am all moved!