Char Bit A Journey Through Software Development

Native Promises vs Bluebird

I’ve been asked, on more than one occasion, about moving to ES6’s native Promises as opposed to using a third party library such as When or Bluebird. In every occasion surprise was expressed when my response was that I intend to continue using Bluebird over native Promises.

Some express surprise over not using native Promises, at times citing concerns that third party Promise libraries might not be as performant as Native Promises but, IMHO, this is a poor decision metric as: a) Promises are mostly used in conjunction with external resources (think DB or API queries) - the bottleneck isn’t the Promise implementation; b) third party Promise implementations are leaner and more performant than Native Promises - at least for now.

My answer always focused on the additional benefits and “sugar” provided by third party libraries when compared to the sparse implementation of Native Promises.

AngularJS / ES6 / Webpack

I first started using ES6 and Webpack a few months ago whilst working with React
on Soapee and ever since I’ve been finding myself missing using ES6 and Webpack when writing code for Node.js and AngularJS.

This posts presents my research on existing ES6/AngularJS seed projects and my own attempts of using ES6 and Webpack on an AngularJS single page application.

MVP - An Introduction

A Minimum Viable Product, in terms of software and product development, describes a process which
attempts to mitigate financial risk by bringing the bare minimal or the essence of an idea to market as soon as possible.

For software products an MVP development lifetime spans anywhere from a weekend to 30 or 60 days.

This is a short follow-up post based on Reusable Bootstrap Modal Forms in which I described how an
AngularJS Directive can be used to encapsulate a number of templates and configurations to present a re-usable Bootstrap Modal form.

From the patterns Bryan described, the Form Object pattern struck a chord as it seemed to be an elegant solution for a problem I have developed multiple
implementations for but never felt completely satisfied with the result. I refer to User Registration and the lesser issue of User Authentication.

Does User Registration Logic Belong in a Model?

IMHO, no because registration/signup is a one-off event for a User yet code responsible for this remains in the User class and must be accounted for whenever a User object is instantiated during testing.

This becomes even more apparent when additional validation could be required during registration that rely on remote services (i.e. lookup the user’s IP against a spammer blacklist). Adding
this logic to the User model (be it in a method or ActiveRecord callback) adds external dependencies to the User class which again must be accounted for during testing.