There are different approaches to consider when you need to design and implement a software system. An innovative approach that can make your development workflow easier is the Interface-Driven Development (IDD) Approach. Conceptualized by a software architect, this process helps in eliminating vagueness at the design state. Let’s look at the steps involved in this process.

The IDD process

1. High level ideation

The first step is to start with the idea. The idea originates from a problem that needs to be solved. It is important to think from the user’s point of view on how they would use the code being written.

The messages the code would send to other components need to be kept in mind. In this stage, the different elements of the system need to be planned. Also, how they would communicate with each other needs to be worked out.

2. Public Interface design

The public methods for the interfaces need to be designed. Since the components and how they communicate is known, it would be easy to work out interfaces and methods. It must be noted all information may not be available. So, minimal set of methods and interfaces are designed.

The interface needs to be simple, clear, and easy to use. But the implementation needs to be as deep as required.

3. Test case creation

For all the interfaces defined, test cases need to be worked out. Black box testing would need to be done to test the interface without yet going into the implementation. How the interface interacts with other classes and interfaces needs to be worked out.

This will help us revise the public interface before proceeding with implementation. Ultimately, it gives us a better understanding of our code.

4. Refactor the interfaces

Based on the tests run, refactoring or adjustments need to be done to the interfaces. The tests would help in understanding how well the interfaces interact. This information helps in making necessary changes to the interfaces.

Once the changes are made, tests need to be run again until we are satisfied. This is a quick and easy method since we don’t have to worry about changing implementation. Once this is done, we can go to the next step.

5. Implement the code

Now that the public interfaces have been created and tested, we can move to implementation. The methods can be implemented keeping in mind the communication worked out for the interfaces.

This method allows us to use a stable design while adjusting as needed. Thank you for your interest in Bahaa Al Zubaidi blogs. For more stories, please stay tuned to www.bahaaalzubaidi.com.