Pragmatic Software Design

Vijay Narayanan

Design Robust Interfaces

user-pic
Vote 0 Votes
Designing robust interfaces is a challenge in distributed systems and solutions and care needs to be taken specially when interfaces span application boundaries. So what do i mean by robust interfaces?

  • They encapsulate underlying technology details well - i.e. do not have vendor or platform specific semantics, attributes, and data structures to be part of interface contracts unless absolutely necessary
  • They are driven by business constructs and not by technical implementation. Interfaces should reflect business operations and not force a class or object to drive the business operation. This is also referred to as contract-first development.
  • They minimize or eliminate calls that are unsafe or leave a system in an invalid state. The interface shouldn't let the caller invoke an operation assuming a previous call has been made to initialize sessions/variables. Why not provide a cleaner operation that performs the right sequence of steps?
  • They return meaningful error details - including error code, options for rectification, or even time to retry etc. Simply returning an underlying stack trace ins't always good enough!
This isn't an exhaustive list but the intent is to provide a sense of characteristics associated with well designed interfaces.
Reblog this post [with Zemanta]

No TrackBacks

TrackBack URL: http://www.ebizq.net/MT4/mt-tb.cgi/15896

Leave a comment

Vijay Narayanan blogs about software design from several perspectives - SOA,BPM, messaging, systematic reuse, agility, and architecture.

Vijay Narayanan

Vijay Narayanan is a software professional working on a variety of projects. Vijay has worked on several software initiatives ranging from single-user systems to large, distributed, multi-user service platforms with services. Most recently, Vijay has been involved in research dedicated to combining agile practices with service-orientation. He is a contributing author to the upcoming book Next Generation SOA as part of a chapter on modern SOA methodologies. Vijay maintains a blog dedicated to software reuse at http://www.artofsoftwarereuse.com.

Recently Commented On

Monthly Archives

Blogs

ADVERTISEMENT