Welcome to the Kentico Xperience ASP.NET Core development tutorial. This tutorial will guide you through the creation of a simple Xperience website using ASP.NET Core.
We'll build logic that displays data from Xperience on the live site through views and view components composed of HTML, tag helpers, and inline code. In Xperience, content is modeled using page types and stored in pages (each of a specific page type) that hold site content – news, articles, products, etc.
This tutorial requires a high level of familiarity with development concepts in the ASP.NET Core framework, as well as experience in C# and access to standard development tools. You will also need an IDE for development, such as Visual Studio or Visual Studio Code.
Please note: The purpose of this tutorial is not to teach the general development principles of ASP.NET Core, but rather to introduce how website development works in Xperience.
You should already be familiar with .NET Core development concepts before you start the tutorial. To quickly get on board, you can use the following free resource:
While we won't fully leverage the MVC architectural pattern in this tutorial, you'll find knowing the concepts behind the approach beneficial to understanding how certain Xperience features work.
Xperience sites use two separate web applications – a Core application that displays the live site and an Xperience application for the website's administration.
Live site web users only interact with the Core application. When a user requests a page through their browser, the application matches the page URL to a corresponding route. The route targets a controller action that processes the request. Typically, the application uses the Xperience API and generated classes from the Xperience application to retrieve page data, and prepare appropriate models that pass the data to corresponding views. The views define the page output that is displayed in the browser.
Editors manage the content of the website in the Xperience administration interface, mainly in the Pages application. They create pages organized within a content tree and edit content by entering values into page fields (based on the content structure designed by the website's developers) or by using the page builder interface. The developers display the content on the live site via the Core application through the use of the Xperience API.
The Core application and Xperience application are configured to run as servers in a web farm. This configuration is possible because both applications use the same database and perform operations through the Xperience API. The web farm synchronization ensures that data and file changes made by one of the applications are immediately reflected in the other.
For example, when a website editor changes the text of a page in the administration interface, the data is updated in the database. The Xperience application then initiates a synchronization task, that the Core application runs to invalidate the matching data in its cache. When a new request for the content comes, the Core application serves the updated content from the database. The same process works for site settings and other values configured through the administration interface, as well as files.
The following scheme summarizes the architecture and data flow of an Xperience site.
If you run the live site and administration applications on different domains, you need to acquire licenses for both domains. However, you only need to purchase a license for the live site and the additional license for the administration is provided for free. Find out more about licensing for Xperience applications in our documentation.
The following table sums up the benefits of the Xperience development model:
Developers | Content editors |
|---|---|
|
|
To get the best experience out of this short tutorial, follow the sequence of the pages in the specified order:
Next page: Setting up an Xperience Core project
Completed pages: 1 of 10