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 Kubernetes - Container orchestration using Docker: Learn Collection Rating: 4 out of 5 stars4/5Learn WPF MVVM - XAML, C# and the MVVM pattern Rating: 4 out of 5 stars4/5Learn Docker - .NET Core, Java, Node.JS, PHP or Python: Learn Collection Rating: 5 out of 5 stars5/5Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python Rating: 0 out of 5 stars0 ratingsLearn Microservices - ASP.NET Core and Docker Rating: 0 out of 5 stars0 ratingsLearn Meteor - Node.js and MongoDB JavaScript platform Rating: 5 out of 5 stars5/5Learn ASP.NET Core MVC - Be Ready Next Week Using Visual Studio 2017 Rating: 5 out of 5 stars5/5
Related to Learn ASP.NET MVC
Related ebooks
Bootstrap for ASP.NET MVC - Second Edition Rating: 5 out of 5 stars5/5ASP.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 ratingsSpring MVC: Beginner's Guide - Second Edition Rating: 0 out of 5 stars0 ratingsStart-to-Finish Visual C# 2015 Rating: 5 out of 5 stars5/5.NET 7 for Jobseekers: Elevate your coding journey with .NET 7 (English Edition) Rating: 0 out of 5 stars0 ratingsAngularJS Web Application Development Blueprints Rating: 0 out of 5 stars0 ratingsASP.NET Core for Jobseekers: Build Career in Designing Cross-Platform Web Applications Using Razor and Entity Framework Core Rating: 0 out of 5 stars0 ratingsQuick Start Kubernetes 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/5Introduction to PHP Web Services: PHP, JavaScript, MySQL, SOAP, RESTful, JSON, XML, WSDL Rating: 0 out of 5 stars0 ratingsVisual Studio Tips and Tricks: I Rating: 0 out of 5 stars0 ratingsASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals Rating: 0 out of 5 stars0 ratingsReactJS for Jobseekers: The Only Guide You Need to Learn React and Crack Interviews (English Edition) Rating: 0 out of 5 stars0 ratingsWebSocket Essentials – Building Apps with HTML5 WebSockets Rating: 0 out of 5 stars0 ratings.Net Framework and Programming in ASP.NET Rating: 0 out of 5 stars0 ratingsMeteor: Full-Stack Web Application Development Rating: 0 out of 5 stars0 ratingsC# Programming Cookbook Rating: 0 out of 5 stars0 ratingsWindows PowerShell for .NET Developers - Second Edition Rating: 4 out of 5 stars4/5Cloning Internet Applications with Ruby Rating: 5 out of 5 stars5/5.NET Core in Action Rating: 0 out of 5 stars0 ratingsRestlet in Action: Developing RESTful web APIs in Java Rating: 0 out of 5 stars0 ratingsLINQ in Action Rating: 0 out of 5 stars0 ratingsHands-On Parallel Programming with C# 8 and .NET Core 3: Build solid enterprise software using task parallelism and multithreading Rating: 0 out of 5 stars0 ratingsCross-Platform Desktop Applications: Using Node, Electron, and NW.js Rating: 0 out of 5 stars0 ratingsContinuous Integration in .NET Rating: 0 out of 5 stars0 ratingsMVVM Survival Guide for Enterprise Architectures in Silverlight and WPF Rating: 0 out of 5 stars0 ratings
Programming For You
Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days 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: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5101 Amazing Nintendo NES Facts: Includes facts about the Famicom Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week 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/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5C# 7.0 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5ReactJS by Example - Building Modern Web Applications with React 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