3. SOA-Service Oriented Architecture
SOA expands to Service Oriented Architecture, is a
software model designed for achieving
communication among distributed application
components, irrespective of the differences in terms
of technology, platform, etc.,
4. contd
Service-Oriented Architecture (SOA) is a design approach and architectural style
used in software development to create flexible and scalable systems by organizing
software components (services) into loosely coupled, reusable, and interoperable
units. These services can be thought of as self-contained, modular units that
provide specific functionality and can communicate with each other over a
network.
Key concepts and principles of SOA include:
• Services: These are the fundamental building blocks of an SOA. Services are self-
contained, independent units of functionality that can be accessed over a network
through standard protocols, such as HTTP, SOAP, or REST. Services are designed to
perform specific tasks or functions and can be reused in different applications.
• Loose Coupling: In SOA, services are loosely coupled, meaning they are
independent of one another and can evolve separately without affecting other
services. This allows for greater flexibility and adaptability in the system.
• Interoperability: SOA promotes the use of standardized communication protocols
and data formats to ensure that services can work together, regardless of the
technologies or platforms on which they are implemented. This facilitates
integration between heterogeneous systems.
5.
6. What are Web services
Web services are a technology that enables
communication and data exchange between
different software applications over the internet or a
network. They provide a standardized way for
applications, regardless of the programming
languages, platforms, or technologies they are built
with, to interact with one another. Web services are
based on open standards and protocols, making
them highly interoperable.
7.
8. Types of Web Services
There are mainly two types of web services.
• Simple Object Access Protocol (SOAP) web
services.
• Representational State Transfer(REST)
services.
9. SOAP
• SOAP is an acronym for Simple Object Access
Protocol.
• SOAP is a XML-based protocol for accessing web
services.
• SOAP is a W3C recommendation for communication
between applications.
10. • It is important for web applications to be able to
communicate over the Internet.
• The best way to communicate between applications
is over HTTP, because HTTP is supported by all
Internet browsers and servers. SOAP was created to
accomplish this.
• SOAP provides a way to communicate between
applications running on different operating systems,
with different technologies and programming
languages.
11. SOAP Building Blocks
A SOAP message is an ordinary XML document
containing the following elements:
• An Envelope element that identifies the XML
document as a SOAP message
• A Header element that contains header
information
• A Body element that contains call and response
information
• A Fault element containing errors and status
information
21. REST
REST is an acronym that stands for REpresentational
State Transfer. It was created by Roy Thomas Fielding,
who also created HTTP. The primary purpose of
RESTful web services is to improve the efficiency of
online services. RESTful web services attempt to
describe services by utilizing the many principles
currently existing in HTTP. REST is a design approach,
not a protocol.
22.
23.
24.
25.
26. contd
• The standard message exchange format is not defined. REST
services may be built using both XML and JSON. With REST,
JSON is the more prevalent format. In REST, the key
abstraction is a resource. Anything can be considered a
resource.
• The resource is available in XML, HTML, and JSON formats. A
representational resource captures the current state. When
we request a resource, we supply the resource's
representation. HTTP's most significant methods are:
• POST: This method generates a new resource.
• DELETE: This command deletes the resource.
• GET: This command reads a resource.
• PUT: It is used to update an existing resource.
27. status codes
• HTTP specifies the following standard status
codes as well:
• 401: UNAUTHORISED
• 500: SERVER ERROR
• 404: RESOURCE NOT FOUND
• 200: SUCCESS
• 201: CREATED
28.
29.
30.
31.
32.
33. For example
• If we conduct the following steps in the social media
application, we will receive the following outcomes.
• POST /users: This method creates a user.
• GET /users/{id}: Retrieves information about a single user.
• GET /users: It retrieves all users' information.
• DELETE/users: It removes all users.
• DELETE /users/{id}: This command deletes a user.
• GET /users/{id}/posts/id post_id: It retrieves information
about a certain post.
• POST/users/{id}/ posts: This method produces a post for a
certain user.
• GET /users/{id}/post: Retrieve all posts for a certain user.