Want to Build an Enterprise-Grade App? Tear One Down!

Rate this content
Bookmark

Building enterprise-grade applications is challenging. So how can you learn to build one? Start by tearing one down!! Say hello to Contoso Real Estate - an open-source reference implementation featuring a composable architecture with micro-frontends and a cloud-native backend - that provides the perfect sandbox for hands-on exploration and learning.

In this talk, we'll take the implementation for a spin using GitHub Codespaces as our local development environment to explore the code, build & preview the application and deploy it to the cloud with one command. We'll dive under the hood to understand the project structure (monorepo), developer experience (tooling) and application insights (monitoring). Want to join me on the teardown adventure? Just bring your browser and a GitHub account!

This talk has been presented at React Summit US 2023, check out the latest edition of this React Conference.

Watch video on a separate page

FAQ

Nithya Narasimhan is a Cloud Advocate on the AI Advocacy Team at Microsoft.

Learning to build an enterprise-grade application is important because it helps bridge the gap between knowing core concepts and building production-ready applications that meet complex requirements.

The three recommended steps are: 1. Find a reference implementation. 2. Deconstruct it to learn how it was built. 3. Transfer that knowledge to your own application requirements.

When selecting a reference implementation, consider these criteria: 1. It should be open-source to allow for detailed examination. 2. It should teach transferable design patterns. 3. It should cover use cases similar to your application requirements.

Contoso Real Estate is an open-source, enterprise-grade reference implementation from the JavaScript DevOx team at Microsoft. It serves as an onboarding app for new hires at a fictitious global corporation called Contoso.

The recommended development environment for setting up the Contoso Real Estate project is GitHub Codespaces with a devcontainer environment.

A devcontainer is a Docker container that runs in the cloud (in the case of GitHub Codespaces) and uses configuration as code, defined by a devcontainer.json file. This ensures a consistent development environment for all users.

GitHub Copilot Chat is an AI assistant integrated into VS Code that helps developers by providing in-context responses, explaining code, generating code, fixing issues, and more, without leaving the development environment.

The Azure Developer CLI (AZD) simplifies the deployment process from the development environment to the cloud. It uses infrastructure as code, driven by an azure.yml file, to automate resource provisioning and application deployment to Azure.

You can find more detailed information about deconstructing the Contoso Real Estate application in the Learn Live link, which contains a four-episode series that covers the process from initial design to deployment.

Nitya Narasimhan
Nitya Narasimhan
13 min
15 Nov, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Nithya Narasimhan discusses how to build an enterprise-grade application by deconstructing a reference implementation. The development environment includes GitHub Codespaces, devcontainer, and GitHub Copilot Chat. The Contoso Real Estate app provides a fully functioning experience in the browser. The Composable Enterprise pattern and API-first design are key components. Deployment is facilitated through infrastructure as code and an azure.yml file.

1. Building Enterprise-Grade Apps

Short description:

Hello, my name is Nithya Narasimhan. I'm a Cloud Advocate on the AI Advocacy Team at Microsoft. Today I want to talk to you about how you can build an enterprise-grade application by tearing one down. We have a knowledge gap between building functional applications and production-ready apps. To fill this gap, I recommend finding a reference implementation, deconstructing it, and transferring the knowledge to your own project. We'll focus on Contoso Real Estate, an open-source, enterprise-grade reference implementation from the JavaScript DevOx team at Microsoft.

Hello, my name is Nithya Narasimhan. I'm a Cloud Advocate on the AI Advocacy Team at Microsoft. And today I want to talk to you about how you can build an enterprise-grade application by tearing one down.

So you might be asking yourself, why do I need this skill? We've all been here. You might think of a scenario where you've joined a new development team in an enterprise organization, and on day one, you're faced with an assignment where you realize you have a gap in your learning because your team has been commissioned to build a multi-scenario app that is enterprise-grade in conjunction with other teams. And you need to make a decision on the development environment and the design architecture that you want to use. What do you do?

The challenge is that we have a knowledge gap. Most of us, and it's very much like this meme about how to draw a horse, many of us know core concepts. We know building blocks. We've built functional applications that can help us kind of showcase demo things to small audiences. But a production-grade app is like that finished diagram, the finished picture, and between that functional prototype and the production-ready version is a gap in learning, and those small details are missing in all the things that we try to learn.

