Demo site build in Umbraco v.9.0.0-rc003 and .NET Core 5.0.
This is a demo site for Umbraco v9 build in the new .NET Core v5 version. It is built as an experiment/investigation and should not be used as a template for your next Umbraco site. Use it as a reference if you will and steal whatever you like and ignore the things you dont.
This is not the way of building Umbraco sites, it's a way. There are less complex ways of building Umbraco sites (using ModelsBuilder for example, see discussion) so if you are new to Umbraco make sure you read the official docs and don't use this this project as your only source of inspiration.
- Every page is rendered through a RenderController (Route Hijacking).
- Every Blocklist item is rendered with block specific ViewComponents with strongly typed view models.
- Every view uses strongly typed View Models (inheriting from ContentModel).
- Page components that handles logic are rendered through ViewComponents.
- View components have Unit Tests.
- Non-logic components are rendered through Partial views.
- Custom services are registered in the IUmbracoBuilder through an IComposer.
- Constant classes are used when accessing content or property to avoid spreading magic strings.
- Forms are submitted through a SurfaceController.
- Examine searching. (#h5yr Andrey Karandashov)
- Products are fetched from external source and rendered using a ContentFinder.
- Site Settings and Variables for managing settings. See Variable usage example.
- RenderController: Home
- RenderController: Page
- ViewComponents: ContentBlock
- ViewComponents: Header
- ViewComponent: Footer
- SurfaceController: ContactForm
- UmbracoHelper: SiteSettings
- Relations: NavigationService
- ContentFinder: Products
This site uses an embeded SQLCE database to avoid having to restore and keep updating a restore script. To login to the Umbraco backoffice use these credentials:
- Username: admin@admin.com
- Password: adminadmin
Go to adolfi.dev if you want to read more Umbraco and Unit Testing articles.