After a complete debrief about SAP CAP in my previous blog “The SAP Cloud Application(CAP) Model”, I would now like to share my insights on developing the SAP CAP using VSCode. Since the scope of this is vast and can span throughout the web application, let’s begin with a look at ‘HANA integration’.
Setting up the environment before we kick into the main solution is critical for the CAP model to thrive for custom solutions. The biggest benefit of SAP CAP is being able to offer custom solutions via SAP HANA as another database. But, to make your development journey instantly rewarding, use VSCode. It features syntax highlighting, bracket-matching, auto-indentation, box-selection, snippets, and more.
In the previous part of this blog, I have talked about the challenges faced in CAP Models. Now, let’s discuss removing challenges with a good environment set up.
Environment Set Up
There is software with features that help CAP models function better. Since it is pre-required software, select the compatible language, serving your CAP service best.
- Node.js:–Node.js is designed to build scalable network applications. Note that we are using the Node.js in the tutorial. It is an open-source, cross–platform for writing business logic.
- Cloud-Foundry-CommandLineTool:- It is the official command-line client for Cloud Foundry. You can use this tool to manage apps, service instances, orgs, spaces, and users in your SAP Cloud-foundry environment. With this tool we can connect our local-environment to Cloud-foundry for deploying the developed CAP services or applications.
- SQL-LITE tool:-Create a database, define tables, insert and change rows, run queries and manage an SQLite database file. Easy-to-use for the local environment.
Make sure you have enabled the “cloud-foundry” environment in your “SAP BTP Account”. CLOUD-FOUNDRY COMMAND LINE TOOL is also one of the tools you can use to set up.
SAP HANA Cloud Instance Creation
Here is a glimpse of SAP BTP Cockpit showcasing dashboard with a sub account. If you create a new BTP account, it creates a sub account by default.
So we have the “HANA Cloud Database “ instance, and next we will create a CAP service in the VSCode.
Here is the first look of the working of VSCode. VSCode supports tons of extensions for different programming languages. It also supports the SAP CAP model so the below image shows the structure of the CAP project too in the first window.
In conclusion the key benefits of using VSCode include:
- VSCode is most suitable for developing applications or services in the local environment.
- It does support a plethora of different programming syntaxes. It has a catalog of over 24,000 different extensions to extend its own capabilities.
- SAP recommends VSCode for developing the CAP applications or services in any local-environment.
In my experience, VSCode allows me to bring more context to the case studies I work on. Stay tuned, I’ll be exploring the development of CAP models in my subsequent blogs.