## Applied JavaScript --- ## Outline * JavaScript Runtimes * Secondary Learning Outcomes --- ## JavaScript Runtimes * (browser) * Node.js --- ## (browser) Runtime * the JavaScript runtime is embeded in most modern browsers * in addition to the core language there are APIs for: * the Document Object Model (DOM) * the Browser Object Model (BOM) --- ## Node.js Runtime * most popular runtime for running JavaScript outside the browser * asynchronus, event-driven runtime * tuned for building scalable network application * for example, web-based microservices * can handle multiple connections within a single thread --- ## Secondary Learning Outcomes * automated testing (e.g. Jest) * client-side frameworks (e.g. React) * server-side frameworks (e.g. Express) * deploying server-side applications (e.g. CloudRun) * CI/CD --- ## Automated Testing * every time we make a change to application we want to know that we didn't break anything * we maintain a library of tests to run after every change * if any of the tests fail we have an opportunity to check * there are frameworks for testing JavaScript applications (e.g. Jest) --- ## Client-side frameworks * the broser DOM is primitive and difficult to work with * would like something higher-level for building most applications * there are a number of client-side frameworks available * we will look at React (and Next.js) --- ## Browser-side frameworks * the Node.js network API is primitive and difficult to work with * would like something higher-level for building most applications * there are a number of server-side frameworks available * we will look at Express --- ## Deploying Server-side Applications * for production applications we need somewhere to deploy the server-side code * virtual machines or containers in the cloud are a popular solution * we will look CloudRun which is a container solution running on Google's Cloud Platform --- ## CI/CD * Continuous Integration (CI) - the applicaton is rebuilt and tested automatically after every change * Continuous Delivery/Deployment - if the automated tests pass, the newly built applicaiton is automatically deployed