JDE AIS Server
Application Interface Services (AIS) - As the name says, it provides interface services to the applications.
JDE and mobile devices are using Java scripts called JSON which stands for JavaScript Object Notation over REST API to communicate with each other.
Before going for AIS, let's discuss about API, REST and JSON.
What is an API?
---------------
API stands for Application Programming Interface. It makes it possible to transfer data from an application to other applications.
An API receives requests and sends back responses through internet protocols such as HTTP, SMTP, and others.
SOAP and REST are two API styles that approach the question of data transmission from a different point of view.
SOAP
-----
SOAP stands for Simple Object Access Protocol. It’s a messaging protocol for interchanging data in a decentralized and distributed environment
SOAP can work with any application layer protocol, such as HTTP, SMTP, TCP, or UDP. It returns data to the receiver in XML format.
Security, authorization, and error-handling are built into the protocol.
REST
-----
REST, or REpresentational State Transfer, is an architectural style for providing standards between computer systems on the web, making it easier for systems to communicate with each other.In the REST architectural style, the implementation of the client and the implementation of the server can be done independently without each knowing about the other.
This means that the code on the client side can be changed at any time without affecting the operation of the server, and the code on the server side can be changed without affecting the operation of the client. As long as each side knows what format of messages to send to the other, they can be kept separate.
Systems that follow the REST model are stateless, meaning that the server does not need to know anything about what state the client is in and vice versa.
In this way, both the server and the client can understand any message received, even without seeing previous messages.
REST requires that a client make a request to the server in order to retrieve or modify data on the server. A request generally consists of:
an HTTP verb, which defines what kind of operation to perform
a header, which allows the client to pass along information about the request
a path to a resource
an optional message body containing data
HTTP VERBS:
There are 4 basic HTTP verbs we use in requests to interact with resources in a REST system:
GET — retrieve a specific resource (by id) or a collection of resources
POST — create a new resource
PUT — update a specific resource (by id)
DELETE — remove a specific resource by id
You can learn more about these HTTP verbs
HEADERS:
In the header of the request, the client sends the type of content that it is able to receive from the server. This is called the Accept field, and it ensures that the server does not send data that cannot be understood or processed by the client. The options for types of content are MIME Types (Multipurpose Internet Mail Extensions).
MIME Types, consist of a type and a subtype. They are separated by a slash (/).
Below are some commonly used types and subtypes:
text/html
text/css
application/json
application/pdf
application/octet-stream...
PATH:
Requests must contain a path to a resource that the operation should be performed on.
SOAP vs REST
--------------------
SOAP is a standardized protocol that sends messages using other protocols such as HTTP and SMTP. As opposed to SOAP, REST is not a protocol but an architectural style. The REST architecture lays down a set of guidelines you need to follow if you want to provide a RESTful web service.
SOAP is complex, it requires more bandwidth and resources which can lead to slower page load times. REST was created to address the problems of SOAP. Therefore it has a more flexible architecture. It allows different messaging formats, such as HTML, JSON, XML, and plain text, while SOAP only allows XML.
REST is also a more lightweight architecture, so RESTful web services have a better performance. Because of that, it has become incredibly popular in the mobile era where even a few seconds matter a lot. For REST API, JSON is widely used for data transfer from server to client. (To be continued in part2...)
Comments
Post a Comment