So, how do we skill up? How do we fill this gap? I want to recommend we do it in three steps. First, find a reference implementation that provides an example of what you want to build. Deconstruct it to learn how they did it and then transfer that knowledge to your own application requirements. So, at the end of this talk, hopefully, you'll know how you can go from having identified your knowledge gap to having transferred the knowledge from deconstructing an open-source reference implementation to your own project.

The first step is to find a good reference sample. I think about it as a three criteria process. First, you want to look for something that's open source because you do want to unpack and look underneath to see how things were implemented. Second, a good reference sample should teach you patterns. You don't want to just implement things. You want it to have something that is transferable. Good design practices that make sense to other applications. And third, you want a use case that provides coverage for the kinds of requirements you have. So, for instance, if your application is going to have an authentication scenario, look for a reference sample that has one, too.

So, in this talk, we're going to focus on Contoso Real Estate. It is an open-source, enterprise-grade reference implementation from the JavaScript DevOx team at Microsoft. Now, Contoso is a fictitious global corporation. And the Contoso Real Estate application builds a reference implementation of an onboarding app for new hires in that org. And as you can see, it's a multi-scenario implementation. It has a content management scenario.

2. Development Environment and Building the App

Short description:

It has a scenario with two apps, a blog app for admins to fill in articles and a portal app for admins to populate the content management system with rentals. New hires can browse rentals, save them, and reserve them. We advocate for GitHub codespaces and a devcontainer environment for the development environment. GitHub Copilot Chat provides an AI assistant in VS Code. You can ask questions, get explanations, generate code, and more. Build and preview the app in the browser to validate the reference implementation.

It has a scenario which has two apps, a blog app where admins can fill in blog articles and have those blogs be read by both guests and new hires alike, and a portal app where admins populate the content management system with rentals in the area. And new hires can then use the portal to browse available rentals, save them to their profile, and reserve them for the payment. But most importantly, we knew that we had to design an architecture that could be extended to new scenarios.

So as we get started, what you need to do if you want to follow along is to go ahead and create a copy of this, fork the repo and use the URL that I've given in the text below. That's because this reference implementation is actively under development, so I want to make sure you have a stable branch, so look for aka.ms slash Contoso hyphen real estate, hyphen react, hyphen summit, hyphen 2023. Uncheck the main branch box so that it's actually copying over all the branches, and then look for the react summit branch in your fork. At this point, we are ready to start deconstructing.

The very first thing you want to do is understand or answer the question of development environment, how should we set up our development environment? In our reference implementation, we advocate for GitHub codespaces or rather for a devcontainer environment. So let me quickly show you what that looks like. So when you fork the repo and switched to that particular branch, you want to go look at the code dropdown and start a new codespace. In my case, I already have one running, so I dropped it, and you can see that I have one running, and when you launch it, it takes a little bit of time, but when you're done, you're actually going to see something like this.

So as you can see, you have what looks like a Visual Studio code experience right in your browser, but it's connected to a runtime environment that can actually run this application for you. So let's take a look at what a devcontainer is. So in this particular case, you're gonna learn two things. First, a devcontainer is a Docker container that runs in the cloud in the case of GitHub codespaces, but the pattern that you're going to understand is that it uses configuration as code. That environment is defined by a devcontainer.json file that you can check in along with your code base. You can version control it, you can modify it, you can share it with others. And what it does is ensures that anyone who uses this project is set up with the exact same environment in which they can build, debug, and deploy.

