Book Image

ASP.NET Core 2 and Vue.js

By : Stuart Ratcliffe
5 (1)
Book Image

ASP.NET Core 2 and Vue.js

5 (1)
By: Stuart Ratcliffe

Overview of this book

This book will walk you through the process of developing an e-commerce application from start to finish, utilizing an ASP.NET Core web API and Vue.js Single-Page Application (SPA) frontend. We will build the application using a featureslice approach, whereby in each chapter we will add the required frontend and backend changes to complete an entire feature. In the early chapters, we’ll keep things fairly simple to get you started, but by the end of the book, you’ll be utilizing some advanced concepts, such as server-side rendering and continuous integration and deployment. You will learn how to set up and configure a modern development environment for building ASP.NET Core web APIs and Vue.js SPA frontends.You will also learn about how ASP.NET Core differs from its predecessors, and how we can utilize those changes to our benefit. Finally, you will learn the fundamentals of building modern frontend applications using Vue.js, as well as some of the more advanced concepts, which can help make you more productive in your own applications in the future.
Table of Contents (15 chapters)

To get the most out of this book

It is assumed that you are already a reasonably competent ASP.NET web developer, familiar with building MVC web applications. Although not required, you will appreciate the benefits of Vue.js more if you are also familiar with incorporating a moderate amount of jQuery, or vanilla JavaScript, into your MVC applications. It is also assumed that you are familiar and comfortable with basic CSS and SCSS, with knowledge of the Bootstrap framework being desirable. It is not required to have any pre-existing knowledge of .NET Core or ASP.NET Core, but again, it would be beneficial to have explored ASP.NET Core and how it differs from previous versions of the framework. Finally, it is assumed that you are familiar with source control using Git, and will have access to a cloud-based Git repository to use for deployment in Chapter 10, Deployment, and Chapter 13, Continuous Integration and Continuous Deployment.

All software requirements necessary for completing the sample application are introduced as and when required, including links to instructions on how to install them on your native OS. It is possible to build and run the sample application on any OS supported by ASP.NET Core, including both Windows and macOS. However, the application has only been tested by myself on a Windows machine, as it is assumed that this is what the vast majority of readers will be using, based on the assumption that they are experienced ASP.NET developers.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.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:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. 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/Hands-On-ASP.NET-Core-2-and-Vue.js. 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!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: 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: "In this case, we return a simple object with a single name property."

A block of code is set as follows:

<style lang="scss">
html,
body {
height: 100vh;
}
div.app,
div.page {
height: 100% !important;
}
</style>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

vendor: [
"event-source-polyfill",
"isomorphic-fetch",
"vue",
"vue-router",
"bootstrap/dist/css/bootstrap.min.css",
"bootstrap-vue",
"nprogress/nprogress.css"
]

Any command-line input or output is written as follows:

webpack --config webpack.config.vendor.js

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 do so, click on the Resource groups link in the main menu on the left."

Warnings or important notes appear like this.
Tips and tricks appear like this.