Workshop - Web App Back End Spring Boot 1
Workshop - Web App Back End Spring Boot 1
-2-
Agenda
• Intra Application Communication
• What is Webservice
• What is communication Standards
• XML & JSON
• What is Microservice
• Introduction to Microservice
• Introduction to SpringBoot
• Creating a sample service using SpringBoot
• Testing the service
• Advantages of Microservice.
Intra Application Communication
Request
ABC Cart Payment Gateway
Java Beans
Java Beans
Response
JSP/Servlet JSP/Servlet
Application Application
JSON Response
Response
{
JSP/Servlet JSP/Servlet
"id": "3M049991JF5624929", Application Application
"status": "COMPLETED",
"payment_source": "card"
}
Sample Scenario of Cart & Payment Gate Way
What is Webservice
XML Response
<employees>
<employee>
<name>Rajesh</name>
<email>[email protected]</email>
<salary>25000</salary>
</employee>
<employee>
<name>Rahul</name>
<email>[email protected]</email>
<salary>15000</salary>
</employee>
<employee>
<name>John</name>
<email>[email protected]</email>
<salary>10000</salary>
</employee>
</employees>
XML vs JSON
XML JSON
XML provides the capability to display data JSON doesn't provide display capabilities.
because it is a markup language.
XML files are less human readable. JSON files are more human readable than XML.
Amazon Product Advertising API Facebook Graph API, Google Maps API, Twitter
API, AccuWeather API
XML is not always a well-defined object model. JSON maps directly to object models
Introduction to Microservice
Microservice is an architectural style that structures an application as a collection of
two or more services that are:
• Independently deployable
• Loosely coupled