Introduction:
Spring has really evolved a lot. It has been around for over a decade and has found a place as the de facto standard framework for developing java applications.
There are many exciting things in world of spring ecosystem such as Annotation, Spring MVC, REST, spring boot, spring cloud and micro services.
We are going to deep dive into world of restful web services, spring boot and micro services.
We will start with basics of restful web services, http request methods, how do you do exception handling, and validation and so on
Introduction to Web Services:
What is a web service?
W3C definition :
"Software system designed to support interoperable machine to machine (application – application )interaction over a network"
Now we know what a web service is, let’s see the following:
-
How does data exchange between applications take place
- Consider a quiz application wants to communicate with security application to know whether an user is authorised to be admin or not
- So quiz application needs to send a request and security application will send a response
- Data exchange happens in form of request and response
-
How can we make web services platform independent?
- 2 popular formats – XML and JSON
<Learning>
<Name>SpringBoot</SpringBoot>
<Name>MicroService</SpringBoot>
</Learning>
[
{"Name":"SpringBoot"},
{"Name":"MicroService"}
]
- How does application know the format of Request and Response ?
- Every web service offers service definition
- It provides whether request-response format is XML , JSON or any other format
- How to call the service , where is the service available
- What is the contract between service and consumer
To summarise the above
Now we have seen a quick overview about web services, next let’s see about the different ways of implementing web services
Top comments (0)