Java vs. JavaScript Build Tools When you come from a Java background like I do and you take a look at JavaScript build tools, the sheer mass of tools is overwhelming.The eco system is evolving very fast with new tools coming up every couple of months. Below, I tried to give a comparison between Java build tools and their equivalent […]
Don’t use transitive dependencies in AngularJS modules Whenever you write an AngularJS application, you will use modules. Modules divide you application into small logical pieces. Some pieces might depended on other, some might be totally independent. 123456 angular.module('UserModule',[]); // no dependency!angular.module('UtilModule',[]); // no dependency!angular.module('MainModule',[ // 2 dependencies! 'UserModule', 'UtilModule']); In the example above, you see three modules. A module called MainModule depending on two other modules, called UserModule and UtilModule. Note that this is […]
AngularJS provider and app configuration AngularJS provides 3 different ways to create a service: Factory A factory is a well known pattern in software development. It aims to create a certain object, in this case a service. In AngularJS this is simply a function which returns an object with methods. In my opinion, this is the cleanest way to create […]
Programming to an interface Program to an interface, not an implementation. This short sentence, introduced in 1994 by the GoF, is one of the most important design principles in software development. However, I have seen several projects where this principle has gone wrong. Here’s why: Interface vs. Interface If you come from a Java background like myself and you […]