Failing Domain Rules and Validating User Input

An interesting predicament that all applications will face is, how do you validate incoming data, and how do you communicate errors back to the user interface? As we’ve seen over the last couple of weeks, we can encapsulate Domain related rules and logic inside of the Entities, Value Objects and Specifications of our application. These […]

Continue reading...

What is the Domain Model in Domain Driven Design?

If you have been following along with my Building Cribbb series you will probably already be aware of the fact that Domain Driven Design has a lot of terminology. To understand Domain Driven Design, you really need to understand the terminology. However, I often find that terminology in the absence of real world context is […]

Continue reading...

Creating and Using a Command Bus

There are three different layers to Domain Driven Design applications, each with their own roles and responsibilities within the application stack. Over the past couple of weeks we’ve been looking at mainly the Domain and Infrastructure layers of our applications. Whilst the Domain and Infrastructure layers are important, we are missing one important component of […]

Continue reading...

Creating your own Domain Event Dispatcher

A couple of weeks ago we looked at implementing Domain Events. Domain Events form a crucial building block in Domain Driven Design by allowing us to effectively decouple our application using the Publish-subscribe pattern. Whilst the vast majority of the time I will be the first to advocate using an existing Open Source package, I […]

Continue reading...

Building a Password Reminder Domain Service

Last week we looked at writing the registration component of Cribbb as a Domain Service. The registration process is going to be a very important part of Cribbb and so I decided to model it as a Domain Service. Registering new users into a new application is fairly straight forward and fits nicely into the […]

Continue reading...

How to create an Active Record style PHP SDK Part 16

A couple of weeks ago we looked at setting up the foundation for the persistence aspect of this Active Record style PHP SDK. The Active Record pattern states that each model object should have public methods for creating, updating, saving and deleting directly from the data store. Last week we looked at providing that public […]

Continue reading...

Creating a User Registration Domain Service

Nearly all consumer facing web applications will require registration functionality in one form or another. The registration process is often the first contact that the user will have with the internal flow of an application. It’s therefore very important that you make a good impression or the user might never give your application a second […]

Continue reading...

How to create an Active Record style PHP SDK Part 15

Last week we looked at building out the functionality to serialise model objects into JSON that can be sent to the CapsuleCRM API. We are now at the stage where we can call the toJson() method on a model object and have that object serialise itself into JSON that satisfies the requirements of the API. […]

Continue reading...

Creating and testing Doctrine Repositories

A couple of weeks ago we looked at the benefits of using Repositories in web applications. We also laid the foundation for the User Repository by writing the initial interface. There are many benefits to using Repositories in web applications. For example, coding to an interface, hiding the details of the storage provider and making […]

Continue reading...

How to create an Active Record style PHP SDK Part 14

Last week we started looking at adding the functionality to persist entities to the API. Part of the beauty of the Active Record pattern is how easy it is to persist records to the data store. This is because each model object should have everything it needs to read, write, update and delete. However, in […]

Continue reading...

Supported by