Dependency Injection is a software design pattern that allows avoiding hard-coding dependencies and makes possible to change the dependencies both at runtime and compile time. By using Dependency Injection we can write more maintainable, testable, and modular code. All projects have dependencies. The larger the project the more dependencies is it bound to have; now having a great… Read More


Defining SOAP and REST SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) are both web service communication protocols (technically speaking, REST is an architectural style, not a protocol).  SOAP was long the standard approach to web service interfaces, although it’s been dominated by REST in recent years, with REST now representing more than 70% of… Read More


What do developers mean when they say “serverless application framework”?   Is it truly serverless?  How is it achieved? I believe the right way to look at serverless isn’t “no server” but “less server.”  The idea is that you focus on what’s unique (code) and let someone else manage the infrastructure.  Unlike Platform-as-a-Service (PaaS) that is… Read More


Dissecting the question, we have two operative terms here: “readable” and “maintainable.” Let’s talk about what these mean. “Readable” would describe code that is understood without much inspection or explanation by another developer. You have to choose what parameters you want to describe the “other developer” to know what would be readable to them. Some… Read More


With the deprecation of the target attribute in XHTML Strict, opening links in new windows has become a bit trivial, if not annoying, to standardize. I always look for a consistent, unobtrusive approach that degrades gracefully; and since I use jQuery quite frequently, this is how I usually handle them. The solution is a small… Read More


Before HTML5, working with arbitrary data sucked. To keep things valid, you had to stuff things into rel or class attributes. Some developers even created their own custom attributes. Boy, was it a mess. But that all changed with the introduction of HTML5 custom data attributes. Now you can store arbitrary data in an easy, standards-compliant way.… Read More


Most teams have some amount of technical debt. Others are crushed by it. It really shouldn’t be this way. For decades, we’ve been aware of good development practice. We know the things that we should do to avoid incurring technical debt and start paying it back. Clearly, something else is going on. In this talk,… Read More


Jeroen Moons shares his advice for getting a legacy codebase under control. It’s full of great information, and my favorite quote is on how the code base came to this: As you poke and prod the area just past the warning sign with a stick, you might wonder: how on earth can anyone have let… Read More


UNION The UNION command is used to select related information from two tables, much like the JOIN command. However, when using the UNION command all selected columns need to be of the same data type. With UNION, only distinct values are selected. UNION ALL The UNION ALL command is equal to the UNION command, except… Read More


Sometimes you might need to create a variable in PHP having the name of some value.  Below is the easiest way to accomplish this need.

 … Read More