Website:Introduction
From MatureAsskickers Wiki
Contents |
Foreword
This is considered my 4th generation of a content management applications. It essentially began in May 2002 when I was given access to a Microsoft server running ASP and an Access database. Development was relatively straight forward since I already had some experience with an interpreted scripting language with Allaire's ColdFusion 4.0 [1] and Access databases. Within a month I was able to produce a very simple and limited CMS [2]. Where have the days gone? In October 2002 the host moved to a Linux server where I created a my first LAMP [3] (Linux, Apache, MySQL, PHP) application. The CMS served its users well, but due to thousands of file uploads the PHP scripting and MySQL database showed definite signs of overload and I learned alot about performance. In March 2004 I had a 3rd generation written which included a customized cache that performed very well. However feature creep [4] had turned the application into a giant beast that included more than 25,000 lines and 1,200,000 characters of PHP code and 40 MySQL tables. Due to it's complexity the layout was impossible to change unless the designer knew exactly how the application worked. I realised almost immediately that development was going in the wrong direction. I took some time (along time) to familiarize myself with some new emerging technologies and revisit some existing ones. It's been 3 years of learning, experimentation, and a couple re-writes to finally get to this release. I am satisfied because it has achieved all of the design goals I noted in 2004.
- Create a data to design abstraction with MySQL to HTML (ie. XML).
- Utilize a structured cache with data abstraction (ie. Smarty).
- Simple User and Group tiered security (ie. CSV Permissions)
- System integration with Apache, Sendmail and FTPd.
- Allow scalability and extensibility (ie. 100% PHP class implementation)
- Give accessibility to content.
- Documentation (ie. you're lookin' at it)
The test of time will tell. - Aluzion
Abstract layers
The website application is composed of 3 abstract components. The database, the logic layer and the presentation layer. The abstraction of these layers requires the web author (web designer) to only work with the presentation layer in order to produce web content.
The database
This layer consists of a MySQL [5] database that is responsible for storing data for the logic layer. You, the web author do not need to worry about how the data is stored and should refer to the logic layer on how to read and write data from the presentation layer.
The logic layer
This layer consists of PHP [6] scripts which are responsible for controlling and strictly validating the flow of MySQL data to and from the presentation layer. It is the work horse that is responsible for managing the relationship between the database, filesystem, and the web browser's session. The only method in which the data can be accessed by the presentation layer is with XML [7]. Web author's and designers do not need to worry about the specific inner workings of this layer as its aim is to provide a handle to the MySQL queries transparently to/from the presentation layer.
The presentation layer
The function of this layer is entirely up to the web author, but it's aim should be to present the data to/from the logic layer in an intuitive and usable format. The most obvious method that this can be achieved is by accessing the logic layers' XML and presenting the data with HTML and Javascript (AJAX) [8]. However there are many other way's to format XML for the browser like XSLT [9], or writing a Mozilla [10] extension [11] or plugin [12]. As you can see the presentation layer is not only restricted to designs for just the web browser since there are other platform's to present it on such as with WAP [13]. The logic layer does not restrict which of these methods can be used to present the data, but this guide will refer to and attempt to produce examples using HTML and Javascript (AJAX) herein.
Other wiki sections
Reading Data
The presentation layer reads data from the logical layer through XML requests.
- See XML Data
- See Permissions
Writing Data
The presentation layer writes data to the logical layers through HTTP POST requests.
- See HTTP POST Data
- See Permissions
The Data
Primary Tables
These are the applications' primary table's that accept HTTP POST and also provide XML.
Other XML
These are the application's primary tables that do not accept HTTP POST but do provide XML.
Other Methods
These are the applications' other method's that accept HTTP POST but do not provide any XML.
Transparent Control
These are the system services that the application controls. These services are controlled transparently and the application does not provide any method's to the presentation layer for direct control.
