Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Cross-Platform Modern Apps with VS Code: Combine the power of EF Core, ASP.NET Core and Xamarin.Forms to build multi-platform applications on Visual Studio Code
Cross-Platform Modern Apps with VS Code: Combine the power of EF Core, ASP.NET Core and Xamarin.Forms to build multi-platform applications on Visual Studio Code
Cross-Platform Modern Apps with VS Code: Combine the power of EF Core, ASP.NET Core and Xamarin.Forms to build multi-platform applications on Visual Studio Code
Ebook636 pages2 hours

Cross-Platform Modern Apps with VS Code: Combine the power of EF Core, ASP.NET Core and Xamarin.Forms to build multi-platform applications on Visual Studio Code

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This book explores VS Code's core features, including multi-language IDE, rapid programming, and innovative front-end development, to show readers how to design and debug modern online and cloud applications.

You will learn how to build native apps, spend less time working with the platform, and focus more on the creative aspects of generating a smart UI. While you learn and practise on VS Code, you build solid grounds on robust server-side programming. You will learn how to use VS Code to develop your javascript, typescript, nodejs, or angular app more quickly and easily. Not only an application development environment, but VS Code also enables you to create microservices, extensions, and cloud applications. Not only can you construct applications with VS Code, but you can also develop microservices, extensions, and cloud applications. Throughout the book, you get trained on Entity Framework Core, Razor, Xamarin.Forms and numerous APIs.

This book not only prepares you to design multi-platform applications or work with Visual Studio Code, but it also prepares you to be a great developer who can alter the code, debug issues, and manage the many versions on your own.
LanguageEnglish
Release dateMar 15, 2022
ISBN9789355510433
Cross-Platform Modern Apps with VS Code: Combine the power of EF Core, ASP.NET Core and Xamarin.Forms to build multi-platform applications on Visual Studio Code

Read more from Ockert J. Du Preez

Related to Cross-Platform Modern Apps with VS Code

Related ebooks

Computers For You

View More

Related articles

