Let’s kick off our series of live streams in 2024 with something that’s been much requested – a back to basics series on CAP with Node.js!

    See https://community.sap.com/t5/sap-community/back-to-basics-with-sap-cloud-application-programming-model-cap-part-1/ev-p/310513 for all resource links.

    *Summary*
    Made with HARPA AI

    – [03:40](https://youtu.be/gu5r1EWSDSU?t=220s) 🎉 Introduction to the live stream in 2024
    – DJ Adams welcomes viewers to the first live stream of 2024.
    – He acknowledges the audience and talks about his recent flu.
    – DJ Adams introduces his new location, a narrow boat, and shows the setup.

    – [07:54](https://youtu.be/gu5r1EWSDSU?t=474s) 📺 Overview of the series and setup for local development
    – DJ Adams discusses the new series focusing on SAP Cloud Application Programming Model (CAP).
    – He explains the goal of going back to basics and helping viewers understand CAP.
    – DJ Adams outlines the minimal requirements for following along, which are VS Code and a container engine.

    – [27:35](https://youtu.be/gu5r1EWSDSU?t=1655s) 🤖 Difference between a service and an app in CAP:
    – Understanding the distinction between services and apps in CAP.

    – [28:06](https://youtu.be/gu5r1EWSDSU?t=1686s) 🛡️ Installing necessary development tools for CAP:
    – Installing curl, git, and SQL light 3, essential tools for CAP development.

    – [28:52](https://youtu.be/gu5r1EWSDSU?t=1732s) 💼 Introduction to npm and SAP npm packages:
    – Explaining npm as a package manager for Node.js and SAP npm packages for CAP development.

    – [29:34](https://youtu.be/gu5r1EWSDSU?t=1774s) 🚀 Difference between SAP CDs and SAP CDs DK:
    – Distinguishing between SAP CDs (runtime) and SAP CDs DK (development kit) for CAP development.

    – [30:14](https://youtu.be/gu5r1EWSDSU?t=1814s) 🌐 Overview of CAP development hierarchy:

    – Exploring the hierarchy of CAP development folders: app, serve, and DB.

    – [31:10](https://youtu.be/gu5r1EWSDSU?t=1870s) 📦 SAP Cloud Application Programming Model (CAP) packages:
    – Understanding the purpose of SAP CAP packages for runtime and development.

    – [32:08](https://youtu.be/gu5r1EWSDSU?t=1928s) 🔄 The role of npm packages in CAP development:
    – Highlighting the significance of npm packages for CAP development.

    – [33:41](https://youtu.be/gu5r1EWSDSU?t=2021s) 🔌 Exposing Port 404 for CAP development:
    – Explaining the importance of exposing Port 404 for accessing CAP applications locally.

    – [47:29](https://youtu.be/gu5r1EWSDSU?t=2849s) 🧰 Setting up CAP development environment in VS Code:
    – Demonstrating how to set up a CAP development environment using VS Code and Dev Containers.

    – [49:25](https://youtu.be/gu5r1EWSDSU?t=2965s) 🚀 Installing development tools in the container:
    – Highlighting the installation of essential development tools inside the Dev Container for CAP development.

    – [50:36](https://youtu.be/gu5r1EWSDSU?t=3036s) 🛠️ Setting up a development environment in a container.
    – Docker container setup with CAP and Node.js.
    – Exploring packages installed in the container.
    – Introduction to CD SDK.

    – [52:12](https://youtu.be/gu5r1EWSDSU?t=3132s) 🧙‍♂️ The power of CAP with the CDs command line tool.
    – Explanation of using the CDs command line tool.
    – CAP development capabilities at your fingertips.
    – The benefits of a consistent development environment in a container.

    – [54:53](https://youtu.be/gu5r1EWSDSU?t=3293s) 📚 Back to basics with CAP – Multi-episode series.
    – Announcing a multi-episode series on CAP.
    – Exploring the basics of CAP together.
    – Encouraging viewer participation in learning CAP.

    Good morning good afternoon good evening welcome to handson sap Dev with me DJ qro it’s great to be back it’s been a long time so thank you everybody for joining this first live stream of 2024 so uh hi to V vadir is an old friend of the stream and lots of Old

    Friends actually so uh Lu have you got your large mug of coffee ready it’s 5 a. at your time isn’t it bom di to you guda to Thomas and Bones Diaz Antonio my friend and colleague Antonio Santiago bues Diaz Michael good morning helmet mo mo to brke Brunswick in North Germany Abu hi

    To AB in Bangalore welcome everybody this is this is amazing good morning Henry so so I apologize I’m just recovering from um oh dear two or three weeks of flu and you know what I’ve been getting up in the morning and I you know I uh I’m I’m

    On my own on the boat here the narrow boat of M I’ll explain a little bit more about that in a second but because I’ve not I’ve not spoken a word this morning you know as soon as you start speaking I don’t know you get ill again

    I don’t know hey hello hello hello Chik CH uh sorry sorry chakia chakia is that how you pronounce your name I I probably butchered that to death Stefano good morning to Barcelona madav good morning arif’s learning Arif learning lab hello in Bangkok as well hello DJ DJ the OG

    That’s quite hard to say and Matias Matias how’s the sticker game going on your laptop I think I think Matias always uh always impresses me with the number of stickers on his huge laptop good morning to Matias in Dortmund I’m super excited um this is like I say the

    First uh the first live stream of 2024 we’re back with a vengeance and uh we got a new design uh you know new scenes and layouts thanks to another one of my wonderful friends and colleagues Nico sh um and oh good morning darid and Lucas good morning to Poland excellent abet as

    Well oh AB good to see you as well uh so fantastic now um what oh yeah just want I’m I’m broadcasting broadcasting is that the right word streaming um from a new location so I think the last live streams we all did together were in sort of late summer Early Autumn early fall

    Bethal good morning B Diaz to you in Spain um to uh in in August September and I was um what was I doing then I can’t remember anyway anyway now I think this is the for me this is the first live stream let me just switch to uh the main

    Scene the first live stream from a new location and that new location you can sort of see here open image new tab maybe uh you can sort of see that’s my new location so I live on a narrow booat uh on the English and Welsh canal system

    And in fact I am right now the the thing you can see behind me the window you can see behind me is well it’s a pair of Windows on this little duck so-called duck hatch so that’s exactly where I’m sitting at the moment there’s my internet connection there’s my uh 4G 5G

    Omni directional antenna so I’m coming to you via that antenna so there we go and inside so if you if you were to open these catch doors you would see this is where I’m sitting right now you would see um this is where I am so I’ve got

    Quite a nice space and so this is literally where I’m sitting right now I’ve got my Chromebook monitoring the chat but also monitoring my uh containers I’ve got my main screen I’ve got my Elgato key light like camera and everything so yeah there we go uh so

    It’s great to see everybody it’s great to see everybody sarup Krishna Phil good day Phil to down under this is amazing absolutely amazing so um what are we going to do well let me let me explain a little bit more first we’ve got that’s us right now and

    In 24 it’s going to be even more exciting and uh I’m looking forward to this as much as you because we’re not only live streaming on Fridays as usual but also thanks Lu and thanks Phil uh but also in fact I’ll share the um I’ll share my hacky profile

    Anyway I’ve got a little chat here woohoo oh by the way um there we go there’s the we’re going to be referring to that URL there there is the thing with the picture on it and also um there’s uh there’s the post on my blog uh where

    You can see the picture of literally where I’m sitting right now anyway anyway anyway let close that close that close that so Antonio is in the chat as well I know you said hello before Antonio but say hello again Ian good morning Ian fellow Runner fantastic

    Perfect setup well you know it’s um I you know what this um this these fairy lights behind me of course i’ got them still from uh from from having them up at Christmas but I put them across there I was inspired by another live streamer

    That I watch a lot which is Brett Fisher uh in fact if I go to here Brett Fisher there we go Docker and devops let me share that as well he’s back he’s back uh I I really love this uh this channel Brett’s got a lot of stuff on Docker devops cubetti swarm

    Everything hi Antonio there there we go nice little Segway to CPU memory Graphics yes yes good morning Antonio to bomia in uh Portugal there we go uh so yeah so we got Antonio also live streaming next week on what day is it it’s on uh wed Tuesday or

    Wednesday it’s midweek isn’t it um so there we go so let’s have a look live in five days I think it’s Tuesday isn’t it Antonio let us know Antonio when it is I can’t work out which day in my head right now so we got a lot of things

    Going coming so with the new design as well Antonio’s done a live stream already that’s that’s why it’s number two but that’s why ours for example number one this is the first episode of a new series Hussein good good night to you in Istanbul welcome welcome welcome himansu hello as

    Well uh so this is the first number one episode of a new series where we’re going back to basics so I think I’ve had we’ve all the Advocates have had feedback um from doing code jams from tutorial participants from Dev toober Fest at the live stream’s on Wednesday thanks Antonio the Antonio’s

    Live stream is on Wednesday make sure you go over here and subscribe to the channel I’m on this is my know this is the sap developers ID now but subscribe to the channel and then hit notifications and everything so you get the notifications fcan good morning to

    You as well and welcome so um I’ve lost what I was gon to say now uh oh yeah so a lot of folks have asked for a sort of a Back to Basics and more fundamentals on cap okay we have done on hands on SCB Dev a number of sort of miniseries on

    Various aspects of cap sort of quite Niche things like man in fact you can if you want to look at those we have the playlists here where are the playlists here for example I’m hoping I can find them straight away yeah so we did a we did a live stream series on managed

    Associations um and we also did a live stream series on service integration so those are quite sort of focused but really what we’re going to be doing in this new series is just going back to basics and starting from absolute scratch um and dispelling any fears or

    Questions you may have so that’s the other thing during this episode and all future episodes and I’m sure Antonio would say the same thing as well with his live streams and all my other developer Advocate colleagues who may or may not be doing live streams in the future in

    2024 the whole point for you and for me is that you can ask questions we can interact in the chat because I’m monitoring the chat down here you saw that little Chromebook uh thing on my desk I’ve got the chat there now so I can see people saying hello and

    Everything so there’s no question too silly to ask okay I might not be able to answer it but we can work it out together I it hello Amit and welcome so um it’s all about cap sap cloudification programming model and what I thought we could do just today

    This first episode is start really really simple and I wanted to start with a setup it’s very warm actually I put the fire on but it’s quite warm now in fact open the window maybe not um that door there there we go that’s better um so that’s the door to the bathroom by

    The way so if you look in fact if you look at the this is this is just completely going off piece if you go to my blog and look at this for this latest blog post that’s where I am so right now open imion new tab that’s where I am

    There’s my desk and there’s a monitor there and I’ve just opened that door to the bathroom there we go anyway anyway that’s just too much information um if we can do this so that everybody can follow along either live while we do it and some of those folks who are crazy

    Or silly or brave enough to do that would be amazing let me know but I want to do this uh in a way that everybody can play along now the web page we’ve got up here welcome to cap the cloud application programming model this is known colloquially internally as well I think

    Some people pronounce it Kayo I pronounce it capaya which is sort of not really authentic the idea is that it’s uh play on the Italian word cap who is any anybody from Italy here who can uh who can correct my pronunciation but capir is obviously to understand to to

    Gro okay and the whole point of capire is that it’s documentation that helps you understand cap right so and it’s a wonderful resource so we’re going to be going through over the next few episodes the getting started okay partly because you know I can’t think of anything better because this is great

    Partly because I think these days I think we sort of need certainly me I speaking for myself but let me know in the chat we need sometimes a reason to go and stare at the documentation and work through it so we’re going going to be working through this documentation together because it’s

    Awesome the other thing though is that hey poke poke geek or is it Pokey geek is it as in Pokemon or poke as in Peak and poke from the home computers of the 1980s let me know uh but hello anyway um so the the point is that we’ve

    Got this getting started section and we’ve jumped here getting started in a nutshell from the big get started button here however however however however okay all this getting started here assumes that you’ve got the appropriate tools and libraries and everything set up RTM Antonio Antonio says RTM I think

    You’ missed out a letter there Antonio I think that letter might be F and I think we’re allowed to say rtfm maybe not spell it out loud but yeah rtfm you know what I capir so Lu L is saying capir excellent um yeah so the jump start guide which is this jump

    Start development the one before this is like the description of what anybody needs to do to set up for local development and I’ll say up front as well I said this in the uh we wrote this in the description of this live stream episode that we’re going to be focusing

    On node.js there has been a question about Java I’m not a Java person uh maybe we can get somebody on to to S cover some of the Java aspects because it’s also awesome it’s Pokemon itself poke geek excellent um there’s probably only a few of us around here that old

    Enough to remember Peak and poke those commands on the 8bit computers of the 1980s where you could read and write memory locations directly anyway um so we’re going to be doing no. JS now if you have a look at uh the table of contents here if you want to set up for local

    Development right which is what we’re going to do because one of the beauties of cap is that you can develop it in the cloud for example using Sab business application Studio or Dev space there or a code space on GitHub or whatever right um but quite often and and embracing the

    Beauty of this sort of fast Dev turnaround you want to be be able to develop locally on your own machine however I was thinking hm if you want to install for local devel set up for local development any of you out there including me on your

    Machine whether it’s a Windows a Linux a Mac device you know whatever Chromebook Chrome OS all these different things you need to install node.js you need to install the CDs DK we’ll talk about what that is shortly you need to install git SQL light if you’re doing Java cap you

    Need to install Java Maven and you need to install Visual Studio code vs code I mean you can use any editor you want vs code is what uh cap um promotes because a it’s pretty a pretty awesome editor and it’s available for all platforms and also of course the sap

    Business application Studio Dev spaces are also based B on the open-source components of vs code code OSS I think it’s called okay so I think when when was it Antonio I can’t remember maybe two or three four months ago they switched from Eclipse Thea as a basis for the depth spaces in the

    Business publication Studio to code OSS and it’s awesome and it allows for a little bit of a better sharing of extensions between actual vs code and Dev spaces in the business application Studio and also of course GitHub code spaces are basically also the same as Dev spaces in the

    Business application Studio or vice versa so it makes sense to have a vs code based set however however however you know having spoke to many of you during code jamps a lot of you have you know laptop configurations that maybe prevent you from installing these

    Sort of things and you don’t want to or you not allowed to install things so what I’ve decided and also because I’m you know I’m obsessed with everything in containers what I want to do is go on this little journey with you with the minimum footprint possible on your

    Actual laptop so that you can do all sorts of things without messing up your laptop installing you things having to maybe have admin rights and so on and so forth so all I’m going to require you to to install if you want to follow along is

    Vs code and also a container engine now this is not a container Series so we’re not going to get into the vagaries of you know Docker desktop versus podman desktop versus lxc all these different container Technologies for the purposes of learning I use Docker desktop okay and for anyone

    Learning personally you know this is free so it’s great now if you’re using it for your corporate work for your for the you know for your client sorry for your client for your employer there may be a contract in place with Docker to use Docker desktop with a license

    Version brought from a personal learning perspective you know that’s what I use and it’s awesome I mean again like I say you can install pod man deskt and use the same sort of thing but I’m going to be using Docker desktop so all you need is Docker desktop vs code and

    That’s it okay so with that in mind let me show you what I’ve set up for us so that we can start on this journey helmet containers thumbs up excellent Nico good morning Nico Nico how come you haven’t got a um a spanner next to your name uh you should we’ll

    Talk about that later you should have admin access as your own personal IDE anyway fan yes oh oh does anyone have experience in build oh sorry I missed that question does anyone have experience in building a cap software as a service without any DB just projections on public apis yes and Nico

    Answers it’s literally as simple as not using a DB yes I mean it’s it’s a beautifully uh flippant but well well meaning uh reply but basically that’s exactly what it is what Nico says so effectively you know to to to run a cap service you can either have you know

    Persist layer and that persistence layer can be you know anything like you know SQL light but there are you know there are sort of things to think about when you’re using SQL light which is a a file based uh SQL storage system to something like postest or something like

    Sap Hannah sap Hannah cloud and so on you can also run a an inprocess in memory SQL light database for sort of you know ephemeral data if you’re just doing sort of calculation SE and so on or you don’t need any database at all and the other thing is that you can

    Build a cap service that is effectively a proxy so you integrate other services we we do we’ve got a Cod jam on this we’ve got a service integration with cap that is all about bringing in the definition of an API a public API in this case an S4 hanter

    API and then sort of wrapping that with some uh new entity definitions some schema definitions to sort of minimize the the exposure that we want to control of that public API in a new API sort of putting a you know a veneer on it okay there’s no database involved there right

    So yeah absolutely uh super straightforward with cap you’ll find that one of the one of the beauties of of cap is that what’s that phrase it makes simple things easy things simple and hard things possible something like that pearl easy simple hard possible is from oh yeah making the easy

    Things easy and the hard things possible there we go inspired by uh the creator of one of the most beautiful programming languages in the world pearl of course and that’s what that’s what cap is for me as well okay um so here we go also there’s brilliant discussion between

    Nico and fulan I’ll let that continue because what I want to show you is in uh oh by the way by the way the sap devs the latest developer news is out let me share that oh yes let me share that URL there across here Bang there there’s the latest sap

    Developer news now let me go across to this ridiculously small deliberately small starter okay it’s got read me which is literally just that title so that’s useless and then it’s got this directory called Dev container which is like a well-known name and vs code will recognize that

    When it starts up and says oh there’s something in here that’s important in terms of running within a container okay so this will allow us to all read from the same page and all do the things together so all you need is vs code installed I’ve got VSS code started up

    Here it’s completely blank slate I’ve also got Docker running now one of the uh things in here one of the files is this Docker file this Docker file basically will give all of us the facilities we need the tools that we need that is described effectively on

    This page on this page here so we will have no JS which is in fact let me put that side by side there there we go we’ve got there we go that’s better uh uh so uh we have um the nodejs image from Microsoft Microsoft container registry it’s the node uh the

    Node 20 uh container image okay and uh we also then install some tools it’s basically based upon I think a Debian a Debian distribution of Linux now the other thing is the other interesting thing is that um the container you will have regardless of your underlying operating system whether

    It’s Mac OS or Windows or Chrome OS or whatever the operating system that’s running in your container or in your Dev space in sap business application studio is Linux because Linux is everywhere the cloud is just made up of Linux machines okay so the sooner you embrace the one

    True operating system Unix Linux Etc um that’s my personal opinion of course um the better so we’re we’re using a Debian based operating system you don’t need to know this by the way this is just giving you the background because what I want to do is leave no stone unturned in

    Terms of do this do that do the other I want you to understand what we’re doing by the way um let me know in the comments whether this is interesting useful whether it’s too much information noded enough information um more questions more questions more questions rhl

    Oh is that Red Hat Linux Arif is that Red Hat Linux is what you’re talking about um yeah cool so we’re going to install three tools curl of course you know the command line HTTP client which is awesome git so we can do some uh source code control and SQL light three

    Because at some stage not today at some stage we’re going to want to use SQL light as a persistent store when we’re developing our cap service okay by the way does anybody anybody know why I’m deliberately using the word cap service instead of CAP app okay let me know in

    The comments and let me know what you think the difference is between a service and an app from a from a microservice perspective from a cloud software or service perspective from a cap perspective from a cap directory perspective there’s a bit of a hint there let me

    Know and then once we’ve installed curl git and SQL lights through three which is the command line tool because then with SQL light 3 we can actually look inside the SQL light database files and say oh there’s a table oh there’s some row rows in that

    Table then we’re going to set the user to nodes because we don’t you know we don’t want to run as root in the container then we’re going to install this thing here okay so for those not familiar with what npm is and what node is so node is effectively

    JavaScript but it’s JavaScript on the server side and it’s a little bit more than that in terms of you know it’s a it’s a a an asynchronous event based uh engine and there’s a package manager just like there is for many many other languages generally uh so cpan is the

    Package manager or the package system for Pearl and I can’t think of cargo is the package management for rust you know all that sort of thing um so npm node package manager is the package manager for node and the cap engine and tools development tools are all

    Available as an npm package and they’re all prefixed you can see this at sap here at sap this is like a nam space they’re all prefixed with at sap so these are you know you can tell these come from sap if we go to if we were to

    Go to npm I’ve got a little you know Chrome search thing here uh sap fact at sap CDs let’s do SAP CDs first of all and not CDs DK there we go so we’ve got there’s the node package node package nice nice little playful thing here each

    Time you go there it’s got a little different different meaning for mpm nitrogen peroxide monoxide what it going to say next refresh oh maybe it doesn’t change I don’t know who knows um cap so uh utash says cap services are microservices an app is a service and

    Yes exactly I mean an app is a Services an app is a Services an app what I in my brain when I say service a cap service I’m thinking headless I’m thinking a service with no front end with no guey with no uii fiori view react angular whatever

    Web front end I’m just thinking of a service in terms of for example a no data service a headless service that then other things can attach to and consume okay and with cap quite often folks use cap to build headless services but also cap has the

    Facility to allow you to put together a front end and Cat will also serve that okay especially when you’re building and uh in in this sort of tight Loop development cycle locally and we’ll see that with the different the three different folders this there’s a hierarchy the the

    Triumvirate of of uh folders of directories app serve and DB so we’ll come on to that okay so here we go we can see sap CDs and there’s also sap oh Rising there we go hey hey Martin sap CDs and um Sab CDs DK okay Sab Cloud application programing

    Model I to hit search sap CDs DK there we go a direct hit now the difference between sap CDs and sap cdsd K notice here there’s sap sap Cloud application programming model CDs for node.js think of this package as the package you need the runtime package the

    Lean fat free cap runtime package okay so when you deploy your application to the cloud your cap service is going to need uh Lu yeah do I need to install something do yes you need to yeah Docker you need to install Docker desktop and V s code and that’s it you

    Don’t need to install node npm git anything else just dock a desktop and vs code and that gives us the beauty of abstracting everything so you’re not messing up your own personal computer your laptop whatever with stuff that you don’t want otherwise okay so this is the the lean fat free

    Runtime for when your servic is running in the cloud but for when you’re developing you want all of that lean fat-free run time plus the extra fat and the extra goodness and the beauty and the tools that allow you to develop in the most efficient way possible can anybody tell so a classic

    For those who have been developing with cap already there’s a command that you run when you’re sort of halfway through development and you sort of you know you’re in this sort of flow of making modifications and seeing those ch changes in your service but you run this this this CDs command CDs

    Something what is that command that you run that command the one I’m thinking of the one I’m hoping somebody will say that command is part of sap CDs DK is part of the development kit because it makes no sense to have that restarting command this sort of development type Loop cycle

    In the cloud when your appap is just running headless service so there’s the difference the CDs DK is a development kit with CDs in it but lots of other tools and then sap CDs itself is just the sort of the the run time version does that make sense I’ve

    Got a bit overboard there okay but what we need to do because we’re going to be developing we want to install the sap CDs DK hasita welcome hasita one of the uh many lovely people who uh partook and was very vocal which is brilliant in the uh developer challenge API in fact one

    Of the uh uh one of the superheroes there fantastic CDs W exactly maybe maybe we we need a command so that I don’t know the more A’s you have in watch you know the more things it looks at to check whether things have changed to restart I’m quite cool hey hello to

    You in bangalo once we’ve installed csdk that’s it okay so this sets up a container with everything you need with all this stuff in it okay and also the beautiful thing is you’ve also not only got the container definition but you’ve also got this sort of thing that tells vs code

    That how to use this container okay so Back to Basics sa cap Dev container it tells you where the the docker file is which is the file we’ve just looked at but it also oh got horrible spacing there sorry about that um it also tells vs code what extensions to install now

    If we go down here install Visual Studio code from code.com it will also tell you or recommend some extensions so one of the reasons for using vs code is because there’s a CDS language support extension that helps you at ton with devel in cap services and cap applications we’ll be using that and

    Looking at that so it’ll gives you it’ll give you linting it’ll give you hints it’ll give you formatting color coding all that sort of stuff okay that’s that’s that okay so that’s why that’s um recommended es lint is a more General sort of you know linter that will lint

    JavaScript okay linting is basically you know Finding issues and saying oh by the way you should do this and don’t do that and that’s wrong and bad practice etc etc so ah yeah so Arif Arif is is he hammering these uh these in here hoping to get one of them that’s fantastic yes

    AR a CDS watch CDs deploy as well I think as arguably a development kit tool as well uh so yeah so exactly so CDs watch is what I was sort of aiming for or thinking about because it’s a developer it’s something you do as a developer you know I want to watch this

    Thing I want you know and have the cap server restart automatically because I want to see my the the effect of my changes as I’m developing as fast as possible the documentation the Capa documentation talks a lot about this sort of tight development Loop cycle thing uh which is

    Brilliant so it also installs uh it also recommends es lint uh so AB I think dock desktop is something new now as early it was not part of ah okay so let me be clear Docker and Docker desktop is not part of a cap project this is my recommendation my personal DJ

    Recommendation for you if you want to play around with this you don’t have to use Docker you can install all the tools you can install all the tools as normal as in uh where’s where’s the list here node.js the npm package CD SDK you got you can install git you can install SQL

    Lights and so on right and you may also want to install other tools that help you more generally with development like the watch command or I don’t know can’t think of anything off the top of my head you don’t need dock a desktop for cap at

    All it’s only if you want to tread as lightest possible on your own machine and also partake of this sort of shared experience where we’re all working in exactly the same environment okay that’s all you could you can you can develop a cap without Docker without

    Containers at all okay just let me be let me be clear AET yeah do that does that make sense I’m just conveying this as the simplest way and the the the most light footed way of starting so in here we can say in this Dev container. Json I would like in my

    Container that we connect to from vs code this this extension the Cs language support the eslint extension if you go for example to es lint here why what’s what the heck is this name here D Bo Boer vs code es lint that is because there we go there’s es lint if

    You have a look at the actual technical name that’s the name of the actual extension so if we go to hum rest client there if I put that there will this work probably will do let’s have a look Bang there there that is also rest L there that’s the rest client

    And so on and SQL like viewer okay fine uh there’s the SQL like viewer and also rainbow CSV to color code you know color different Columns of CSV when we’re looking at CSV pathy exactly so pathy ask a brilliant question is bass enough instead of all these tools uh bass is

    Enough in that in fact yeah in that um the business application Studio Let’s do let’s go let’s go there let me go to my trial account uh the business application studio is available to all folks having a trial account okay ABG brilliant no problem at

    All this is exactly what I I love and I want you to do this all the time ABJ asks a brilliant question okay it wasn’t obvious to abjet or to maybe other folks as well so ask the question fantastic fantastic fantastic fantastic okay instances and subscriptions I can’t even say it um

    I’ve got a subscription to the business application studio in my trial account you can get trial account as well for free and um you you can get access to the business application studio so let me go in and answer that question from parthy because I think is

    Really important so let me to create a new depth space so I can say uh cap B2B for example full stack Cloud application right in fact let me make a full screen you can see here that the full stack Cloud application Dev space gives us all these predefined tools and we can also

    Choose some additional extensions if we were for example to want to develop uh a cap service with an sap hand cloud back end we might want to install some sap hand tools we won’t do that now we also have a code on that by the way we won’t

    Do that now we’ll just create a step space in fact I should have pressed that button before talking anymore because it takes a few minutes to do that so why let’s remind me uh let me don’t need that let me delete that one anyway so

    Pary remind me in a couple of seconds to to come back here and uh see if the dev space is started but meanwhile we’ll go through so that finally can anybody tell me and again lots of people will know this answer but that’s the whole point right

    Can anybody tell me what this is all about forward ports 404 I’m going to wait for a second and tell me in the chat what that means by the way while I’m waiting I’ve got this box out one of the very early Amazing Friends of hands onb Dev excuse me Mr Ronnie

    Sletter developed some amazing stickers so we have the original handson Hands-On ASB Dev stickers for your laptop so in fact um lots of folks uh have these and we’ve also got some new stickers relatively new stickers based upon can anybody tell me what that computer is based upon this amazing PC home computer

    Whatever with hands on SB Dev and it says 10 learn 20 share 30 grow 40 go to 10 there’s a history behind that why that says that so and also we also have lots of these developers developers. sep.com stickers so here’s here’s the thing oh I’ve also got some batches as

    Well look at that slh hobble mode in AB up and uh what’s this one eat sleep code eat sleep code no repeat I don’t know why it’s no repeat anyway eat sleep code if anybody would like me to send them through the post some stickers we I used to say send me a

    Direct message on Twitter I’m not on Twitter anymore so instead find me on LinkedIn and send me a direct message on LinkedIn and then we can chat and you can give me a a PO a postal address to send the things too I’ll send you a few stickers it might take a while

    For me to get to the post office because I’m obviously on a boat uh but I’ll send them okay doesn’t matter where you are in the world I’ll send them uh so let me know okay so you’ll find me on LinkedIn I’m sure uh so there we go Okay so we’ve

    Got some answers here uh K Steeler says for the internal container port to the external service perfect that’s a beautiful succinct uh and perfect answer from a Docker container perspective so obviously when something is listening it’s bound to a socket and listening on that Port Port 404 in this case inside

    The container you can’t from your actual PC my Mac OS machine here for example I can’t connect to that socket I can’t go there so this is saying expose that Port 404 to the host machine to my Mac OS machine so I can in my web browser

    Chrome go there okay and Arif says by affording Port 404 you can access the running application in your web browser exactly right uh helmet you can find me on Master on as well exactly send me a private message on masteron if you want as well in fact masteron there we go

    That’s that’s uh where’s me how do I go to my profile ah there we go there there’s my profile I’m Mastered on uh there so uh yeah I’ve um that’s DJ by the way me um I’ve moved away from Twitter and I’m now master I encourage

    You to join masteron and Helmont you can tell people more more about your amazing server on masteron if people want to don’t know where to join and everything so there we go uh we don’t need that we don’t need that but the key thing is the key thing is 404 is a very

    Cap specific Port okay it you know it’s just a randomly selected Port by you know caps bdfl benevolent dictator for life it could be any you know any High numbered Port but Daniel Cho Daniel hell chose 404 Maybe next week I’ll tell you why he chose 4,000 I think some people know I

    Think I’ve said this before but it’s a very interesting non-technical reason why he chose Port 4,000 or4 so for example you know uh you might have a local web server listening up 8,000 doing things you know whatever you know that what’s the default Port of engin X I can’t

    Remember I seem to remember that um Ruby on Rails I used to program with Ruby on Rails and that default Port was like in the three something series 3,000 anyway doesn’t really matter but 404 when you see 404 that’s sort of caps default local Port okay

    So let me get to the place where just register I will let you in yes but hel oh um I think did you try and put a URL in there um I’m not sure the UR didn’t didn’t appear so let me put the URL in is it uh sapad on.org

    There we go that’s sapad on.org I’ll put it in there Bang there um maybe it filtered out or something I don’t know um so there sat on you can create an account there so helmet is very kindly running out for us so this thing here if we now go here let

    Me close that close that oh it’s running there we go so go back to pathy you didn’t remind me come on Pary pay attention just one more moment your velopment is starting to open about to open so what I can do what we can all do

    Here let me just do that here as well what we can all do is go to cat B2B again try not to use G git because we don’t I don’t want to require to install git we can say download zip okay and you can download the zip file which should download these

    Files download zip I’ve already downloaded it there and then I’ve also there it is there um Let me let me clean that out okay so now I can say unzip let’s have what’s in it first of all C you don’t need to use a command line tool to do this you can

    Do it with a you know a normal you know gooey zip thing if you really want to but all it’s got is exactly the content of what’s in that git repo so I’m going to say unzip uh that and it’s going to unzip it into a directory called CAP btb

    Dmain so if we have a look now CD cap btb D main what we’ve got in there is the read me but if we look at all of it in fact Let me show let me show you in a a normal thing because this is a Back to

    Basics there we go scratch cat B2B main we go in there and then I don’t know why I can’t set this as a setting can I set this as a setting um there we can show the hidden files the ones beginning with Dot and we’ve got those two files that

    We looked at there then once you’ve downloaded this ZIP file okay so you can go to um where is it again uh go to not there go to there which is Cap B2B uh where there cap B2B fatty hello to you in Istanbul hello hello hello go

    There and download it unpack it and then start up vs code so in fact I’m going to close vs code start up vs code okay now one of the things you will need in vs code is the dev containers extension let me um go there Dev containers there install the dev containers

    Extension so that okay so that you have access to this thing down here right it goes like that if I click that we have all these different facilities to open remote resources but all I’m going to do for now is do the simplest thing that could possibly work let’s get rid of this

    Extensions thing and say open folder okay I use the word directory all the time vs code uses folder I think a lot of sap literature uses folder as well as some maybe a I don’t know a more windows I thing I don’t know so directory folder same thing okay open folder now I’m

    Going to open that folder okay that directory cap bb- main now what does it say it says here the folder can oh the folder contains a Dev container configuration file reopen folder to develop in a container reopening container okay so what’s happened is vs code has opened that

    Directory it’s seen the readme file but it’s also seen this wellknown don’t need that one this well-known directory name called doev container okay it’s actually it’s actually now an open standard by the way Dev sorry containers containers dodev containers dodev amazing a there’s so much stuff to

    Learn here um and what that’s done is it’s Rec recognized oh there’s AEV container directory here let me look in there and let me offer the user DJ the ability to restart or reopen that directory so that you’re working inside a container with that directory attached okay so now because in the container

    Definition we look in Dev container here I’ve got it to install curl git and SQL light three let’s just try to see curl there it is get there it is SQL light three there it is so we’ve now got all the tools inside the container now I don’t know whether I

    I don’t know whether I’ve got uh curl I’ve got Cur I’ve got curl obviously I install curl everywhere git I’ve got git here as well but you might not have SQL light three I’ve got SQL light three there as well okay fine but that’s me you may not have any of those

    Things on your actual local machine that’s the whole point of doing this in a container so you don’t need to install it on your local machine what else have we got though what else have we got the most exciting thing we’ve got the result of this thing

    Here we’ve actually we’ve even got node let me go here right we’ve got node good morning Javier and welcome old friend from the live stream fantastic good morning good morning good morning so we’ve also got n node there we go we’ve got node 20 just as our definition our Docker file definition

    Specified okay there’s that variant sort of you know substituted not only that mpm list Global so I’ve said show me the packages that are installed globally and look we’ve got CD SDK PN PM I have no idea what that is maybe it’s maybe it was installed because CD SDK needed them I don’t

    Know but the key thing is we’ve got CDs DK installed so we’ve got everything we need now oh volume volume up please oh right okay volume up I’ll move this microphone here is anybody else maybe maybe try your volume uh bis M as well but people let me know if the volume is

    No good people let me know if the the the resolution is no good the old uh the old friends of the channel will know that I want you to tell me if anything wrong if I can do anything better so I’m going to move a bit closer to the

    Microphone let me know if that’s better BM but also try and turn your volume up too uh and see if that helps oh my cof’s gone cold a drat anyway so we got everything now the moment of truth pnpm is a monor rep thing for npm

    Thank you Nico see any Nico would know uh volume is good thanks AP volume is good loud and clear Daniel oh my goodness ah so no pressure but this this is always this always happens right so Daniel is one of the many superheroes in the cap team it’s

    Like oh my God better not say anything wrong I don’t know what I’m do I don’t know what I’m doing but the thing that’s that’s better for us right if I don’t know what I’m doing we can find out together so the drum roll somebody give me a drum

    Roll I’m not sure how you give me a drum roll in the chat but the drum roll thing is that in this container ah yeah let let me do this right here is my Mac OS machine right if I say CDs command not found CDs CDs is

    Basically the command line tool that you will use for developing your cap service your cap app does everything it’s amazing right we’re going to be discovering all the things about cap through the magic of the CDs command line tool okay you’ll see it actually

    Here uh there we no uh if we go back to um there go to get started we’re going to be hopefully before I stop ra when I stop rambling right we’re going to do CDs init Bookshop okay 10 minutes right got 10 minutes I haven’t got CDs on my local

    Mac machine but I have got CDs yes da on in vs C because I’m inside my container oh thank you P padara padara sorry padara thank you padara excellent drum roll there so we now have the power of cap and our fingertips so we can now start also let

    Me know in the chat if you’re if you already have done or you’re planning either now or between now and next Friday when we’re going to carry on with this this okay this is going to be a multi episode series and that’s why I’m deliberately allowing myself to sort of

    Ramble a little bit and make sure we cover all the ground as we’re moving very slowly because you know we this is like almost not quite but an open-ended series of episodes okay this is for you and me to find out together all about the basics of cap right

    Fantastic thank you AP as well so let’s go to here so if we go to capier again cap get started we don’t need to go through jump start development because that’s all about setting up the tools which you’ve done already and this also then also tells

    You about jump starting in fact let’s do this let’s do this because we want to explore this this documentation page CDs init Bookshop now let me make that one smaller maybe and let me move I know my head’s over there but that’s that’s proba fine isn’t it oh by the

    Way ready I’m going to move my head to the bottom bottom top you oh by the way uh again everybody give Nico a round of applause in the chat for these awesome um scenes so I can for example you know go to secret I know I’m not

    Going to type anything secret here I can go for a coffee I’m back I’m back amazing amazing so thank you Nico for all that it’s fantastic so CD c s init Bookshop but before we do that let’s say CDs init d-el okay help is your friend d-el and this gives

    Us uh there we go let’s move that across here it’s a bit too small isn’t it let’s go back and make it a bit bigger and just scroll scroll up and down so what are we doing when with CDs in it okay because CDs the CDs command line tool does a lot of

    Things it for example will do a onetime activity like initialize a project which we’re doing here but it will also when we give it the right command sub command let’s call it it will also start up and run an actual cap server okay I’m using the word server instead of service here

    Oh I thought you giving yourself clap but that’s a thank you isn’t it yeah nice one Nico um so here what we’re saying is CDS init Bookshop initializes a new project in the folder project okay so it’ll take CDs in it Bookshop and it’ll create a

    New folder I’m going to use I don’t like using the word folder but I’ll use the word folder because you know get with the program DJ um in the in the folder called whatever you say with the current working directory as default if we don’t do anything else that’s what it’s going

    To do we’re going to play around with these add features in a minute okay but we can go from zero to superhero oh L thank you for asking that question so Lu is saying I’m a little bit confused sorry you are running vs code inside of dock desktop no what I’m doing but

    That’s a that’s that’s easily what something somebody might think I’m running vs code on my Mac machine if I scroll through the you know apps on my Mac OS I’m running VSS code I’m running a terminal I’m running Chrome I’m running stream lasts desktop for this live stream I’m running slack

    Because of because slack um so I’m running running vs code natively on my Mac OS computer here there right but the vs code itself is connected to a container image okay if I go to here you can see there’s a container called keen banak and it’s got this vs vs code so

    It’s basically I’ll show you here it’s easier Docker uh container LS oops Docker container l s there so that’s this thing here by the way this sort of nice display of containers images volumes and networks and everything that is called lazy Docker so that is that that one let

    Me make it smaller so we can get it on one line that’s lazy team lazy Docker the other container that’s running is the container that vs code started up when it saw the dodev container directory in the folder in the directory opened and what vs code did is create a new container

    That’s the container it created there based upon which image the image that was described in the dev container Jason so that’s the contain that this is the the docker file itself but the dev container Jason says create a container based on the information in that Docker file okay does that make sense

    Perfect yeah I was I was I’ve got to say I was wondering about whether this would be a little bit of a bumpy start but once we once we started in containers then everything we can do we don’t you know we don’t have any vagaries or

    Weirdness oh I can’t install this on my machine or oh this is not working I got the wrong version of node or whatever we all have the same version of node we all have the same version of mpm we all have the same version of cap blah blah blah

    Blah all the same experience right and it’s exactly the same oh yes here we go uh where’s the where’s the um oh it’s here isn’t it um there get started so parthy was it pathy ask about this so I’ve got a Dev space if I open up a

    Terminal um there we go user CDs there we go we’ve also got CDs that it’s Cap’s everywhere cap is everywhere so we’ve got CDs there as well so if you want you can do it in a Dev space on sap business application you we’ve also got you know

    Because Dev because the dev spaces are pretty cool you’ve got git already you’ve got Cur so you’ve got also you got all the tools there as well have we got SQL light three yes you got SQL light three as well so you could you could do it like this instead in fact

    Before we uh before we close off that idea if we go to here you could also in GitHub open up a code space in fact I just opened up a code space based upon this repo redesigned potato what a brilliant name so let’s just let that

    Run as well so you could do it in a GitHub code space as well it’s all the same right it’s a container so that is no worries it got I’ll just close it that is a container where is it h this is a container look

    It’s a code space and it looks like it looks like a de space in business application you do because that’s exactly the same thing right it’s okay so there we go so this is in on GitHub so once we get terminal once it starts up opening remote and everything

    You know it’s all the same thing it’s all in a container right so uh there we go so we can do that so if we let’s do that right so let’s close open screen uh open close clear the screen so CDs init Bookshop let’s do that and see what

    Happens right so one of the things I want to do is read through all of the uh log lines the output so we understand everything adding feature no J so if we CDs in it help there add one or more features while creating the project okay and by

    Default it will create because you know because we’re sort of running in a no context I guess but anyway it will it will will create or add this feature no. JS okay so if you wanted to create a javab base project you’d say CDs in its um Bookshop

    Do– add Java okay and there’s all sorts of features here which we’ll look into over the course of the next few episodes it’s amazing it’s amazing right so so what’s that done okay it has created a directory called Bookshop in there it’s created the trium of

    Directories app serve and DB I had a conversation with um I think it was Daniel actually it’s like it’s so unfortunate that the names of these mean that they’re not in the order my brain thinks of them thinks of them right so the final thing the final thing and

    We’ll look at these directories next week but if I say CDs watch which is a CDS DK subcommand okay what happens right CDs watch startup but there’s nothing there right there’s nothing for it to serve right no models found and we’ll look at the details of what this

    Means and what we can do in fact let’s do one final thing split terminal let’s open up another terminal so we’re still watching here if we say CDs add d-el we can see that we can add things to our current project so if we say CDs

    Ad uh sorry CDs add tiny sample this is all you need to have a a little bit of a taste Right add that oh sorry wait a minute Bookshop CD Bookshop get in the right directory DJ CDs add tiny sample uh what what what what what map DB data

    CDs model oh ah see I’m in the wrong direction here as well ah that was a bit of a annoying thing Bookshop there so let me in fact Let me let me let me say do this rmrf uh Las thing DB Star serve star right now we’ll start CDs

    Watch we got no models and I’m in the right direction this time DJ idiot now I can say CDs add tiny sample check it out what happens here so let’s do that move that down there all this beauty all this Beauty look at that all of a sudden it finds

    Stuff that the CDs at tiny sample has done it’s given us a little bit of a data model books it’s even give us some data my Bookshop books in Heights and Jane air it’s even given given us a service definition we’ll look into what this means and it also means that we can

    Now go to Local Host 404 and we have without lifting a finger hardly a fully functioning V4 o data service there’s the metadata oh my goodness me so let’s stop here uh amazing amazing comment from K steer you can use a c tool to automatically add app rout oh my

    Goodness me oh yes you can CDs add help there we we go check it all out look at all these things you can add here oh amazing amazing amazing so next week got to dig into what just happened okay so between now and then between now and

    Then get yourself set up either in business application studio in a Dev space or clone this repo and set up a um where is it gone I don’t know ah set up a thing oh there we go so this is on GitHub look CDs bang done you can do it

    There as well or do it locally in vs code and uh desktop or podman desktop whatever see you next week same time same place Friday thanks for joining and see you soon

    11 Comments

    1. I missed the 1st live session of B2B 2024 but have done it offline already. This was the first time that I ran cds init help and I am impressed with a long list of useful options out there. Thanks a lot DJ, looking forward to the next one.

    2. Thanks DJ. Appreciate your guidance to the community. Great Session and loved using containers for the 1st time. Love your way of teaching people from the basics.

    3. HI Dj, its a wonderful learning video series . i am running VS code in Window 11.
      Please check below error while doing cds add tiny-sample.

      PS C:UsersALOKDownloadscapb2b-maincapb2b-main> cd bookshop

      PS C:UsersALOKDownloadscapb2b-maincapb2b-mainbookshop> cds add tiny-sample

      [cds] – adding feature(s) to project in current folder

      [ERROR] feature 'tiny-sample' not found. Cannot find module './template/tiny-sample'

      Require stack:

      – C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dklibinitindex.js

      – C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dkbinadd.js

      – C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dkbincds.js

      at CDSGenerator._createTemplate (C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dklibinitindex.js:239:19)

      at CDSGenerator._fillTemplateList (C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dklibinitindex.js:247:39)

      at CDSGenerator._process (C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dklibinitindex.js:212:20)

      at async CDSGenerator.addCmd (C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dklibinitindex.js:141:9)

      at async Object.add (C:UsersALOKAppDataRoamingnpmnode_modules@sapcds-dkbinadd.js:54:3)

      Thanks for the help

    Leave A Reply