Skip to content

Month: August 2017

How Eloquent breaks the Single Responsibility Principle, and why I’m okay with it

Hi everyone I thought I would discuss a controversial one today, in order to give an articulated response to a common argument about Eloquent (and generally the Active Record pattern) Firstly, just in case you don’t know, here are some definitions: Single Responsibility Principle: The “S” in the “SOLID” principles. In short, this means one class should have one job. The idea is to keep your code modular and easy to switch out. SOLID Principles: I’ll do an article on this one day, but it’s a discussion for another time. Like all principles or methodologies they’re like the Pirate’s Code, they’re more…

1 Comment

Using Git to effectively manage your code

Hi everyone This time I thought I would give a quick insight into the ways which I have found to be best when working with Git. Especially if you’re in the position where you’ve never had to manage or decide the direction of how to use source control. I’m sure you all know the benefits of source control, whether Git or other, but I thought it would be worth highlighting them anyway: Structured, integrated development (that is, you can have multiple people working on the same project/release at any given time) Simplified deployments Easy way to track where your code…

Leave a Comment

Setting up Private Packagist & BitBucket or GitHub

Hi all This is a really quick tutorial, because frustratingly I couldn’t find one that offered me this quick guide that had an integrated approach to doing this. I’m going to mostly cover the bits that I had to learn myself through Googling etc. in the hope that you won’t have to waste hours on Stack Overflow and so on trying to figure out how to get it working. I’ve used composer a million times, but always as a consumer, not as a publisher. Least of all as a publisher on private packages. This tutorial makes a couple of assumptions:…

1 Comment

Some quick translations, OO PHP to C#

So a recent project has facilitated me brushing up on my C# – so I thought I would share some basic translations of things that can be frustrating when you know the usual programming principles (object orientated programming), but not all the syntax. A quick couple of points to note: C# is a strictly typed language, that means you have to know about what your variables are going to be, and yes, you have to declare them somewhere sensible Accessing methods and properties within your class does not require usage of $this – you’re talking about true scope of variables…

Leave a Comment