Posts with the tag code:

Migrate Entities to Microservice From Doctrine

Doctrine is one of the most used ORMs in PHPLand, with many applications heavily coupled to it. With more and more companies moving to microservices one of the tasks is to migrate their entities to come from the microservice instead of from Doctrine. Here I’ll describe how I migrated an entity so that it was stored in a Microservice instead of MySQL and came from Doctrine. In my approach I used the original entity class, this allowed for using feature flags for migrating each repository method one at a time.

Business Value Over Correctness

So last night I managed to get myself into a twitter fight that I think brings up an important aspect of software development and highlights two different mindsets within the software development world. So here I will try to explain my position and theirs in a better format than 280 characters and while it’s not 3am. Quick Breakdown of the Fight The Twitter fight was over the idea that there are some bugs found by QA in code that has been in production for years and has never happened to another person ever and these bugs aren’t worth fixing.

Revel : Force template format

So in Revel you can have your template in several different formats: html, json, xml, or txt. This is super awesome. As it allows you to send the same data and display different formats - Obivously. It also determines what template to use based on the http request headers that have been sent. So if your request sends that it accepts application/xml it’ll use xml and if you request says application/json it uses json.

Observer pattern in golang

For some reason at some point, I thought it would be hard to implement the observer pattern in Go. Then I made an issue for me to blog about it. Well it’s not hard. It’s as easy as it is in every other language. Observers First part of the observer pattern is you need the actual observers. The logic that you want executed whenever something happens. Here I’ve just put a simple log print statement that will print out the name of the hook to the log.