Blog:

My thoughts on software development.

Categories

I have many interests in software development and I enjoy writing about then. As such my blog doesn't cover just one topic.

Managing projectors is harder than you think

We've discussed the [bones of projectors in the past](/blog/projection-building-blocks-what-you-ll-need-to-build-projections), this time let's go deeper and look at how to manage them. At it's simplest a projector is something that takes in a stream of events and does some work on them, projecting them into whatever shape or operation is needed. Like anything though, there's more to it than that, lots more. That's what this article is, my attempt to discuss the complications and problems you will run into while working with projectors day to day. # Run modes Let's start simple, let's talk about the different modes of projectors a...
Read more »

Domain Driven Design for Everyone Else

I've been talking a lot about Domain Driven Design (DDD) lately, be it at meetups or with clients, so I thought I'd write down my thoughts and see if it helps. Now, lots of people have written about DDD from a technical perspective (see the end for links), so I'm not going to do that, instead I'm going to discuss DDD from a non-technical perspective. This is DDD for everyone else. ## Solutions Always Overrun Designing and building a solution is not a trivial problem. It never goes smoothly, and even if it's completed on time (which is never) the solution is usually ineffective and needs to be changed, often drastically. This lea...
Read more »

Communication styles - Working effectively as a team

This idea for this article came from a twitter thread by [@ErynnBrook](https://twitter.com/ErynnBrook/). The t...
Read more »

Acceptance testing your PHP app with ease

Acceptance tests are core to any stable system, they're how you make sure it actually works, start to finish (My preference is to write them first, use them a guideline to make sure the feature I'm writing works as expected). When writing acceptance tests, it's best to treat the system as a [blackbox](http://softwaretestingfundamentals.com/acceptance-testing/), inputs go in and outputs go out, that's it. This proves our app works and can be interacted with by other systems. Some frameworks come with this built in, like [Laravel](https://laravel.com/), but not every app is written in those frameworks, infact most are not (especially...
Read more »

Immediate vs eventual consistency

In the [last article](https://barryosull.com/blog/projection-building-blocks-what-you-ll-need-to-build-projections) we looked at projectors, the backbone of any CQRS/Event Driven system. This article was originally meant to be about implementing projectors, but I realised there was an important question to answer first, one that would shape the solution, "When do we project the events, now, or later?". Turns out this question has far reaching effects, so it's important we dig into it before moving onward. # Immediate vs Eventual Consistency When it comes to projectors there are two choices, immediate or eventual consistency. With i...
Read more »

Writing a DSL parser using PegJS

In the [previous article](/blog/write-dsls-and-code-faster/) I wrote about Domain Specific Languages (DSLs) and how useful they are, but I didn't get into the details of parsing them, that's where this article comes in. Previously we made this DSL: ```javascript User.ScheduleAppointment has { a UserId userId an AppointmentDatetime appointmentDatetime a Location location from { a LocationName locationName from location a Latitude latitude a Longitude longitude } } ``` We want to take the above, and parse it. That means turning the text into an Abstract Syntax Tree (AST). An AST is a tree structure that's easy ...
Read more »

Projection Building Blocks: What you'll need to build projections

Let’s talk about projections. This topic is quite large, so this is the first part in a four part series on projections. 1. **Projection Building Blocks**: What you'll need to build projections 1. **Broadcasting events in PHP**: Techniques and technologies 2. **Designing Projections**: How to design and implement real world projections 3. **Projection DevOps**: Continuously deploying new/updated projections with zero downtime If you've read my previous articles, you should have the basics of [event sourced](event-sourcing-what-it-is-and-why-its-awesome)/[event driven](https://dev.to/barryosull/event-granularity-modelling-even...
Read more »

Write DSLs and Code Faster

# What is a DSL DSL stands for Domain Specific language, this means that it is a language that is designed to solve a specific problem in a domain. DSLs are great if you want to write a generic solution to a specific problem without all the boilerplate code. A good DSL is easy to write and understand. Once someone understands the domain language, they can read the DSL, and understand the problem, even if they're not a coder. DSLs allow us to automate many things, including aspects of development, greatly increasing our speed and lowering codes and error rates. # Here's one I made earlier At work, I was getting annoyed with how it a...
Read more »

Expert help

Have a codebase where change is expensive and risky?