Micro-Services enabled Architecture
To support micro-services architecture, WaveMaker uses an API-driven app development approach wherein REST APIs are generated automatically for the application. Every backend service such as Database Entity, Queries or Custom Java code, that is integrated into an application generates REST APIs. Some of these APIs are available for further customization based on the app integration needs.
ORM Layer is auto-generated from DB schema using Hibernate & JPA. Services Layer is auto-generated using Spring.
Custom queries, procedures, and Java Services can be used to extend the app functionality. For all these services, REST API is auto-generated using Spring-REST/Swagger. Variables interact with REST API layer to access the services.
Accessing Data – Variables
A Variable is a non-visual component that is used to call web services, custom database queries and Java methods. Variables can be invoked by Service Calls and by handling the call events. Using variable events ensures:
- The service call has returned.
- Errors returned from the service calls are handled.
- The result set is available.
Life-cycle of Variable
The graphic below represents the life-cycle of the variable.
- A user invokes the variable call through an action like click on a button.
- An event is emitted and event controller watches over the event.
- Event controller requests the variable information from the base service.
- Event controller calls the update method on the “Variable” service.
- The Service makes a call to the rest service along with the parameters passed.
- The response is returned which is handled by the Service. It also invokes the events after getting the data.
- The response data is updated in the variable
- The widgets listening to the data change on the variable gets updated.
As mentioned earlier, each of the services integrated into your app is converted to a RESTful service and are consumed through their respective REST APIs.These REST APIs are exposed via the API Designer and can be re-configured as per the application needs.
We have given an overview of how Backend services are handled in WaveMaker.
5. Creating Backend Services
- 5.1 Overview
- 5.2 Web Services
- 5.3 Database Services
- i. Working with Databases
- ii. Data Modelling
- ii. Databases Access
- iv. ORM Artifacts
- 5.4 Java Services
- 5.5 API Designer
- 5.6 3rd Party Libraries