The TextSide engine in a generic framework that helps make websites. The engine can be used either completely as a content management system or instead as a light weight framework for your own code. The engine is flexible, allowing you to choose the features that you need and start adding content sooner.
On a very high level TextSide just routes incoming requests to pages that you create. TextSide provides ways to easily create these pages, add content to them, and style them with a theme, or skin.
TextSide can serve the following types of pages:
Regular Pages
Plain .html, .php, etc. files that you have on any other web server. TextSide will show requested files immediately without using any features of the Engine. This allows you to use TextSide while still supporting your regular content, such as static html pages or other web apps such as forums and wikis.
CodeBehind Pages
These are php pages that are loaded by the TextSide engine. As a result, your code within them as special access to features that make development easier. For example: a mysql connection, user accounts, security, a template engine, utility classes, and more. CodeBehind pages can either be plain .php files or can implement a page class within them. By doing this the CodeBehind page will automatically be styled with your sites current theme AND will be able to have parts placed on them (see Virtual Pages for more details)
Virtual Pages
Virtual Pages have no physical file and exist completely in TextSide's database. These pages can be created 'on the fly' and can have content added to them by using 'parts'. Parts are reusable components that allow you to add content to a page. These are similar to 'Widgits' that you see on current operating systems. For example, there might be an HTML part, a calendar part, a Google maps part, a weather part, a BBCode part, a user login part, or more. You can easily drag and drop any number of these parts onto a page to add content. This allows you to easily create new content and update current content quickly.
Mixed CodeBehind and Virtual Pages
TextSide's real power lies in its use of CodeBehind and VirtualPages. The engine keeps track of both in its database, allowing them to be mixed seamlessly together. For example a CodeBehind page can have static php content together with virtual parts placed along side it. On this page the site navigation is created with a CodeBehind file while the text that you are reading was typed within a virtual part placed on the page.
The TextSide engine can also link CodeBehind and Virtual Pages together using the concept of
Page Templates. This feature allows a page to point out another page as its 'parent' or Template. All the content from parent page is also shared on the child page. This allows you to easily share content among multiple pages in your site. For example, lets say you have a site wide navigation on the side of your page. You don't want to recreate this navigation for every page - keeping it up to date would be impossible. Instead you can create a Page Template with the navigation inside of it. Other pages that you create can then use that Page Template and automatically gain the navigation code. For example, this site uses the same concept to share the navigation among all pages. You can view the template file at:
http://www.textside.com/Templates/MasterTemplate
TextSide follows certain steps when a user requests a page. TextSide must translate a user's url, for example "http:\\www.site.com\test\hello" to a page that should be rendered and served. When serving a page, TextSide uses the following steps:
Step 1 - Regular Pages
It looks for any Regular Pages placed in site/webroot. If a page can be found it is served immediately without starting the Engine.
Step 2 - Code Behind Pages
If no Regular Page can be found the Engine starts up and looks within the site/control directory for any CodeBehind pages. When looking for CodeBehind pages the engine
ignores the file extension that the user enters and uses the url path to find a matching file within the control directory.
For example, for the following:
http:\\www.mysite.com\test\hello
http:\\www.mysite.com\test\hello.php
http:\\www.mysite.com\test\hello.aspx
The engine would extract the path
test\hello and use it to load the page
site\control\test\hello.php
The engine also allows CodeBehind pages to be placed within their own directory and named 'index.php' for convenience.
For example, if
site\control\test\hello.php did not exist the engine would look for
site\control\test\hello\index.php.
If a CodeBehind page is found it is rendered and served.
Step 3 - Virtual Pages
If no CodeBehind page is found, the Engine will next look for any Virtual Pages in its database. If a page with a matching url is found, it is rendered and served.
Step 3 - Error 404
If no Regular, CodeBehind, or Virtual Pages are found, the Engine will serve site/control/error/404.php by default. This displays a Page Not Found error that fits in with your current site theme. For an administrator, it also provides a link to create a Virtual Page at the requested url.
TextSide is used to help create your site quickly and easily. When developing your site you can choose how much of its features you want to use. For example, if you are building a small web app, you can completely ignore the use of Virtual Pages all together. Instead you can use CodeBehind pages and just make use of its extra features and functions.
Usually in development I find myself using a mixture of both Virtual and CodeBehind pages. All customized and interactive content is created with CodeBehind pages while pages that are devoted to just content are created using Virtual pages.
TextSide is divided into 3 main folders: config, site, and core.
config contains any configuration information, core contains the TextSide engine, and site contains all of your content.
When creating a site you will be working within the site directory.
Within the site directory, you'll see the following main folders:
webroot - Webroot is a folder where you can serve any regular pages. This folder can contain any static html content or other apps such as forums or wikis. Any pages that are placed in this directory are served to the user without using any of the features of the TextSide engine.
control - Contains all CodeBehind pages. Pages created here are run within the engine and have access to all TextSide features.
themes - Contains all themes or skins for your site. You can customize your sites look and feel here.
parts - Contains all Parts for your site. These are the reusable components that can be placed on your pages to quickly add content. You can either create your own parts or download new parts online.
lib - A convenience folder for placing any libraries that are shared among your project. By default it is empty.
media - A central folder where uploaded content can be placed, such as music and photos. Parts will often use this folder to store uploaded content.
For a brief introduction to doing some basic tasks in TextSide you can take a look at the
Getting Started Second.
If you're interested in creating CodeBehind pages, custom Themes, or even your own Parts that you can share with the world, take a look at the
Development Section.
Good luck and welcome to the TextSide Engine!