Content API is an HTTP library that makes networking for NeoMAD apps easier and most importantly, faster.
It offers the following benefits:
- Automatic scheduling of network requests
- Multiple concurrent network connections
- Transparent disk and memory response caching with standard HTTP cache coherence
- Support for request prioritization
- Cancellation request API: easily cancel a single request or blocks of requests
- Ease of customization
- Strong ordering: easily order requests to smartly populate your UI with data fetched asynchronously
- Debugging and tracing tools
Consuming Web Service
Representational State Transfer (REST) is the software architectural style for building web services. REST requests are made over HTTP using HTTP verbs as GET, POST that web browsers use to retrieve web resources or pages and to send data to servers.
Most RESTful web services use JSON messages to return data to the client. JSON is a text-based data-interchange format that produces compact payloads. It results in reduced bandwidth requirements when sending data.
NeoMAD provides Content API (
com.neomades.content) to consume data from web services.
RESTFul web services have mechanics for caching data in the client side. This optimization enables application to send and receive less data. The applications will have better performance.
An application can provide an offline mode for data by using previously downloaded and cached data in the device. This enables the application to be partially usable even if the network is not available: actions done in the application that need to be posted to the web service are saved to cache and sent to the internet when the connection is back.