Definition of WEB Services:
A method for two machines to communicate over the network or internet.
A web service runs on a computer and waits for requests from other computers.
Upon receiving a request, the web service returns the requested resources.
HTTP Protocol:
Standardized web protocols like HTTP or HTTPS are required for web services to connect and exchange data across the internet.
HTTP is used for secure communication over a computer network. HTTPS encrypts the data exchanged between a user's web browser and the web server, helping to protect against eavesdropping and man-in-the-middle attacks.
API Definition:
An Application Programming Interface (API) enables communication and data exchange between client-server systems.
Analogy: API is like a waiter in a restaurant who processes requests and returns responses.
Web Services:
A subset of APIs creates an application protocol using HTTP/HTTPS to send and receive requests to/from a server.
Key Distinction:
Every web service is an API, but not every API is a web service.
SOAP vs. REST:
SOAP:
Primarily uses XML for messages.
It is more complex and less user-friendly.
REST:
Utilizes HTTP standards and can send data in various formats (XML, JSON, etc.).
It's simpler and more intuitive than SOAP.
MuleSoft Overview:
Provides integration platform and API management services.
allowing developers to easily connect various applications for data exchange.
Integration Platform
It is a Salesforce company
it is an API Management Platform
Supports integration of existing systems regardless of technology used (JDBC, web services, etc.).
API-led Connectivity:
An architectural approach emphasizes well-defined APIs for different layers of an organization's IT infrastructure.
Layers:
Experience Layer: User-interface-related APIs.
Process Layer: APIs that execute business logic.
System Layer: APIs connected to underlying raw data systems.
Promotes reusability, modularity, and separation of concerns.
System APIs:
Connect to underlying systems containing raw data.
Example: API connecting to databases directly.
Process APIs:
Built to combine or transform data from two or more system APIs.
Examples include aggregating customer data or implementing business logic.
Experience APIs:
Provide a tailored interface for clients to interact with system or process APIs, while abstracting raw data.
Client-side Experience:
Clients interact with Experience APIs, with minimal exposure to raw data.
Experience APIs can format responses according to client needs (XML, JSON, etc.).
Flexible architecture allows organizations to adapt API layers per needs.
Definition:
An API specification outlines the behavior, request types, and responses of the API.
Design Center:
Enables creation of API specifications using RAML for RESTful APIs.
Supports various API modeling versions.
Key Components in API Specification:
Resources: Unique identifiers (e.g., GET, POST methods).
Requests: Important parameters like URI parameters and headers.
Responses: Managed via HTTP status codes and response bodies.
Lifecycle Stages:
BOSION: Initial development stage.
BENEF: Refining API’s functionality.
DEPLOY: Deploying APIs for use.
ANYPONT: Management and monitoring of APIs post-deployment.
REUSE: Leveraging existing APIs for new integrations.
Example of API Specification:
Title: bank-sys-api.
GET method for account summary, with request parameters and response examples outlined.
Definition of Traits:
Resource types used to extract common patterns from API definitions.
Useful for unifying request and response structures across multiple resources.
Implementation:
Traits defined to apply common functionality across various methods, enhancing consistency and efficiency.