Question mark and query strings in Apache Rewrite Rules

The apache rewrite module is very useful for defining precise URLs according to our needs, hiding also what we don’t want to expose to the final user. The RewriteCond means “execute the next RewriteRule only if this is true”. An example can be a redirect in the case of image […]

Read More…

CSS vh and vw units for responsive web sites

CSS3 responsive design vh and vw

Let’s talk about the CSS VH and VW units.Today’s websites must adapt better and better to new generations of browsers due to the fact that there is no longer a single type of device on which our site can be viewed. There are now an infinite series of devices, including […]

Read More…

Angular Adapter pattern

Angular Adapter pattern

Let’s see an Angular version of the Adapter pattern.Mapping allow us to decrease coupling between what arrives from a remote BE on our FE. We can take advantage of one of the Gang of Four’s design patterns (the Adapter pattern) to transform the external response in what we want. Adapter […]

Read More…

PHP 7 operators: null coalescing (??) and space ship (<=>)

There are two changes regarding PHP 7, concerning two new operators that have been very useful to me during my years in PHP. The “null coalescing” Operator: ?? In an expression it will return the left operand if this is not NULL, if this condition does not occur the right […]

Read More…

Simple logging system for Angular

Logging system

It can often be useful to have a centralized point where to keep an eye on the events that occur on our site. Today we’ll create a simple logging system for Angular, to manage everything in one place. To start, we create the enum that takes care of ordering the […]

Read More…