Once you've done that, this is optional, but I encourage you to install GitHub Copilot Chat, and I'm sure you're going to show you really quickly why that's useful. So what GitHub Copilot Chat does is it provides an AI assistant, but that AI assistant is sitting right in VS Code. So in my case, I've already installed it, and when I click on this, I get a chat assistant right in my VS Code experience. And what that means is when I'm stuck with a particular question, so for instance, I can ask it, what is GitHub Codespaces? And instead of going out from this to Google and then coming back and context switching, I ask it right here and it gives me a response in context, but it can do more. I can ask it, so I can use things like commands, like explain and say explain what this does, right? But now what it's doing is it's actually taking this and looking at the file that you've got open here, which is devcontainer.json and saying, oh, let me explain what this does, which is it's a dev container. And now you can actually, and it combines the two and follows the software, but you want to understand the benefits of code spaces. So what you've got is an AI assistant that stays in line with your flow, but also has the context for what you're working on in your development environment and can customize its responses to help you. And as you can see over here, you can not only get it to explain things, you can get it to generate code, you could get it to fix code, simplify it, create notebooks, create workspaces, and also just freeform queries or instructions. So now you have your development environment. You know that your code is already there. What can you do? Next, we want to build and preview the app right there in the browser to validate the fact that that reference implementation actually works for our needs. In my case, I already have that running and you'll notice that in the instructions, it tells us how to get started building and previewing it.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Scaling Up with Remix and Micro Frontends
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Scaling Up with Remix and Micro Frontends
Top Content
This talk discusses the usage of Microfrontends in Remix and introduces the Tiny Frontend library. Kazoo, a used car buying platform, follows a domain-driven design approach and encountered issues with granular slicing. Tiny Frontend aims to solve the slicing problem and promotes type safety and compatibility of shared dependencies. The speaker demonstrates how Tiny Frontend works with server-side rendering and how Remix can consume and update components without redeploying the app. The talk also explores the usage of micro frontends and the future support for Webpack Module Federation in Remix.
Understanding React’s Fiber Architecture
React Advanced 2022React Advanced 2022
29 min
Understanding React’s Fiber Architecture
Top Content
This Talk explores React's internal jargon, specifically fiber, which is an internal unit of work for rendering and committing. Fibers facilitate efficient updates to elements and play a crucial role in the reconciliation process. The work loop, complete work, and commit phase are essential steps in the rendering process. Understanding React's internals can help with optimizing code and pull request reviews. React 18 introduces the work loop sync and async functions for concurrent features and prioritization. Fiber brings benefits like async rendering and the ability to discard work-in-progress trees, improving user experience.
Full Stack Components
Remix Conf Europe 2022Remix Conf Europe 2022
37 min
Full Stack Components
Top Content
RemixConf EU discussed full stack components and their benefits, such as marrying the backend and UI in the same file. The talk demonstrated the implementation of a combo box with search functionality using Remix and the Downshift library. It also highlighted the ease of creating resource routes in Remix and the importance of code organization and maintainability in full stack components. The speaker expressed gratitude towards the audience and discussed the future of Remix, including its acquisition by Shopify and the potential for collaboration with Hydrogen.
The Eternal Sunshine of the Zero Build Pipeline
React Finland 2021React Finland 2021
36 min
The Eternal Sunshine of the Zero Build Pipeline
For many years, we have migrated all our devtools to Node.js for the sake of simplicity: a common language (JS/TS), a large ecosystem (NPM), and a powerful engine. In the meantime, we moved a lot of computation tasks to the client-side thanks to PWA and JavaScript Hegemony.
So we made Webapps for years, developing with awesome reactive frameworks and bundling a lot of dependencies. We progressively moved from our simplicity to complex apps toolchains. We've become the new Java-like ecosystem. It sucks.
It's 2021, we've got a lot of new technologies to sustain our Users eXperience. It's time to have a break and rethink our tools rather than going faster and faster in the same direction. It's time to redesign the Developer eXperience. It's time for a bundle-free dev environment. It's time to embrace a new frontend building philosophy, still with our lovely JavaScript.
Introducing Snowpack, Vite, Astro, and other Bare Modules tools concepts!
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
React Summit 2022React Summit 2022
17 min
Composition vs Configuration: How to Build Flexible, Resilient and Future-proof Components
Top Content
Today's Talk discusses building flexible, resilient, and future-proof React components using composition and configuration approaches. The composition approach allows for flexibility without excessive conditional logic by using multiple components and passing props. The context API can be used for variant styling, allowing for appropriate styling and class specification. Adding variants and icons is made easy by consuming the variant context. The composition and configuration approaches can be combined for the best of both worlds.
Remix Architecture Patterns
Remix Conf Europe 2022Remix Conf Europe 2022
23 min
Remix Architecture Patterns
Top Content
This Talk introduces the Remix architecture patterns for web applications, with over 50% of participants using Remix professionally. The migration from single page applications to Remix involves step-by-step refactoring and offers flexibility in deployment options. Scalability can be achieved by distributing the database layer and implementing application caching. The backend for frontend pattern simplifies data fetching, and Remix provides real-time capabilities for collaborative features through WebSocket servers and Server-SendEvents.

Workshops on related topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.