All Posts Tagged with OOP

Cleaner Database Queries with Repositories

The traditional way to query something from the database is just to execute a bunch of SQL statements from the controller and get the results. Or maybe you use some package or a framework component to abstract the database ac...
Read more...

The Goodness of Parameter Objects

Sometimes in your code, you'll notice a pattern in which a group of parameters are tend to be passed together. Multiple methods will use the same group of parameters, because one will make no sense without the others. These m...
Read more...

Improve Your Design by Coding to Interfaces

There's a big chance that you've heard of the design principle “Code to an interface, not to an implementation” before, but you don't know what it means. Or maybe you don't know how to apply it in your code. If that's the cas...
Read more...