
Preface
Developing Multi-Platform Apps with Visual Studio Code aims at exploring various functionalities of VS Code as an editor by taking the reader through a journey of developing a microservices based cloud native application.
The book is divided into three parts. The first part covers an introduction to VS Code, its features and the use of extensions. This creates a keen understanding of VS Code as an editor, by discussing the tooling features, increasing productivity and providing greater flexibility to a developer.
The second part covers building a cloud native application, based on multiple platforms. It starts by discussing the overall architecture and then moves on to developing the complete application. The application is based on a microservices architecture, where each backend service and the frontend is based on different technologies. The respective chapters elaborate the steps required to extend VS Code functionality to enable support for multiple platforms. The book also discusses Azure Event Hubs with Kafka protocol for inter-application messaging, Azure Kubernetes Services for container orchestration, Git and Azure DevOps for version management and deployment respectively. It also features Dapr for publishing messages to Kafka. Finally touching upon debugging the book explores the common VS Code debugging features along with the specific extensions required for each platform. All these topics are covered in this book in the most interactive manner to encourage you to try the examples yourself.
The last part covers advance topics related to VS Code such as creating custom extensions and remote development with examples.
Who this book is for
This book is for developers who are looking to learn how to effectively use Visual Studio Code to edit, debug, and deploy applications. Basic software development knowledge is a must to grasp the concepts covered in this book easily.
What this book covers
Chapter 1, Getting Started with Visual Studio Code, explains the key features of VS Code as an editor and how it differs from IDEs. The chapter covers VS Code in terms of the overall layout, command line options, multi-cursor editing, code refactoring, code navigation and user snippets among others.
Chapter 2, Extensions in Visual Studio Code. A key feature that makes Visual Studio Code more than just an editor is its extensibility framework. This allows the developer to add extensions relevant to their needs. This chapter will explain the extensibility framework, look at some important extensions, and explore how to add, delete, and configure extensions.
Chapter 3, Building a Multi-Platform Backend Using Visual Studio Code, starts off discussing the architecture and then building microservices on different platforms for the Job Ordering System we will develop in this part of the book. This will help you understand how the Visual Studio Code editor can be used in real-life scenarios.
Chapter 4, Building a Service in .NET Core and Exploring Dapr, develops a .NET Core hosted service to provide integration between different services. Communication is established between these services using a message broker system.
Chapter 5, Building a Web-Based Frontend Application with Angular, uses Visual Studio Code to develop a client-side web application and consumes the backend services developed in the previous chapters. The chapter will focus on how Visual Studio Code can be the editor of choice for frontend development.
Chapter 6, Debugging Techniques, focuses on exploring various debugging features of VS Code by setting up the environment for different technologies. The chapter also discusses different ways of launching the VS Code debugger.
Chapter 7, Deploying Applications on Azure, focuses on containerizing applications using Docker as the container technology and deploying to Azure Kubernetes Services for container orchestration scenarios.
Chapter 8, Git and Azure DevOps, focuses on the use of Git, understanding Git model and different strategies for source code version management. It also explores Azure DevOps for enabling CI/CD for automated build and deployment scenarios
Chapter 9, Creating Custom Extensions in Visual Studio Code, is about exploring the extension framework for extending VS Code functionality by developing custom extensions. The chapter takes you through the steps for building various types of extension such as using TypeScript, Code snippet and theme extension.
Chapter 10, Remote Development in Visual Studio Code, focuses on exploring the remote development feature of VS Code by developing applications on remote machines, containers and on cloud using GitHub Codespaces.
To get the most out of this book
The book deep dives into Visual Studio Code as an editor and explores its several features and functionalities. The objective of this book has been to learn tooling features by developing a real life application. The tool can be learned best with practice, and to get the most out of this book we encourage you to follow up each chapter by practicing the examples and also creating the application discussed in the book yourself. To help you along, the complete code base is available on the specified GitHub repository
The book uses the following software/hardwares:

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
Download the example code files
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the Support tab.
- Click on Code Downloads.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Developing-Multi-platform-Apps-with-Visual-Studio-Code. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here:
https://static.packt-cdn.com/downloads/9781838822934_ColorImagespdf.
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "To push the complete history of changes to the remote repository, run git push –u <remote_repo_name> <branch_name>."
A block of code is set as follows:
- task: Docker@2
displayName: Save Image
inputs:
command: save
arguments: '-o $(Build.ArtifactStagingDirectory)/$(NodeJSAPIName).tar $(ContainerRegistryName)/$(NodeJSAPIName):$(Build.BuildId)'
Any command-line input or output is written as follows:
image deployment/$(k8jobreqdeployment) $(k8jobreqdeployment)=$(ContainerRegistryName)/$(NodeJSAPIName):$(Build.BuildId)
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To get the credentials, click the Generate Git Credentials button in your repository on Azure DevOps. You will find this button on the Clone Repository page."
Tips or important notes
Appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.