MTA (Multi-Target-Application) is a model that manages life cycle of an application comprised of multiples modules created with different technologies, and deployed to different target run-times. It encompasses and describes application modules, dependencies, and interfaces in an approach that facilitates validation, orchestration, maintenance, and automation of the application throughout its lifecycle.
In this tutorial, you will see how an MTA model and an MTA Archive Builder is used for staged development in Cloud Foundry environment within SAP Cloud platform.
You will be creating different spaces in your organization- DEV for development where developers will develop solutions, QUAL for quality where quality engineer will test and PROD for production where IT Administrators will maintain and monitor the final solutions.
It is a very simple application that allows the user to enter his first name and last name and by clicking on a “Create” button will insert the entered input to the table shown.
The application has various components/layers as depicted in the snapshot below
Also you can share your HANA DB with all different spaces as explained here
The Business Logic defines the Java application which run on Cloud Foundry environment within SAP Cloud Platform. It uses JPA (JAVA persistence API) for accessing, persisting, and managing data between Java objects / classes and a relational database.In this scenario, the Java application defines Employee class and map it to the Employee table in the SAP HANA database.
To implement Java Persistence API the Java application uses EclipseLink which is the open source Eclipse Persistence Services from the Eclipse Foundation.
It also usesApache Olingo library to expose employee data as an OData Service to be consumed by the SAPUI application.
The UI Logic is defined in an SAPUI5 application which also runs on Cloud Foundry environment within SAP Cloud Platform. It consumes the OData Service from the Java application to send and receive employee data from the SAP HANA database .
As already mentioned MTA model application consist of multiple modules of different technologies. In current scenario, It consists of Java and SAPUI5 modules uses development descriptor (mta.yaml) to address their inter-dependencies and configuration data they expose, and the resource (SAP HANA database) they require to run.
The developer guide on how to develop and build MTA model can be found here.