M'Cheyne Scripts

This page gives some of the technical background behind the interactive M'Cheyne daily Bible reading calendar. For a description of the Bible reading scheme see my M'Cheyne Bible reading page.

The calendar now has a client–server architecture.

The Clients

The M'Cheyne calendar client is at http://www.edginet.org/mcheyne/calendar.php and is what you can access to look up the daily readings with your web browser. The client is responsible for formatting the data as XHTML and handling the user interface and stylesheets. It is now written in PHP, which is faster and much easier to maintain than the original version in Perl.

Almost all of the work involved in switching skins is accomplished by loading different style-sheets, such as green and grey. The generated HTML validates as XHTML 1.0 Strict.

You can see the PHP source code for the calendar client.

The great advantage of the new client–server architecture is that there can be many clients for the one server. So, in addition to the main Bible Calendar, the homepage on this site embeds a client which displays my current daily Bible readings. The RSS feed is also a client of the M'Cheyne server.

You can create your own clients too! Have a look at the M'Cheyne server page for some pointers.

The Server

To obtain the actual M'Cheyne Bible reading data the client sends a request to the server. At the moment this takes the form of a HTTP GET request to the server at http://www.edginet.org/mcheyne/server.php. The server consults the database of readings and returns the relevant data as an XML document. At the moment the server is also written in PHP and uses the fast and compact cdb database as a backend.

You can see the source code for the server too.

The great advantage of splitting the calendar's function into client and server roles is that a variety of clients can access the one server without having to duplicate the code and databases. So, not only the main calendar but also my homepage use the same server to supply the readings. This is very efficient. And what it also means is that you too can access the server if you want to incorporate the readings into your web pages. See the M'Cheyne Bible readings server page for more information about how to do this.

The calendar automatically generates links to online Bible texts for the chosen Bible version. The Bible texts are kindly provided by various sources, listed below. Please contact me if any links break, or if you can suggest more sources.

NIV, NASB, NKJV, KJV, ASV The Bible Gateway
ESV Good News Publishers
RSV, NRSV Search God's Word

You can also view the readings in my local ESV viewer. This retrieves the passages as XML from the excellent ESV webservice and formats them locally in my own style. One day I might implement alternate stylesheets here.