Building a Barebones Content Management System: An Introduction - yaapi and patTemplate and patUser = A barebones CMS (
Page 2 of 5 )
After numerous cups of coffee, many sleepless nights and endless Google searches, I found three useful APIs -- or PHP classes (to be technically correct) -- that I could integrate to fructify my "barebones" CMS.
So, how about a quick introduction?
First, I have "yaapi." According to Paul Gareau (the developer behind the API), yaapi (an acronym for Your Article Application Programming Interface) is a "programming interface that makes displaying articles on your webpage easy." In other words, this is a no-frills PHP class, equipped with a bunch of useful properties and utility methods that help manage and retrieve content (stored in a MySQL database) in a logical manner.
One of the significant advantages of using a CMS to drive a website is the ability to use templates. This is a simple concept that allows the web master to abstract the creative design from the programming bits. If you take a quick look at any popular website, you will not fail to notice that significant components of a web page are constant. For example, you may have a header with a logo and a banner, a left hand menu of hyperlinks and a footer with legal copyright notices, which leaves only the center -- the most dynamic location on a web page -- for you to worry about.
This is where a templating engine such as "patTemplate" comes in handy. A part of the very popular PHP Application Tools (or PAT) group of APIs, patTemplate is a versatile templating engine that supports a wide range of features, as you shall find out during the course of this series.
The two -- yaapi and patTemplate -- working hand in hand should be able to fulfill most of my requirements for building a barebones CMS.
However, one of the major drawbacks of yaapi is the lack of security for its administration module. While I could implement HTTP Authentication to ensure some basic security, I wanted to take this opportunity to get my hands dirty with another useful API developed by the team behind patTemplate -- "patUser." According to the official description at http://www.phptools.de/, patUser is a "user management class that helps you with authentication, group and permission management, statistics and more." It's just the tool needed to password-protect the administration module for yaapi!
That was a quick introduction to the three packages that I intend to use. Now, it's time to start knocking them off the list, one by one.