The mobile Repair Tool application needs to be able to make use of the same services used within the Space Management application. There are multiple ways of implementing this. We'l look at the available options In this little analysis.
These options are:
REST API
SOAP
GraphQL
AMQP
REST API
REST (representational state transfer) is commonly used and would be implemented over the HTTP protocol. Each request is handled stateless, meaning no information is kept about previous requests. Data can be exchanged in both JSON and XML.
SOAP
SOAP stands for Simple Objects Access Protocol and is a web communication protocol. It was designed in 1998 for Microsoft. It is highly standardised and only works with XML.
GraphQL
GraphQL is a query language and server-side runtime for APIs that provides client exactly the data they requests. Multiple resources can be fetched at once.
Comparison
SOAP vs REST
GraphQL vs REST
Advice
The most commonly used method is REST and is extremely customisable and simple. It's a network architecture pattern and not a protocol or specification. SOAP is less used and is more standardised. It requires additional features if you want to follow the protocol strictly. In other words it requires a much deeper understanding of standards and additional WS protocols (Altexsoft, 2019). This protocol doesn't do a better job for the usecase of the KA-Huis, so it's therefore not interesting for us.
Data fetching is the biggest improvement of GraphQL over REST. GraphQL also fixes the problem with over/under fetching. It does however adds more complexity to the building process and at this point no one has experience with it. Since the above improvements are usually not extremely painful with little applications with slow traffic, it will be better to first use REST and monitor the drawbacks of it.
Analysis
The mobile Repair Tool application needs to be able to make use of the same services used within the Space Management application. There are multiple ways of implementing this. We'l look at the available options In this little analysis.
These options are:
REST API
REST (representational state transfer) is commonly used and would be implemented over the HTTP protocol. Each request is handled stateless, meaning no information is kept about previous requests. Data can be exchanged in both JSON and XML.
SOAP
SOAP stands for Simple Objects Access Protocol and is a web communication protocol. It was designed in 1998 for Microsoft. It is highly standardised and only works with XML.
GraphQL
GraphQL is a query language and server-side runtime for APIs that provides client exactly the data they requests. Multiple resources can be fetched at once.
Comparison
SOAP vs REST![image](https://user-images.githubusercontent.com/16477999/163678490-daca8ec8-48a6-4647-8e00-4b8d75cc249e.png)
GraphQL vs REST![image](https://user-images.githubusercontent.com/16477999/163678528-75b18846-0015-4572-8db6-90e6d02ef936.png)
Advice
The most commonly used method is REST and is extremely customisable and simple. It's a network architecture pattern and not a protocol or specification. SOAP is less used and is more standardised. It requires additional features if you want to follow the protocol strictly. In other words it requires a much deeper understanding of standards and additional WS protocols (Altexsoft, 2019). This protocol doesn't do a better job for the usecase of the KA-Huis, so it's therefore not interesting for us.
Data fetching is the biggest improvement of GraphQL over REST. GraphQL also fixes the problem with over/under fetching. It does however adds more complexity to the building process and at this point no one has experience with it. Since the above improvements are usually not extremely painful with little applications with slow traffic, it will be better to first use REST and monitor the drawbacks of it.
Resources