Photo by Dmitry Demidko on Unsplash

If you haven’t read my previous article and are not familiar with what overriding native prototypes means, check it out over here

Upon first glance at the title of this article you may be thinking, preventing a bank robbery with JavaScript? How does that work?

I’d like to compare the DOM of your website to your bank account. It’s your private property and you should be the one deciding how and when it should be used. In this article, I’d like to examine the available options that are available to developers in order to empower them to manage the DOM.

Photo by Mario Mesaglio on Unsplash

Today I’m going to discuss a more controversial topic in JavaScript programming, overriding native prototypes. First let’s give a brief overview of the prototype chain in JavaScript.

Taken from MDN:

When it comes to inheritance, JavaScript only has one construct: objects. Each object has a private property which holds a link to another object called its prototype. That prototype object has a prototype of its own, and so on until an object is reached with null as its prototype. By definition, null has no prototype, and acts as the final link in this prototype chain.

For a concrete example let’s…

Photo by Victor Garcia on Unsplash

Builder Pattern

The builder pattern allows for the creation of a complex object in a procedural manner.

Imagine a scenario where you’re creating an application that allows the user to build their own house. Since you want your users to like your product, you provide them a tremendous amount of options. They can add pools, gardens, internet, walls, and even a roof (imagine that, a real roof!). There are several ways to approach this from a code perspective.

The first solution is by creating a monster constructor for the House class. This constructor can accept a massive list of parameters that define…

Photo by Kevin Ku on Unsplash

In this series I’m going to be talking extensively about design patterns. More specifically, the 23 design patterns outlined in the book commonly referred to as “The Gang of Four”. In reality “The Gang of Four” refers to the four authors who created the book “Design Patterns: Elements of Reusable Object-Oriented Software”.

Now you may be asking yourself, what the hell is a design pattern anyway? To quote Wikipedia “In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design.”

For those of you who use Laravel, interacting with files is extremely simple thanks to the Storage Facade. Everything is abstracted away very nicely. Today, I needed to change the upload flow for the application I was building. Until now it was using the Storage Facade and everything was working nicely. The client uploads the files to the server and the server handles the upload to S3.

The issue with this approach is apparent when working with very large files. There’s no reason to hit the server with every file upload only to forward it to S3. Enter presigned URLs.

yaakov beckerman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store