Software Reuse Quick Tip # 21

Tip # 21 – Identify Repetitive Steps Consumers Perform

There are a variety of places to look for reuse opportunities – one that is my favorite is looking for patterns with customer integrations. If a customer is setting ten properties to execute a common service call or method, why not provide a convenience function to accomplish the same in fewer steps? The other classic example is initializing objects. If every consumer is creating the same set of objects and initializing it in a specific way – resulting in a lot of repetitive code – you can provide a factory class or a façade interface. Additionally, look for activities that customers do that should be part of the reusable asset or can be useful to others. For instance, maybe after receiving output your customer converts that data to another format (say from XML to JSON or XML to plain text) – why not provide an option to get that right out of the reusable asset? Note of caution here though: what I am referring to is only common capabilities that aren’t specific to a single consumer. If you place logic that is specific to a consumer the asset is no longer reusable.

Like this post? Subscribe to RSS feed or get blog updates via email.

tweet this add to del.icio.us post to facebook

Advertisements

5 Responses to Software Reuse Quick Tip # 21

  1. […] This post was Twitted by t_agile […]

  2. […] Software Reuse Quick Tip # 21 « Art of Software Reuse artofsoftwarereuse.com/2009/10/28/software-reuse-quick-tip-21/?utm_medium=twitter – view page – cached There are a variety of places to look for reuse opportunities – one that is my favorite is looking for patterns with customer integrations. If a customer is setting ten properties to execute a… (Read more)There are a variety of places to look for reuse opportunities – one that is my favorite is looking for patterns with customer integrations. If a customer is setting ten properties to execute a common service call or method, why not provide a convenience function to accomplish the same in fewer steps? The other classic example is initializing objects. If every consumer is creating the same set of objects and initializing it in a specific way – resulting in a lot of repetitive code – you can provide a factory class or a façade interface. Additionally, look for activities that customers do that should be part of the reusable asset or can be useful to others. For instance, maybe after receiving output your customer converts that data to another format (say from XML to JSON or XML to plain text) – why not provide an option to get that right out of the reusable asset? Note of caution here though: what I am referring to is only common capabilities that aren’t specific to a single consumer. If you place logic that is specific to a consumer the asset is no longer reusable. (Read less) — From the page […]

  3. David says:

    V,

    Very nice post. I like the short side of it. I think if you can post a object mapping of a few examples it would be great.

    I’m really liking the reuse here but it seems that many people don’t take advantage of what it can do for you. Mainly I see it happening because different developers work on different parts of the application and don’t communicate with each other. Do you have any suggestions for the “soft side” of development?

    -D

    • David,
      thanks for the comment and I will post code samples soon. Yes, many developers don’t communicate effectively and that surely inhibits reuse. There are several suggestions for making communication better – i had posted earlier on holding reuse-friendly conversations with developers, having a communication plan, the importance of teamwork, and using a brief 1-2 page summary that developers can use a quick reference at their desks. Additionally, you can share ideas about components that were reused or made reusable during retrospectives or project feedback sessions.

  4. […] of use: how are assets set up? are they easily configurable? are bootstrap code generated for developers? Take care to highlight ease of integration and the multiple variability mechanisms […]

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: