PageCentric 2.0 is a light-weight web framework that assembles HTML file fragments into a full web page.

HTML fragments common to all pages are stored in the '_site' directory, while page specific fragments are stored in their own directory.

The original PageCentric framework (version 1.x) was more similar to other backend frameworks such as Ruby-on-Rails, etc. While development of PageCentric 1.x has now ceased, the original documentation and source code is available under the Legacy page.

The initial implementation of PageCentric 2.0 has been implemented in PHP. A project using PageCentric has the following files within its project's top directory.

(Project)/latest/(project)
(Project)/latest/(project)/bin/index.php
(Project)/latest/(project)/configuration/configuration.php
(Project)/latest/(project)/dep/libpagecentric
(Project)/latest/(project)/resources/...
(Project)/latest/(project)/share/content/...

As shown below, project files will typically be linked from the Apache website's document root. This allows 'latest' to be a symbolic link to a versioned directory.

(DOCUMENT_ROOT)/(Project) —> (Project)
(DOCUMENT_ROOT)/index.php —> (Project)/latest/(project)/bin/index.php
(DOCUMENT_ROOT)/resources —> (Project)/latest/(project)/resources/

'bin/index.php' is the main entry point of the web application, and determines, based on the URL, what PHP object will be responsible for generating the outputted HTML page. In many cases, the 'bin/index.php' file can be link a default version provided by Page Centric.

The configuration file is mainly responsible for specifying where web site files should be retrieved from. Usually, this would be 'share/content'. It also shows how other PHP might be included if necessary.

The 'dep' directory contains any PHP library dependencies, including the PageCentric library ('libpagecentric').

Under the 'resources' directory will be web site reources such as CSS, Javascript files, and images. Under the 'share/content' directory will be the HTML fragments that are joined to produce web pages.

The following sections describe the 'configuration.php' and 'index.php' files, as well as the libpagecentric library implementation.