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.
Do you work with Legacy code? You probably do and don't realise it. IMO, if the code is over 5 years old, messy and it makes money, then it's probably legacy. Legacy code is tricky, and most of us try to avoid it, moving onto sexy new ideas and projects as time moves on. This means that we never learn to deal with legacy, and all the while, the codebase is chugging along, getting worse and increasingly expensive to change. If we don't learn to deal with legacy code, then we'll never learn how to maintain systems over time. We need to address this.
That's where this article comes in, it is a collection of my notes from reading and a...
Read more »
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 »
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 »
This idea for this article came from a twitter thread by [@ErynnBrook](https://twitter.com/ErynnBrook/).
The t...
Read more »
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 »
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 »
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 »
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 »