Reviews for Cross-Platform Modern Apps with VS Code

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Cross-Platform Modern Apps with VS Code - Ockert J. du Preez

    Section - I

    Introductory Concepts

    Introduction

    Section I introduces you to Visual Studio Code. Chapter 1, Comparing Visual Studio Code to Visual Studio, highlights Visual Studio Code’s origin story and the need for Visual Studio Code. In Chapter 2, Up and Running with VS Code, you will learn how to set up Visual Studio Code and start programming with it. This is exciting stuff; so, let us get started!

    In this section, we have the following chapters:

    Chapter 1, Comparing Visual Studio Code to Visual Studio

    Chapter 2, Up and running with VS Code

    CHAPTER 1

    Comparing Visual Studio Code to Visual Studio

    This chapter focuses on the origins of Visual Studio Code. It provides a brief history of the product, and a brief introduction to its features. Most importantly, it answers the question, why Visual Studio Code, and why do we need it?

    Structure

    In this chapter, we will cover the following topics:

    Differences between Visual Studio and Visual Studio Code

    History of Visual Studio Code

    Reasons to choose Visual Studio Code

    Visual Studio Code adaptation

    Visual Studio Code use cases

    Objectives

    After studying this chapter, you will know the basic difference between VS code and Visual Studio (VS). You can explore everything that can be done with Visual Studio Code and learn why it is the best tool to use for the cross-platform apps.

    Differences between Visual Studio and Visual Studio Code

    You may think that using this as a starting topic is a bit strange, but it is not. The reason for this is that many developers confuse Visual Studio Code with Visual Studio. So, the quicker we get the differences out of the way, the faster we can start exploring the ins-and-outs of Visual Studio Code.

    Visual Studio

    Visual Studio (VS) is Microsoft’s flagship Integrated Development Environment (IDE) for developing, debugging, and deploying the desktop, web, and mobile applications. Visual Studio consists of a huge range of features that are required for easy application development such as auto complete, server setup, database integrations, and source control.

    The first version of Visual Studio was released in 1997, and it was the first time that all the Microsoft’s programming tools were integrated into one common IDE. Now, more than 20 years later, the technology landscape has changed tremendously, and Visual Studio has adapted continuously with it. Therefore, Visual Studio 2019, the latest version, includes the best and newest tools to work with the modern-day problems and technologies properly.

    Visual Studio 2019 comes in various editions, which are as follows:

    Visual Studio 2019 Preview

    Visual Studio Community

    Visual Studio Professional

    Visual Studio Enterprise

    As the book focuses on VS Code, there won’t be many details covered regarding VS. But the editions of VS will be explained to demonstrate the differences between VS and VS Code.

    The next few sections pertaining to Visual Studio 2019 cannot be covered in just one chapter. Therefore, a link is provided for more information on Visual Studio 2019 in the References section; it is a book dedicated solely to Visual Studio 2019.

    Visual Studio 2019 Preview

    Visual Studio 2019 contained three previews, each containing its own new changes. Preview 2 contained the fixes for Preview 1 and also some new features. Preview 3 contained the fixes for Preview 2 and some new features. It is seen as the final edition before the actual product launch.

    Visual Studio 2019 Community

    The Community Edition of Visual Studio 2019 is free. However, it does not have all the features that the Professional and Enterprise Editions have. Visual Studio Community 2019 is a fully featured IDE that can be used for creating applications for Android, iOS, Windows, plus web applications, and cloud services.

    Visual Studio 2019 Professional

    Visual Studio 2019 Professional includes the professional developer tools and services for the individuals or small teams. The Professional Edition includes everything that a professional developer needs to build the desktop applications, the web applications, as well as the mobile applications.

    Visual Studio 2019 Enterprise

    Visual Studio 2019 Enterprise is an integrated solution for teams of any size with demanding scale and quality needs. It includes all the features that Visual Studio has to offer. We can take advantage of all the debugging and testing tools such as coded UI testing, Xamarin inspector, code coverage, and live unit testing.

    Visual Studio Code

    Visual Studio Code is a free and streamlined open-source text editor. It has IntelliSense, a much smaller download size, and smaller RAM requirements. It works on lower end PCs and is more suited for tasks that are project specific.

    Visual Studio Code is very well suited for the Windows, Linux, and macOS developers utilizing the client-side web technologies such as HTML, JavaScript, and CSS.

    The upcoming sections will concentrate solely on Visual Studio Code; so, let us start with its history.

    History of Visual Studio Code

    It is amazing to think that Visual Studio Code was developed by four people. The team leader, Erich Gamma joined Microsoft in 2011 as a distinguished engineer in Zurich. Gamma was an IBM engineer who worked on the IBM Rational Jazz project and was one of the fathers of the Eclipse Java development editor project.

    Together with Kent Beck, the creator of extreme programming (a software development methodology that improves software quality and responsiveness to the changing customer requirements), he co-wrote the JUnit software testing framework, thus creating the test-driven development which influenced the whole software industry.

    Visual Studio Online (code named: Monaco) was released in 2013. Not many users adopted it (roughly between 3000 and 5000 users), so it was decided to switch Visual Studio Code to a Desktop app, leveraging the web technology they had. This happened in November 2014, only six months before the Beta launch of Visual Studio Code. This was also around the time when the node replicate became available, which allows you to run a JavaScript application with node APIs as a desktop electron application. Electron is a framework for creating the native applications with web technologies such as JavaScript, HTML, and CSS.

    At the 2015 Build conference on April 29, 2015, Microsoft first announced Visual Studio Code by Microsoft. The beta version of Visual Studio Code focused on the differences between Visual Studio Code and the other competing editors at that point in time, such as Sublime Text and Atom.

    The beta version also included rich language support for languages such as TypeScript and C#, as well as the great IntelliSense support.

    A Preview build was released shortly thereafter. Visual Studio Code was released under the MIT permissive license (free-software license with minimal restrictions on how the software can be used, modified, and redistributed) on November 18, 2015. Visual Studio Code was released on the web on April 14, 2016, after graduating from the public preview stage.

    The extension support was also announced, and its source code was made available on the microsoft/vscode (code - OSS) repository of GitHub. A link to this is provided in the References section at the end of this chapter.

    Reasons to choose Visual Studio Code

    Visual Studio Code is becoming increasingly popular, and we cannot help but wonder why? Let us explore some reasons.

    Visual Studio Code is open-source

    As mentioned earlier, since Visual Studio Code is open source, it is free to use. An added bonus is that you can also help improve it by contributing the code to its source code on GitHub microsoft/vscode. The link is provided in the References section at the end of this chapter. Another benefit of being open source is that it increases community engagement, and even if it doesn’t, everyone contributes to the Visual Studio Code's code base, which still gives them a sense of unity.

    Minimal design

    The default user interface of Visual Studio Code is clean and well-designed. If, however, you do not like the default design, you can create and use your own customized themes which are very flexible in customizing nearly all the UI elements of the editor. If you do not want to create your own re-usable themes, you can choose a theme from the thousands that are available on the market.

    Simplicity

    From downloading and installing Visual Studio Code to using it, it is very simple and easy. Unlike Visual Studio, there are not a plethora of options and workloads to install.

    Extensibility

    Visual Studio Code is very extensible, and you can install the extensions for almost all the popular programming languages. This means that you do not have to download bloated or convoluted IDEs such as Visual Studio.

    It supports hundreds of programming languages. Visual Studio Code supports a myriad of programming languages, including Python, JavaScript, HTML, CSS, TypeScript, C++, Java, PHP, Go, C#, PHP, SQL, Ruby, Objective-C, and much more.

    Visual Studio Code adaptation

    In February 2021, Visual Studio Code had a user base of over fourteen million. In 2020 alone, the number of Visual Studio Code users grew by a whopping five million due to the need for remote development during the COVID-19 pandemic. By June 2020, Visual Studio Code had eleven million users.

    According to Julia Liuson, the corporate vice president of Microsoft's developer division, Visual Studio Code had almost two million Python developers, over a million C++ developers, and almost one million Java developers as of February 2021.

    The major reasons for Visual Studio Code’s popularity are as follows:

    It can run on macOS, Windows 10, and various distributions of Linux. Visual Studio Code supports Arm64 on Linux and runs on Raspberry Pi and Chromebooks. Visual Studio Code is also available for the insider builds of Visual Studio Code on Apple's arm-based M1 chips.

    The breadth of the language extensions are C++, C#, Python (including Python libraries for data scientists) Java, and JavaScript/Typescript.

    The Visual Code Live Share feature, launched in 2017, has gotten tons of adoption, mainly due to the Work from Home (WFH) practices caused by the COVID-19 pandemic.

    Visual Studio Code use cases

    A use case is a scenario for a piece of software where it may be useful. We will cover three different use case scenarios, which are as follows:

    Coding use cases

    Non-coding use cases

    Collaboration use cases

    Let us see what they are about.

    Coding use cases

    There are various use cases when coding with a team is involved. Let us look at these major use cases in the following section.

    Remote development

    One of the major use cases that allow you to develop the apps remotely is remote development. Remote development allows you to develop the apps remotely. The Visual Studio Code Remote Development Extension Pack enables a developer to open any folder in an Azure Docker container on a remote machine or in the Windows subsystem for Linux and takes advantage of the Visual Studio Code's full feature set.

    This extension pack lets you set up a full-time development environment anywhere that enables you to do the following:

    Develop on the same operating system you deploy to.

    Use more specialized hardware than your local machine.

    Swap between different developments environments.

    Make updates without impacting your local machine.

    Help new team members with consistent development containers.

    Use the Linux based tool chain from Windows.

    No source code needs to be on your local machine.

    The Visual Studio Code Remote Development Extension Pack includes the following three extensions:

    Remote SSH

    Remote containers

    Remote WSL

    Remote SSH

    The developers can work with the source code in any location by opening the folders on a remote machine or virtual machine using SSH. This means that no source code needs to be on the developer's local machine to take advantage of the Visual Studio Code's feature set, since this extension runs all its commands and extensions directly on the remote machine.

    Remote containers

    The developers can work with a sandboxed tool chain or Docker container-based application with the help of a devcontainer.json file, telling Visual Studio Code how to access (or create) a development container.

    Remote WSL

    It gives the developers a Linux-powered development experience from Windows. One has to remember that the Windows subsystem for Linux is an optional feature on Windows 10. It should be enabled through the Windows features dialog or PowerShell. To enable WSL on Windows 10, complete the following steps:

    In the Windows search bar, type features. This brings up the Turn Windows features on and off dialog, as shown in Figure 1.1:

    Figure 1.1: Turn Windows features on and off dialog

    Scroll down to find the Windows subsystem for Linux and check it; this should also look like the window in Figure 1.1.

    Restart Windows.

    Open Windows’ search again, and type in Linux distro. Here, choose which one to install.

    Let us now have a look at some of the non-coding use cases in Visual Studio Code.

    Non-coding use cases

    Apart from using Visual Studio Code for coding in any of its many supported languages, you can also complete the following non-coding-oriented

    Enjoying the preview?
    Page 1 of 1