skip to Main Content

Blog Part II: 3 Steps to Consider Before You Develop a CAP Application Using VSCode.

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 see how we get rid of the challenges with a good environment set up. 

Environment Set Up 

There is software with features that help CAP models function better. Since they’re pre-required software, choose the compatible language that serves 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, crossplatform 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. A thing to note is when you create a new BTP account, a sub account is created by default. 

So we have the “HANA Cloud Database “ instance, and next we will create a CAP service in the VSCode.  

VSCode Significance  

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:  

  1. It is most suitable for developing applications or services in the local environment.
  2. It does support a plethora of different programming syntaxes. It has a catalog of over 24,000 different extensions to extend its own capabilities. 
  3. 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.

 

Harish Kumar Chendolu has been working in the SAP UI5 space for a little over 2 years now. He is passionate about learning new technologies. When he is not working, you will find Harish either on the cricket pitch or practicing the art of meditation.

Back To Top