Thursday, June 08, 2006

Services aren't about reuse

One of the often trotted out reasons for SOA is that it enables reuse, now a while back Neil Ward-Dutton blogged about this being wrong. Its this view I'd like to build upon here, with one minor change, instead of thinking of sharing services I think of it as using services.

So what is the difference between use and reuse? Well in the spirit of well known thickie Albert Einstein lets use examples.

  • When you finish the christmas biscuits in those big tins that they come in and then reuse the tin to store your receipts, this is (clearly) reuse.
  • When you demolish a wall, take the bricks and build a shed you are reusing the bricks.
  • When you take a library file and import it into a project you are reusing the library.

Reuse is about taking something and moving it into a different context. This will either change its purpose (the tin) or use it as a piece in a bigger solution (bricks and library).

  • When England beat Paraguay on Saturday they will be using the pitch in Frankfurt. When South Korea play Togo on the same pitch a few days later they will also be using the pitch.
  • When you order a pen from Procurement you are using them to get the pen. If someone else wants a pen they also use procurement.
  • When you include GoogleMaps in a Mashup you are using their functionality.

Use is about using capabilities in-situ, this doesn't mean you can't get to them but that they are left where they are and you invoke them. Mentally the shift is away from thinking of "re-using" a service in a project or "re-using" some code towards using something that already exists, where it already exists.

You don't reuse phones, knives, cars, roads or football pitches, you just use them, so it should be with a well realised service architecture. Don't think about bringing the capabilities within your bounds but of invoking capabilities that exist elsewhere.

Mentally this should also change how you think of building services, it is not the responsibility of the consumer to worry about food, water etc, which is what reuse is about, its the responsibility of the provider to make sure that these elements are catered for. Reuse encourages people to leave such issues to others because it makes consumers understand the lifecycle and make changes based on what they want. Use should be about providing an interface and a mechanism to request change that applies to all, and having all of this managed behind the boundaries.

Reuse tends to focus on functional activities only. Use needs to focus on functionality, the full lifecycle and providing the service to all.

Technorati Tags: ,

No comments: