CDS for Cloud ( Java )
Okay, Core Data Services (CDS) is already out there for a while. I’m not completely sure, but I think SAP started with CDS in HANA. With CDS in HANA you could just create your complete data model with only one file. CDS allows you to create entities and associations between entities which will generate tables and database relationships at the moment that you deploy the CDS file on the HANA systems. Read more about it in the help documentation here:
After that (again, I’m not sure which one was first), there was CDS for ABAP. CDS in ABAP is not the same as in HANA but somehow the concept is similar. In ABAP you create a view and have some additional SQL possibilities for making queries with better performance. You can also create associations in the ABAP CDS views which can be used to generate an OData service on top of it.
Over the years, the focus of CDS views has continued growing and we saw new features in every release, in HANA as well in ABAP.
CDS also became part of the new ABAP Programming model for S/4 HANA, read all about it here: https://blogs.sap.com/2016/04/04/getting-started-abap-programming-model/
CDS for Cloud apps
With this, CDS covered development in HANA and ABAP but you probably already knew all of this, nothing new. The reason why I’m repeating all of this, is because of a recent update in the SAP Web IDE. The latest update of the SAP Web IDE contains a new template for creating Cloud Business Applications. This template enables you to create full stack apps for CloudFoundry that exists out of tree layers:
- Database layer, in this case HANA
- Middleware layer, Java
- UI layer, UI5
Creating the database layer is not that difficult, CDS for HANA made this easy. The UI layer also shouldn’t be a problem for me because I’m almost doing this daily. But, the middleware layer in Java is the hardest part for me. Creating an OData service in Java requires not only Java coding, but also a lot of configuration of your project. You also need additional libraries like Orlingo and so on. Because I’m not doing this very often, it will take some time. An example on how to create a complete project with Java as middle layer for generating the OData can be found here: https://open.sap.com/courses/hcp2-1
Luckily, SAP has a good solution for making this easier. As part of this template for creating “Cloud Business Application”, SAP added CDS files for Java to create OData services. With this CDS file for Java, you don’t need to configure the Java project anymore. Just one CDS file will generate all the JPA entities and expose them. You can connect your Java project to your HANA database in the CDS file and you’re done.
Try it out!
Don’t believe me? Try it out yourself! There is a great tutorial on how to create a “Cloud Business Application” with CDS for HANA, Java and UI5 with annotations:
SAP is going all in on CDS! We had CDS for HANA and CDS for ABAP. Now, SAP also has CDS for Java and supports Cloud applications with that. It’s never been that easy to create an OData service in Java! It would also take much longer without this CDS for Java. You have CDS on all levels and annotations for the UI.
Let’s start creating Cloud apps!
will it be available for on-premise someday?.
I think you will always need the web ide, but it should be possible to deploy it to every platform that supports mta.
This looks interesting but I can't follow the tutorial because the build fails (Define a Service step) and the error message is not very helpful: Build of srv failed. Could not start the build. A general error occurred.