Reader small image

You're reading from  Learning ASP.NET Core MVC Programming

Product typeBook
Published inNov 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781786463838
Edition1st Edition
Languages
Right arrow
Authors (2):
Mugilan T. S. Ragupathi
Mugilan T. S. Ragupathi
author image
Mugilan T. S. Ragupathi

Mugilan T. S. Ragupathi has been working on building web-based applications using Microsof technology for more than a decade. He is active in the ASP.NET community and is running a successful blog, www.dotnetodyssey.com, to help his fellow .NET developers. His free beginners' course for ASP.NET MVC 5 (http://www.dotnetodyssey.com/asp-net-mvc-5-free-course/) was well received and is referred to as a concrete reference for beginners. He can be seen on subreddit / Stack Overflow in the C# section. He has written two free micro e-books, The 7 Most Popular Recipes of jQuery with ASP.NET Web Forms and Value & Reference types in C# (http://www.dotnetodyssey.com/freeebooks/). His books have received good responses. He is also an active contributor to the ASP.NET community on Quora (https://www.quora.com/profile/Mugil-Ragu). He likes to help readers with queries regarding ASP.NET.
Read more about Mugilan T. S. Ragupathi

Anuraj Parameswaran
Anuraj Parameswaran
author image
Anuraj Parameswaran

Anuraj Parameswaran is a seasoned IT expert with over 19 years of experience, starting in 2004, with a strong focus on Azure and .NET technologies. Currently serving as the Chief Technology Officer (CTO) of Socxo Solutions Pvt. Ltd., he has received seven prestigious Microsoft MVP awards. Anuraj actively participates in mentoring programs, delivers speeches at various events, and contributes extensively to both Microsoft and Azure communities. His commitment to sharing knowledge and embracing lifelong learning is exemplified by his involvement as a technical reviewer for Packt books.
Read more about Anuraj Parameswaran

View More author details
Right arrow

Preface

The book aims to help you learn the fundamentals of ASP.NET Core MVC and apply that knowledge to building applications using ASP.NET Core. This book also aims to serve as a solid guide for beginners who want to learn ASP.NET MVC. In detail, the following topics are going to be covered in the book:

  • Fundamentals and objectives of ASP.NET Core MVC

  • Philosophies (separation of concerns, convention over configuration) of ASP.NET Core

  • Components of ASP.NET Core MVC—Controllers, Models, and Views

  • Interacting with the database using Entity Framework

  • Validating the user’s input, both at the client-side and the server-side

  • Provide a face-lift to the application using Bootstrap

  • Making use of different deployment options provided by ASP.NET Core MVC

What this book covers

Chapter 1, Introduction to ASP.NET Core, covers the fundamentals of ASP.NET MVC and how it fits in the ASP.NET ecosystem. This chapter explains the basics of web development, including client-side components and server-side components and what a programmer can do and can’t do in either layer

Chapter 2, Setting up the Environment, shows the reader how to set up the development environment, including the installation of Visual Studio and ASP.NET Core. Hardware and software requirements for setting up the development environment is also discussed and the anatomy of ASP.NET MVC applications is presented.

Chapter 3, Controllers, explains about what constitutes a Controller and action method along with its roles and responsibilities. In this chapter, a simple Controller along with an action method will be created. It will explain to the readers what an action method and a Controller does from the perspective of an overall ASP.NET MVC application.

Chapter 4, Views, presents what the Razor View engine does and explains the various basic programming constructs (conditionals, loops, and so on) with the examples using Razor view engine.

Chapter 5, Models, presents the role of Models in ASP.NET Core application. The concept of ViewModel is discussed along with how it provides flexibility and data compartmentalization to your applications.

Chapter 6, Validation, explains client-side and server-side validation with JavaScript and by using the jQuery libraries.

Chapter 7, Routing, explains about the routing module, which selects the appropriate controller from the received request with an example. Various options and features of routing are presented. This chapter will also guide you through building a custom route for ASP.NET MVC application based on business logic or for SEO purposes.

Chapter 8, Beautifying ASP.NET Application with Bootstrap, teaches how to use Bootstrap, a responsive frontend framework, to prettify your applications. You will be guided through the creation of HTML form controls.

Chapter 9, Deployment of ASP.NET Core Application, explains how the project.json library handles all of the dependencies of ASP.NET Core applications, along with the versions. It also explains how the K runtime (the latest option in ASP.NET Core application) so that an ASP.NET MVC application could be deployed in a non-Windows environment as well.

Chapter 10, Building Web Services Using Web API, explains HTTP-based services and how to implement them using the Web API. It will also introduce you to the Fiddler, and to compose an HTTP request using it.

Chapter 11, Improving Performance of an ASP.NET Core Application, explains the approaches to analyzing of performance and measures for improvement in various layers of your application.

Chapter 12, ASP.NET Core Identity, explains the security aspects of your application and implementing security identity of an application using Entity Framework.

What you need for this book

To start programming the ASP.NET MVC applications, you will need Visual Studio Community 2015 IDE. This is a fully featured IDE available for building desktops and web applications. You will also need various packages and frameworks, such as NuGet, Bootstrap, and project.json, the installation and configuration of which will be explained in the book.

Who this book is for

This book is for developers who want to learn how to build web applications using ASP.NET Core, developers who want to make a career building web applications using Microsoft technology, and developers who are working in Ruby on Rails or other web frameworks and want to learn how to use ASP.NET Core MVC.

No knowledge of the ASP.NET platform or the .NET platform is required. Even though you do not need to have experience with C#, an understanding of the basic constructs (loops, conditionals, classes, and objects) of any modern programming language would be helpful.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, path names, dummy URLs, user input, and Twitter handles are shown as follows: "We need to add the Kestrel HTTP Server package as a dependency in the  project.json framework "

A block of code is set as follows:

public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
}

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

vi project.json

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "The shortcuts in this book are based on the Mac OS X 10.5+  scheme."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

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/learning-asp-dot-net-core-programming . We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/LearningAspDotNetCoreProgramming_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning ASP.NET Core MVC Programming
Published in: Nov 2016Publisher: PacktISBN-13: 9781786463838
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (2)

author image
Mugilan T. S. Ragupathi

Mugilan T. S. Ragupathi has been working on building web-based applications using Microsof technology for more than a decade. He is active in the ASP.NET community and is running a successful blog, www.dotnetodyssey.com, to help his fellow .NET developers. His free beginners' course for ASP.NET MVC 5 (http://www.dotnetodyssey.com/asp-net-mvc-5-free-course/) was well received and is referred to as a concrete reference for beginners. He can be seen on subreddit / Stack Overflow in the C# section. He has written two free micro e-books, The 7 Most Popular Recipes of jQuery with ASP.NET Web Forms and Value & Reference types in C# (http://www.dotnetodyssey.com/freeebooks/). His books have received good responses. He is also an active contributor to the ASP.NET community on Quora (https://www.quora.com/profile/Mugil-Ragu). He likes to help readers with queries regarding ASP.NET.
Read more about Mugilan T. S. Ragupathi

author image
Anuraj Parameswaran

Anuraj Parameswaran is a seasoned IT expert with over 19 years of experience, starting in 2004, with a strong focus on Azure and .NET technologies. Currently serving as the Chief Technology Officer (CTO) of Socxo Solutions Pvt. Ltd., he has received seven prestigious Microsoft MVP awards. Anuraj actively participates in mentoring programs, delivers speeches at various events, and contributes extensively to both Microsoft and Azure communities. His commitment to sharing knowledge and embracing lifelong learning is exemplified by his involvement as a technical reviewer for Packt books.
Read more about Anuraj Parameswaran