Develop a Blog - Part 2: TDD first Domain Models

In the previous article we made an initial design for a blog based on a list of requirements. Today we will start writing some PHP code. We will use the class diagram from previous article as a guide, but we will use Test Driven Development (TDD) to hash out the details of our design. The TDD approach will help us to make sure we keep our code easy to read, working and testable. This might lead to some different design decisions than we made in the previous article, but that is the beauty of programming. The code and our designs will keep evolving while we are writing our application.

Read on

Develop a Blog - Part 1: Requirements and initial design

Building PHP applications is easy. You create a PHP file, write some code and put it in the root directory of a web server and you have a working dynamic website. This works great for small applications, but as soon as your application becomes more complex it can become quite cumbersome and hard to maintain.

In this series of articles we will discuss how to build a web application in an object oriented programming (OOP) way using Domain Driven Design (DDD). In this first article we will discuss the requirements for a simple blogging application such as the one used at Webdevils.nl. We will use the language used in the provided requirements to define an initial design for our application. Using this technique we will have an easier time talking to our customer and verifying our application as we will be using the same words describing our blogging application.

At the end of this article you will have an initial class design that you can use to develop your own blogging application. In the next articles of this series we will use the design to refine the requirements and develop the blogging application in PHP.

Read on