Play Framework FormMapping in modern front-end frameworks

One of the celebrated features of Play (at least for me) are the built-in form validation and the JSON parsers and combinators. While the team behind Play wants everything to be reactive, they have not build in support to become reactive on the front-end too: Play supports classical HTTP requests and form posts, but the defined form validation is not easily available in say, JavaScript. Looking at all the work done to expose the Routes to JavaScript makes me wonder why no-one made the validation available too.

Browserify browserified libraries

Browserify does not like to eat his own output. When creating a npm library that is browserified make sure to derequire/minify the output so it can be reused in other projects without mystical ‘Cannot find module X’ errors where X is some file you know nothing about. Possible fixes found in the wild: Setting noParse for bundle A in the bundle B operation; or Running the standalone bundle through derequire; or Minifying the bundle Summary,

RxSwift.Lifecycle

Once in a while I’m reminded that good API design is of vital importance. Today was such a day. Everybody developing for either Android or iOS platforms knows that one often needs to run something when the view is loaded or when it will appear. Both platforms provide nifty ‘callbacks’ for this: It is good practice to start listeners onStart and cleaning up onStop (or other equal pairs). This is all good, and if we want to share functionality we simply create a subclass of UIViewController or Activity and we put the shared logic there.

Energy metering with ESP8266

Recently a new energy meter was installed in my home. The new meter is a so called Dutch Smart Meter which means as much as that it is a digital meter instead of the good old Ferraris meter, it will send its usage data to the network operator via GPRS and has a “P1” port which is just a regular RJ11/RJ12 socket over which it transmits using the DSMR protocol (v4.