Part 5 Try out Visual Studio Online with Cloud Programming Model #epl-app
In this part, my initial plan was to try out the Business Application Studio Beta, until I actually realize at the moment of writing this blog it is not available for trial accounts. But I am pretty sure we will get there and I have a very strong expectation on it as a replacement of WebIDE in the future, as long as it is open to developers for free.
The real pain I am having these days is, I work in different locations and different PCs or virtual machines. So obviously it will be great if I can get a cloud development environment so that I can continue my work anytime anywhere. WebIDE is a good idea (however not everyone likes it though), and I can of course pay for a cloud virtual machine but it is normally costly. Sometimes firewalls might also stop the things from working, especially when talking to cloud environment.
It is quite interesting that I got the invitation to preview visual studio code almost at the same time that Business Applciation Studio Beta was announced. Great timing for both SAP and Microsoft. And the preview is free. So why not give a shot for that before we come back and try out the Business Application Studio once it is open for trial use.
Open an account
1. Go to https://online.visualstudio.com/ and set up some account details (including credit card, but it won’t be charged)
2. Then we can set up an environment and clone a git repo.
3. In a few seconds, we got the environment ready for connection
Install the cds plugin
1. The look and feel is pretty much the same as the local vs code. We need to install the vs code plugin for cds to get the cds syntax recognized.
2. As it is a cloud machine, I found the best way is to import the plugin installation file (vsix) into git repo and pull it into the project, then install it.
thought I found the easter egg, but it is not…. 🙂
3. Nice color themes are back.
Get start with CAP development
1. Install cds globally, and the sqlite
vsonline:~/workspace$ npm config set @sap:registry https://npm.sap.com vsonline:~/workspace$ npm install -g @sap/cds-dk vsonline:~/workspace$ npm install --save-dev sqlite3
2. Run and check
vsonline:~/workspace$ cds deploy && cds run [cds] - launched in: 1034.579ms [cds] - server listening on http://localhost:4004 ... [ terminate with ^C ]
3. When clicking the localhost link, it will open a URL like this
Cloud Foundry deployment
1. Install CF CLI, follow this link
2. Install the multiapps plugin
cf install-plugin multiapps
3. cf login, cf target
4. Install the mbt tool
npm install -g mbt
5. Build and Deploy to CF
vsonline:~/workspace$ npm run deploy:cf
Live Share and collaborate
Except for some overheads on the initial setting and installation of various dependencies, the overall experience is quite good and this will probably be the replacement of my local environment for now. Really loves the default dark theme as well.
Over to you. Business Appliation Studio 🙂
Stay tuned. #epl-app