All Projects → nbarbettini → Little Aspnetcore Book

nbarbettini / Little Aspnetcore Book

Licence: cc-by-4.0
The Little ASP.NET Core Book, a friendly introduction to web programming and ASP.NET Core 2.0

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Little Aspnetcore Book

smartadmin.core.urf
Domain Driven Design (DDD) lightweight development architecture(support .net 5.0)
Stars: ✭ 100 (-84.3%)
Mutual labels:  web-application, asp-net-core
BeautyBooking
Web application for booking beauty appointments (ASP.NET Core 3.1). My project for the ASP.NET Core course at SoftUni.
Stars: ✭ 35 (-94.51%)
Mutual labels:  web-application, asp-net-core
Classiccomputerscienceproblemsinpython
Source Code for the Book Classic Computer Science Problems in Python
Stars: ✭ 558 (-12.4%)
Mutual labels:  book
Mango
Mango is a self-hosted manga server and web reader
Stars: ✭ 610 (-4.24%)
Mutual labels:  web-application
Budget
Get a grip on your finances.
Stars: ✭ 609 (-4.4%)
Mutual labels:  web-application
Awesome Blazor
Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Stars: ✭ 6,063 (+851.81%)
Mutual labels:  asp-net-core
Androidnote
🔥 Android 进阶笔记,包含常用的技术框架、博客社区、书籍等。
Stars: ✭ 614 (-3.61%)
Mutual labels:  book
Easy hack
Hack the World using Termux
Stars: ✭ 549 (-13.81%)
Mutual labels:  web-application
Dasarpemrogramangolang
📖 Source Code E-book Dasar Pemrograman Golang
Stars: ✭ 625 (-1.88%)
Mutual labels:  book
Asp.net Core Template
A ready-to-use template for ASP.NET Core with repositories, services, models mapping, DI and StyleCop warnings fixed.
Stars: ✭ 599 (-5.97%)
Mutual labels:  asp-net-core
Node.js design patterns second edition code
Code repository for Node.js Design Patterns Second Edition, published by Packt
Stars: ✭ 617 (-3.14%)
Mutual labels:  book
Web Monitoring
前端监控,性能监控平台。The front end monitoring platform focuses on Web end experience data monitoring. Three aspects of the health of Web pages are monitored: page opening speed (speed measurement), page stability (JS Error), and external service call success rate (API).
Stars: ✭ 592 (-7.06%)
Mutual labels:  web-application
Oho Reader
【停止维护】哦豁阅读器!API源自追书神器,免费使用!填坑完成!使用react
Stars: ✭ 571 (-10.36%)
Mutual labels:  book
Efficientr
Efficient R programming: a book
Stars: ✭ 616 (-3.3%)
Mutual labels:  book
Starwars
GraphQL 'Star Wars' example using GraphQL for .NET, ASP.NET Core, Entity Framework Core
Stars: ✭ 559 (-12.24%)
Mutual labels:  asp-net-core
Cofoundry
Cofoundry is an extensible and flexible .NET Core CMS & application framework focusing on code first development
Stars: ✭ 621 (-2.51%)
Mutual labels:  asp-net-core
Rmarkdown Book
R Markdown: The Definitive Guide (published by Chapman & Hall/CRC in July 2018)
Stars: ✭ 557 (-12.56%)
Mutual labels:  book
Pl Compiler Resource
程序语言与编译技术相关资料(持续更新中)
Stars: ✭ 578 (-9.26%)
Mutual labels:  book
Book sample
another book on data science
Stars: ✭ 611 (-4.08%)
Mutual labels:  book
Consulo
Platform repository of Consulo. Plugins implementation hold in their repositories
Stars: ✭ 632 (-0.78%)
Mutual labels:  web-application

The Little ASP.NET Core Book

by Nate Barbettini

Copyright © 2018. All rights reserved.

ISBN: 978-1-387-75615-5

Released under the Creative Commons Attribution 4.0 license. You are free to share, copy, and redistribute this book in any format, or remix and transform it for any purpose (even commercially). You must give appropriate credit and provide a link to the license.

For more information, visit https://creativecommons.org/licenses/by/4.0/

Introduction

Thanks for picking up The Little ASP.NET Core Book! I wrote this short book to help developers and people interested in web programming learn about ASP.NET Core 2.0, a framework for building web applications and APIs.

The Little ASP.NET Core Book is structured as a tutorial. You'll build an application from start to finish and learn:

  • The basics of the MVC (Model-View-Controller) pattern
  • How front-end code (HTML, CSS, JavaScript) works together with back-end code
  • What dependency injection is and why it's useful
  • How to read and write data to a database
  • How to add log-in, registration, and security
  • How to deploy the application to the web

Don't worry, you don't need to know anything about ASP.NET Core (or any of the above) to get started.

Before you begin

The code for the finished version of the application you'll build is available on GitHub:

https://www.github.com/nbarbettini/little-aspnetcore-todo

Feel free to download it if you want to see the finished product, or compare as you write your own code.

The book itself is updated frequently with bug fixes and new content. If you're reading a PDF, e-book, or print version, check the official website (littleasp.net/book) to see if there's an updated version available. The very last page of the book contains version information and a changelog.

