Pages Framework

Pages Framework Home page

The Pages Area of the Owin Framework

This area of the Owin Framework contains equivalent functionallity to Microsoft ASP.Net + MVC, Microsoft Katana, or Microsoft Core. Unlike the Microsoft implementations, this was designed from the outset to be an open architecture that can be built to by many independent contributors.

Architecture Overview

The Pages Middleware has the following architecture at the highest level:

Layers of OWIN

At the core is a Fluent Builder. This class implements interfaces for building various elements by delegating to plug-in builders. The Pages middleware project contains a complate set of builders already, but other developers can publish alternate implementations and application developers can also register custom builders with the fluent builder.

The Fluent Builder provides a fluent syntax for defining pages, layouts, regions etc that define your entire website and webservice endpoints but it is too long winded and detailed for many situations so there is another layer on top of it to make common tasks more straightforward.

Packages use the Fluent Builder directly to define reusable packages. For example the Owin Framework Pages Middleware comes with a number of packages. These packages contain layouts, regions, components and services that can be added to your website in a single line of code. An example of one of these packages is the menu package which can render a responsive drop-down menu which becomes a slide-out hamburger menu at small sizes. You can see this package in operation on this website.

Template parsers parse text files that are deployed with the website and contain templated content. There are a few parsers built into these packages, other developers can also publish parsers that support different syntaxes and data binding and repeating schemes. Template parsers use the Fluent Builder to construct various elements from the templates that they parse.

Template loaders retrieve templates and push them through a specific parser. The template loaders then watch for changes and update the elements by parsing the changed templates. There are template loaders for the local file system and for downloading from a URL. It would also be quite easy to write an application specific one that reads templates from an application database.

The CMS portion is a combination of a specific database schema, a template loader that understands this schema, a UI for creating and managing webpage elements in the browser, and a back-end service to support the UI. This provides a way for non-developers to make simple changes to pages on the website. Note that this is not a comprehensive Content Management System, more of a page layout editor.

Further Reading

Read details about the Elements that are constructed and configured by the fluent builder.

The Hello World getting started tutorial will walk you through the first steps of buiiding a website with this technology.

Walkthrough of how to build a website with the Owin Framework will show you step by step how to build a complete website. Note that this website was written entirely using the Pages middleware and is also open source and therefore is a good source of examples.

Walkthrough of how to build a microservice with the Owin Framework will show you step by step how to build a microservice. There are large commerial websites that have millions of users build entirely using this technology. The Owin Framework Pages middleware is designed to scale up to hundreds of millions of users on a website.

There are also pages describing the data provider model, localizing your website for visitors from other countries, diagnostic tools to help you to figure out what's going on.

Related Projects

These are the most important projects to become familiar with: