Learn ASP.NET MVC
By Arnaud Weil
4/5
()
About this ebook
You're a developer who knows nothing to ASP.NET MVC. Which is fine, except that you need to start coding your next application using ASP.NET MVC 5.
Don't worry: I have you covered. I've been training hundreds of developers like you during years, and converted my experience into this book. I know from experience teaching what takes more time to learn in ASP.NET MVC, and will spend time only where appropriate.
Read this book, and you can code your ASP.NET MVC 5 application using Visual Studio 2015 within a week. Or your money back.
Printed paperback version available here.
Arnaud Weil
Arnaud Weil is a born developper: when he was a kid he was controlling his electric train using an Atari ST and some self-made electronics, then as a teenager created and distributed worldwide one of the first Web browsers for some of the first pocket computers, when the Web was just beginning. In fact, he loves coding. Then came .NET and from 2001 Arnaud has been coding using ASP.NET, WPF, WinForms, Silverlight, WCF, XAML for all kind of applications from factory tools to smarphone applications to house control solutions. When not coding, he teaches fellow developers and provides consulting for development teams to reach their targets in the most efficient way. His status as a freelancer allows him to help his clients with many different projects. As things move on, Arnaud also learned to love HTML5, JavaScript and all the great tools that allow building professional software with those technologies. He puts an emphasis on writing modular, clever programs using agile methods and a bunch of automated testing. But what Arnaud enjoys most is helping other developers: that's why he teaches, speaks, and began writing books.
Read more from Arnaud Weil
Learn WPF MVVM - XAML, C# and the MVVM pattern Rating: 4 out of 5 stars4/5Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python Rating: 0 out of 5 stars0 ratingsLearn Docker - .NET Core, Java, Node.JS, PHP or Python: Learn Collection Rating: 5 out of 5 stars5/5Learn Kubernetes - Container orchestration using Docker: Learn Collection Rating: 4 out of 5 stars4/5Learn Microservices - ASP.NET Core and Docker Rating: 0 out of 5 stars0 ratingsLearn ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/5Learn Meteor - Node.js and MongoDB JavaScript platform Rating: 5 out of 5 stars5/5
Related to Learn ASP.NET MVC
Related ebooks
Spring MVC: Beginner's Guide - Second Edition Rating: 0 out of 5 stars0 ratings.Net Framework and Programming in ASP.NET Rating: 0 out of 5 stars0 ratingsASP.NET Core 3 and React: Hands-On full stack web development using ASP.NET Core, React, and TypeScript 3 Rating: 0 out of 5 stars0 ratingsLaravel 5.x Cookbook Rating: 0 out of 5 stars0 ratingsLearn ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/5Start-to-Finish Visual C# 2015 Rating: 5 out of 5 stars5/5AngularJS Web Application Development Blueprints Rating: 0 out of 5 stars0 ratingsVisual Studio Tips and Tricks: I Rating: 0 out of 5 stars0 ratingsMeteor: Full-Stack Web Application Development Rating: 0 out of 5 stars0 ratingsASP.NET Application Development Fundamentals Rating: 0 out of 5 stars0 ratingsC# 7 and .NET Core Cookbook Rating: 0 out of 5 stars0 ratingsLearn Meteor - Node.js and MongoDB JavaScript platform Rating: 5 out of 5 stars5/5JavaScript: Tips and Tricks to Programming Code with Javascript Rating: 0 out of 5 stars0 ratingsVisual Studio Code: End-to-End Editing and Debugging Tools for Web Developers Rating: 0 out of 5 stars0 ratingsBootstrap for ASP.NET MVC - Second Edition Rating: 5 out of 5 stars5/5Mastering NetBeans Rating: 0 out of 5 stars0 ratingsCloning Internet Applications with Ruby Rating: 5 out of 5 stars5/5Network Programming in .NET: With C# and Visual Basic .NET Rating: 3 out of 5 stars3/5Spring Integration in Action Rating: 0 out of 5 stars0 ratingsHello World: Student to Software Professional - a Transformation Guide Rating: 0 out of 5 stars0 ratingsASP.NET AJAX The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsWindows PowerShell for .NET Developers - Second Edition Rating: 4 out of 5 stars4/5MongoDB Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsInstant MongoDB Rating: 0 out of 5 stars0 ratingsC# Mini Reference: A Hitchhiker's Guide to the Modern Programming Languages, #2 Rating: 0 out of 5 stars0 ratingsEntity Framework Core Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsSpring MVC Beginner’s Guide Rating: 2 out of 5 stars2/5Fast ASP.NET Websites Rating: 0 out of 5 stars0 ratings
Programming For You
SQL Guide for Microsoft Access: SQL Basics, Fundamental & Queries Exercise Rating: 5 out of 5 stars5/5Web Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsPython: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Hacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsLearn SQL in 24 Hours Rating: 5 out of 5 stars5/5Minecraft Basics For Dummies Rating: 0 out of 5 stars0 ratingsGame Development with Unreal Engine 5: Learn the Basics of Game Development in Unreal Engine 5 (English Edition) Rating: 0 out of 5 stars0 ratingsPython: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsPython Projects for Beginners: A Ten-Week Bootcamp Approach to Python Programming Rating: 0 out of 5 stars0 ratingsLearn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5
Reviews for Learn ASP.NET MVC
3 ratings0 reviews
Book preview
Learn ASP.NET MVC - Arnaud Weil
Learn ASP.NET MVC
Be ready for coding away next week using ASP.NET MVC 5 and Visual Studio 2015
Arnaud Weil
This book is for sale at http://leanpub.com/aspnetmvc
This version was published on 2017-07-07
publisher's logo* * * * *
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.
* * * * *
© 2015 - 2017 Arnaud Weil
ISBN for EPUB version: 978-1-326-49103-1
To my wonderful wife and kids. Your love and support fueled this book.
Table of Contents
Introduction
What this book is not
Prerequisites
How to read this book
Tools you need
Source code
1. What is ASP.NET MVC and why use it
1.1 What is it ?
1.2 Why use it ?
1.3 Competing technologies
2. Creating our Web Site
3. ASP.NET MVC inner workings
3.1 Principles
3.2 View
4. Create an application and modify the home page
4.1 Do-it-yourself 1 - Create the application
4.2 Do-it-yourself 2 - Change the home page
5. Razor
5.1 Razor syntax
5.2 Layout views
5.3 Do-it-yourself 4 - Remove some links
5.4 Helpers
6. Understanding ASP.NET MVC
6.1 Flashback
6.2 Routing
6.3 Controllers
6.4 Be lazy
6.5 Let’s go all the way
7. Typing things up
7.1 The problem with ViewBag and ViewData
7.2 Using and typing the model
7.3 Conventions and simplicity: introducing the ViewModel
7.4 Entity Framework models
7.5 Do-it-yourself 5 - Create the Product model and DbContext
7.6 Do-it-yourself 6 - Add code that creates a database with some products
7.7 Do-it-yourself 7 - Display a products list
8. Updating server data
8.1 Action parameters
8.2 Word of caution about URLs
8.3 Do-it-yourself 8 - Display product details
8.4 HTTP Post parameters
8.5 Passing a full blown object
8.6 Sit and watch - Basic product calculator
8.7 Do-it-yourself 9 - Add a search box to the products list
9. Updating data scenario
9.1 Steps
9.2 Controller
9.3 Automated generation of controller and views
9.4 Do-it-yourself 10 - Create the products management back-office
10. Doing more with controllers and actions
10.1 Actions can generate more than views
10.2 Do-it-yourself 11 - Add images to the products
10.3 Input validation
11. Basic security
11.1 Preventing Cross-Site Scripting
11.2 Rejecting extra fields
11.3 Identifying users
11.4 Do-it-yourself 12 - Secure the back-office
12. Going further
12.1 Deploying your site
12.2 Creating Razor helpers
12.3 Partial views
12.4 Display and edit templates
Do-it-yourself Cheat Sheet
Do-it-yourself 1 - Create the application - correction
Do-it-yourself 2 - Change the home page - correction
Do-it-yourself 3 - Add code to the home page - correction
Do-it-yourself 4 - Remove some links - correction
Do-it-yourself 5 - Create the Product model and DbContext - correction
Do-it-yourself 6 - Add code that creates a database with some products - correction
Do-it-yourself 7 - Display a products list - correction
Do-it-yourself 8 - Display product details - correction
Do-it-yourself 9 - Add a search box to the products list - correction
Do-it-yourself 10 - Create the products management back-office - correction
Do-it-yourself 11 - Add images to the products - correction
Do-it-yourself 12 - Secure the back-office - correction
Definitions
Bootstrap
Dynamic object
Entity Framework
Project
Solution
Solution Explorer
A word from the author
The Learn collection
Introduction
What this book is not
I made my best to keep this book small, so that you can learn ASP.NET MVC quickly without getting lost in petty details. If you’re looking for a reference book where you’ll find answers to all the questions you may have within the next 4 years of your ASP.NET MVC practice, you’ll find other heavy books for that.
My purpose is to swiftly provide you with the tools you need to code your first ASP.NET MVC application and be able to look for more by yourself when needed. While some authors seems to pride themselves in having the thickest book, in this series I’m glad I achieved the thinnest possible book for my purpose. Though I tried my best to keep all of what seems necessary, based on my 14 years experience of teaching .NET.
I assume that you know what ASP.NET MVC is and when to use it. In case you don’t, read the following What is ASP.MVC chapter.
Prerequisites
In order for this book to meet its goals, you must :
Have basic experience creating applications with .NET and C#
Have working knowledge of HTML
Know what a Web application is