Reading in your own language

Thanks to some fantastic multilingual contributors, the Little ASP.NET Core Book has been translated into other languages:

Who this book is for

If you're new to programming, this book will introduce you to the patterns and concepts used to build modern web applications. You'll learn how to build a web app (and how the big pieces fit together) by building something from scratch! While this little book won't be able to cover absolutely everything you need to know about programming, it'll give you a starting point so you can learn more advanced topics.

If you already code in a backend language like Node, Python, Ruby, Go, or Java, you'll notice a lot of familiar ideas like MVC, view templates, and dependency injection. The code will be in C#, but it won't look too different from what you already know.

If you're an ASP.NET MVC developer, you'll feel right at home! ASP.NET Core adds some new tools and reuses (and simplifies) the things you already know. I'll point out some of the differences below.

No matter what your previous experience with web programming, this book will teach you everything you need to create a simple and useful web application in ASP.NET Core. You'll learn how to build functionality using backend and frontend code, how to interact with a database, and how to deploy the app to the world.

What is ASP.NET Core?

ASP.NET Core is a web framework created by Microsoft for building web applications, APIs, and microservices. It uses common patterns like MVC (Model-View-Controller), dependency injection, and a request pipeline comprised of middleware. It's open-source under the Apache 2.0 license, which means the source code is freely available, and the community is encouraged to contribute bug fixes and new features.

ASP.NET Core runs on top of Microsoft's .NET runtime, similar to the Java Virtual Machine (JVM) or the Ruby interpreter. You can write ASP.NET Core applications in a number of languages (C#, Visual Basic, F#). C# is the most popular choice, and it's what I'll use in this book. You can build and run ASP.NET Core applications on Windows, Mac, and Linux.

Why do we need another web framework?

There are a lot of great web frameworks to choose from already: Node/Express, Spring, Ruby on Rails, Django, Laravel, and many more. What advantages does ASP.NET Core have?

  • Speed. ASP.NET Core is fast. Because .NET code is compiled, it executes much faster than code in interpreted languages like JavaScript or Ruby. ASP.NET Core is also optimized for multithreading and asynchronous tasks. It's common to see a 5-10x speed improvement over code written in Node.js.

  • Ecosystem. ASP.NET Core may be new, but .NET has been around for a long time. There are thousands of packages available on NuGet (the .NET package manager; think npm, Ruby gems, or Maven). There are already packages available for JSON deserialization, database connectors, PDF generation, or almost anything else you can think of.

  • Security. The team at Microsoft takes security seriously, and ASP.NET Core is built to be secure from the ground up. It handles things like sanitizing input data and preventing cross-site request forgery (CSRF) attacks, so you don't have to. You also get the benefit of static typing with the .NET compiler, which is like having a very paranoid linter turned on at all times. This makes it harder to do something you didn't intend with a variable or chunk of data.

.NET Core and .NET Standard

Throughout this book, you'll be learning about ASP.NET Core (the web framework). I'll occasionally mention the .NET runtime, the supporting library that runs .NET code. If this already sounds like Greek to you, just skip to the next chapter!

You may also hear about .NET Core and .NET Standard. The naming gets confusing, so here's a simple explanation:

.NET Standard is a platform-agnostic interface that defines features and APIs. It's important to note that .NET Standard doesn't represent any actual code or functionality, just the API definition. There are different "versions" or levels of .NET Standard that reflect how many APIs are available (or how wide the API surface area is). For example, .NET Standard 2.0 has more APIs available than .NET Standard 1.5, which has more APIs than .NET Standard 1.0.

.NET Core is the .NET runtime that can be installed on Windows, Mac, or Linux. It implements the APIs defined in the .NET Standard interface with the appropriate platform-specific code on each operating system. This is what you'll install on your own machine to build and run ASP.NET Core applications.

And just for good measure, .NET Framework is a different implementation of .NET Standard that is Windows-only. This was the only .NET runtime until .NET Core came along and brought .NET to Mac and Linux. ASP.NET Core can also run on Windows-only .NET Framework, but I won't touch on this too much.

If you're confused by all this naming, no worries! We'll get to some real code in a bit.

A note to ASP.NET 4 developers

If you haven't used a previous version of ASP.NET, skip ahead to the next chapter.

ASP.NET Core is a complete ground-up rewrite of ASP.NET, with a focus on modernizing the framework and finally decoupling it from System.Web, IIS, and Windows. If you remember all the OWIN/Katana stuff from ASP.NET 4, you're already halfway there: the Katana project became ASP.NET 5 which was ultimately renamed to ASP.NET Core.

Because of the Katana legacy, the Startup class is front and center, and there's no more Application_Start or Global.asax. The entire pipeline is driven by middleware, and there's no longer a split between MVC and Web API: controllers can simply return views, status codes, or data. Dependency injection comes baked in, so you don't need to install and configure a container like StructureMap or Ninject if you don't want to. And the entire framework has been optimized for speed and runtime efficiency.

Alright, enough introduction. Let's dive in to ASP.NET Core!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].