Category Development

Development

Observer Design Pattern in JavaScript

The Observer Pattern is about a “one-to-many” relationship from one object called Subject (or publisher) to one or more objects called Listeners (or observers) that get notified when the Subject changes state. Therefore, several listeners could depend on one object to change for them to perform any action.
Svelte Logo

Svelte 3 Got My Attention

Svelte is different from a framework or a library in the sense that it is really a compiler that creates small components for your application. Those components are already optimized for the browser.

Critical Path CSS in Laravel

This approach should work well for small to medium projects. But, for very large projects, you probably would like to just include the CSS directly without having to use the file_get_contents function.

Queue Data Structure in JavaScript

It is easy to limit the functionality of an array to make it work as a particular queue or stack data structure. I personally believe that instead of using the array object directly, it is better to constrain it to the methods required by the job instead of leaving every method public that can be misused by other programmers.