Creating a Slim Web site

May 8, 2012

Creating a Slim Web site

Whilst WordPress sites seem to be becoming the mainstay of our hosting and development efforts, from time to time we are asked to look at web based solutions that require a different approach.

Recently, we were asked to develop a “single view of the customer” to link data and login/permission functions between three existing web sites. The problem being that each of the existing sites is based on different software platforms, each requires different data and each uses it’s own login mechanism.

The solution we devised was to add yet another web site, this one offering both an “API” low level connection that the individual web sites could call on to authorise users and provide the needed data. In addition to the low level API the web site would also have it’s own front end, allowing administration functions so user permissions and history could be viewed, edited and reports generated for internal use.

For this solution we used two frameworks, a framework called “Slim” provides the web application’s routing and template rendering to both display pages to administrators and to provide XML or JSON data feeds to the other web sites. Secondly we used a framework called “Propel” that both simplifies the process of managing and collating the data from the database but also gives an element of flexibility, creating a true MVC architecture for the web application.

Adding FPDF support to the web application has also allowed the provision of custom PDF reports to be displayed to users and also created and automatically emailed on a daily/weekly/monthly basis.