Software Reuse Quick Tip #2

Tip #2 Name your software assets appropriately

Whether you are naming a method, a class, a component, a library, or a service – pause a minute to really think about the software’s purpose and capabilities in order to assign a name.

An appropriate name will help you when trying to mine for existing software assets to be reused. Additionally, the effort will be fruitful when you are trying to refactor existing software assets to be more reusable.

Whenever you come across a method like doEverything() or a service SendDataToXYZSystemService – take a minute to rename them appropriately. Too often, a bad name will cause that extra bit of research for you to evaluate a capability that exists in your applications. If the name is too obtuse, you might not recognize functionality that is already there and build a duplicate one.

Good names are obviously tied to your problem domain but general guidelines still are valid – it is a good idea to name software assets based on the business functionality or capability. If you are publishing order updates to another system, why not call the asset PublishOrderUpdates instead of SendDataToABCSystem?

When you name an asset in a simple, clear, and accurate manner you will be surpirsed how often it will help you reuse it.

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

One Response to Software Reuse Quick Tip #2

  1. […] Avoid naming schema elements after particular systems or technologies. Your element names and complex data types should be domain relevant  and be descriptive. e.g. don’t use names such as MyEntity or customer001! […]

Leave a Reply

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

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

Google photo

You are commenting using your Google 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

%d bloggers like this: