Data Driven Web Site

December 8, 2015: This page will include a tutorial for creating a super fast data driven web site.

The World Wide Web and Relational Database are a natural fit. The world wide web was created with a language called HTML (HyperText Markup Language). The defining character of HTML is the hyperlink. A hyperlink is a link to another online resources.

A Relational Database is a database organized around the relations between tables of data. Both technologies are about making links.

In this tutorial I will use PHP, which is a server side scripting language, to create dynamic data driven web sites.

I should warn readers. Some of the techniques I am using are labeled "anti-patterns," to which I reply that the technology I am using is based on solid mathematical theory and that they've been proven through the years to outperform complex object hierarchies and they are actually easier to maintain.

A theory called "Design Patterns" holds that programming objects need to be organized in heirarchical class structures called patterns, and that failure to place objects in patterns is an "antipattern." In the article Patternism, I retort that this theory sounds more like an ideology than a technology.

In this tutorial, I will develop a technique that I am calling The Resource Model for Web Design. This model says that certain elements of web design such as the database connection, the output buffering and messaging object are resources that programmers should have access to at any point in the program.

I developed this technique for client-server database that contained hundreds of millions of records back when a hundred million rows was considered a large database. The code can handle a huge load of concurrent connections and is extremely robust.

Please note, this code is optimized for a client-server database. Such an arrangement involves two (or more) computers with the database sitting on a server protected by an additional firewall. To access data, the web server must log in the database server as a client. The database connection is resource intensive, consuming resources of both the web site and database server.

Ironically, I decided to write this tutorial using SQLite3. SQLite is an embedded database. The database lives on the same server as the web site. Opening and closing databases does not consume a great deal of resources. SQLite is okay for development projects and information sites. If you are developing code for a company, you probably want a client/server set up with multiple servers.

NOTE: I use vim as my text editor in Linux and the free open source program Notepad++ for my editor in Windows.

Resource Model Framework

To get started I wish to present the resources developed in this model ... to be continued. 12/8/2015 ... I now have to write this beastly little program. I will be back in a bit.