KA-Huis / space-management

The core application of the KA-Huis
https://ka-huis.github.io/space-management
Apache License 2.0
0 stars 0 forks source link

Research how to integrate the mobile application with the main web application #70

Closed cyrildewit closed 2 years ago

cyrildewit commented 2 years ago

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

GraphQL vs REST image

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

cyrildewit commented 2 years ago

Since we're working with an agile method, we're spitting up the task of creating the REST API. Epic #37 covers this work.