Web service Design approaches
Design approaches in Web service
There are 2 approaches to implement a web service
1. Top down approach
2. Bottom Up approach
Top down approach
This approach is also called as contract first approach
In this approach, we first define the service contract which is WSDL so it’s called as Contract first approach.
As the WSDL contains all the information about the service like service definition,message format,transport protocol,security details,using this WSDL
service code is generated which we call as skeleton,Then service code is filled up as per the need.
So in simple words, we could say that Top down approach is WSDL first, service later.
Bottom Up approach
This approach is exactly reverse of the Top down approach.
In this approach WSDL is generated at last ,So this bottom up approach is also called as contract last approach.
First, service code is written,then using the service code,WSDL is generated.
Many tools are available to generate the WSDL file automatically based on the service code.
So in simple words, we could say that Bottom Up approach is WSDL last, service first.
Hints to remember which one is Top down and Bottom up without confusion
Always concentrate on when WSDL is developed.
If WSDL is developed first then it means WSDL is on top, so it is Top down approach
If WSDL is developed last, it means WSDL appears to be in the bottom, so it is called Bottom up approach.