The Resource Model for Web Design

Coding Examples

The Resouce Model for Web Design holds that certain elements in web design–such as the database connection, the output buffer, the message object, the web site identity object, and so on--should be considered resources that are available throughout the program.

The programmers of PHP appear to have succumb to a destructive ideology called Design Patterns that holds that all objects within a program must be contained within an hierarchical class structure.

The idea that programmers should be able to, willy-nilly, access code at any point in a program is considered an "anti-pattern" by the intelligentsia. In this work, I want it made clear that I am not only encouraging the used of "anti-patterns." I am boldly proclaiming that active use of anti-patterns is the best way to engage in web site design.

The practical problem is that, in PHP, objects are only available in the scope in which they were declared. Functions, on the other hand, are global; The path I am going to take is to encapsulate "objects" in "functions."

I am creating this code for entry level and amateur programmers. I hope the project creates a dialog about the nature of object oriented programming and that people learn to recognize "design patterns" as an ideology that we should resist.


I want to test each line of code on both a PHP 5 and PHP 7 server in production. PHP 7 was released yesterday (December 3, 2015). I had made the decision to use Ubuntu for the web server, and Ubuntu hasn't created a script for installing PHP 7 yet.

I am writing in a shell for the program in HTML as I wait for the script.

Resource Model - - writings