Bloglapse Blog

It's Blog about coding Blog in PHP with sidequests.


This blog is going to be about coding in PHP. As an example I will chose to work on simple, brand new Blogging solution with focus on performance and code maintainability.

Installing PHP

Short introduction how to install PHP and run sample php script.

PHP and object oriented programming

Short overview of Object Oriented Programming in PHP with some common features that are going to be used during development of this blog.

Creating database connection class

Creating database connection class and introduction how to work with data in PHP, solution to some common issues when working with data such as batch inserts or out of memory exceptions.

CRUD layer for db connection interface

Building layer to help with common operations such as create, read, update and delete (CRUD).

Repository implementation in PHP

Simple PHP repository implementation, using repository for constructing and persisting application objects.

Unit testing basics

Short introduction to unit testing, difference between pure and impure functions.

Mock object

Mock object, simple implementation, unit testing with mock object.

Collecting test results

Collecting Test Results

Generic data mapper

Generic convention based one to one data mapper.

Grouping related repositories into units

Grouping related repositories into units, simple usage within the controllers.

Lazy initialization

Lazy object initialization.

Class loader

PHP class loader.

Session component

Simple session component implementation.