Skip to main content

How to manage Webpack configurations

Configuring Webpack is quite easy but it may become more difficult if there are many environments and requirements. I’ve included Webpack in different projects recently and I would like to share with you an easy way to configure it. I’m sure there are many different ways to configure Webpack, maybe better, but I’m just going to compare two of them:

  • One file to rule them all
  • Extended configurations

Read More

Introduction to Node modules and ES Modules.

In one project I’m working on, we have migrated from a non-standard building tool to Webpack. This change has allow us to use a standard module system to import/export our code instead of the legacy builder we were using to just concatenate code.

Why is useful to use Javascript Modules?

Javascript modules are needed to maintain the principles of encapsulation and dependency.

As a project grows, it is useful to reuse pieces of software developed in isolation. When one of these pieces of software is brought into a project, a dependency between them is created. For example, many projects nowadays relay in some JS framework like Angular, ReactJS, VueJS or others. This concept is known as dependency.

When a dependency is created between these pieces of software it is of importance that no conflicts arise. This is known as encapsulation. Encapsulation is important because it isolates and guarantees that there won’t be any interference between different pieces of code.

Read More

My conclusions using Angular 2 for the first time

I’ve been working these days using Angular2 for the first time and this is what I have to say.

It hasn’t been easy to get used to Angular2 and I still don’t really know how some things are working. My rule of thumb: If it works, don’t touch it.Adrián Gómez

Before starting with this text, I have to say this opinion is totally personal and based in my own experience. Talking about my experience: I’ve been working with Angular 1 for more than three years. I started with Angular 1.2.3 and I’m currently using version 1.5.8 with these rules:

  • I use a Component based architecture and Components only deal with “scope”.
  • I only use Factory for services and they usually have all the business logic.
  • Directives just for small DOM things.
  • John Papa styleguide is a good ruleset to follow.

Read More

Adrián G. is Stephen Fry proof thanks to caching by WP Super Cache