C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development
eBook - ePub

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development

Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition

Mark J. Price

Share book
  1. 818 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development

Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition

Mark J. Price

Book details
Book preview
Table of contents
Citations

About This Book

Publisher's Note: Microsoft stops supporting.NET Core 3.1 in December 2022. The newer 7th edition of this book is available that covers.NET 7 (end-of-life May 2024) or.NET 6 (end-of-life November 2024), with C# 11 and EF Core 7.

Key Features

  • Build modern, cross-platform applications with.NET Core 3.0
  • Get up to speed with C#, and up to date with all the latest features of C# 8.0
  • Start creating professional web applications with ASP.NET Core 3.0

Book Description

In C# 8.0 and.NET Core 3.0 – Modern Cross-Platform Development, Fourth Edition, expert teacher Mark J. Price gives you everything you need to start programming C# applications.

This latest edition uses the popular Visual Studio Code editor to work across all major operating systems. It is fully updated and expanded with new chapters on Content Management Systems (CMS) and machine learning with ML.NET.

The book covers all the topics you need. Part 1 teaches the fundamentals of C#, including object-oriented programming, and new C# 8.0 features such as nullable reference types, simplified switch pattern matching, and default interface methods. Part 2 covers the.NET Standard APIs, such as managing and querying data, monitoring and improving performance, working with the filesystem, async streams, serialization, and encryption. Part 3 provides examples of cross-platform applications you can build and deploy, such as web apps using ASP.NET Core or mobile apps using Xamarin.Forms. The book introduces three technologies for building Windows desktop applications including Windows Forms, Windows Presentation Foundation (WPF), and Universal Windows Platform (UWP) apps, as well as web applications, web services, and mobile apps.

What you will learn

  • Build cross-platform applications for Windows, macOS, Linux, iOS, and Android
  • Explore application development with C# 8.0 and.NET Core 3.0
  • Explore ASP.NET Core 3.0 and create professional web applications
  • Learn object-oriented programming and C# multitasking
  • Query and manipulate data using LINQ
  • Use Entity Framework Core and work with relational databases
  • Discover Windows app development using the Universal Windows Platform and XAML
  • Build mobile applications for iOS and Android using Xamarin.Forms

Who this book is for

Readers with some prior programming experience or with a science, technology, engineering, or mathematics (STEM) background, who want to gain a solid foundation with C# 8.0 and.NET Core 3.0.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development an online PDF/ePUB?
Yes, you can access C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development by Mark J. Price in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in C#. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9781788471572
Edition
4

Chapter 17

Building Websites Using a Content Management System

This chapter is about building websites using a modern cross-platform Content Management System (CMS).
There are many choices of CMS for most web development platforms. For cross-platform C# and .NET web developers, the best for learning the important principles is currently Piranha CMS. It was the first CMS to support .NET Core, with Piranha CMS 4.0 released on 1st December 2017.
This chapter will cover the following topics:
  • Understanding the benefits of a CMS
  • Understanding Piranha CMS
  • Defining components, content types, and templates
  • Testing the CMS website

Understanding the benefits of a CMS

In previous chapters, you learned how to create static HTML web pages and configure ASP.NET Core to serve them when requested by a visitor's browser.
You also learned how ASP.NET Core Razor Pages can add C# code that executes on the server side to generate HTML dynamically, including from information loaded live from a database. Additionally, you learned how ASP.NET Core MVC provides separation of technical concerns to make building more complex websites more manageable.
On its own, ASP.NET Core does not solve the problem of managing content. In those previous websites, the person creating and managing the content would have to have programming and HTML editing skills, or the ability to edit the data in the Northwind database, to change what visitors see on the website.
This is where a CMS becomes useful. A CMS separates the content (data values) from templates (layout, format, and style). Most CMSs generate web responses like HTML for humans viewing the website with a browser.
Some CMSs generate open data formats like JSON and XML to be processed by a web service or rendered in a browser using client-side technologies like Angular, React, or Vue. This is often called a headless CMS.
Developers define the structure of data stored in the CMS using content type classes for different purposes, like a product page, with content templates that render the content data into HTML, JSON, or other formats.
Non-technical content owners can log into the CMS and use a simple user interface to create, edit, delete, and publish content that will fit the structure defined by the content type classes, without needing the involvement of developers or tools like Visual Studio Code.

Understanding basic CMS features

Any decent basic CMS will include the following core features:
  • A user interface that allows non-technical content owners to log in and manage their content.
  • A content delivery system that converts the content from simple data into one or more formats, like HTML and JSON.

Understanding enterprise CMS features

Any decent commercial enterprise-level CMS would add the following additional features:
  • Search Engine Optimized (SEO) URLs, page titles and related metadata, sitemaps, and so on.
  • Authentication and authorization including management of users, groups, and their access rights to content.
  • Media asset management of images, videos, documents, and...

Table of contents