browse the blogs

[ 21 Oct 2016 ]

Commerce Bug 3.2 Released:

Pretty excited about this one – has the UI Component debugging features that should have been there from day one.

[ 15 Oct 2016 ]

Magento 2 Tool Chain:

I’ve learned to accept, in my head, that this sort of over complication always happens when the size of the team maintaining an application or system grows. That said, I’ll never quite understand why in my heart.

[ 7 Oct 2016 ]

A technical guide to the Magento 2 checkout:

A deep dive (written by Inviqa) on the javascript checkout application in Magento 2. A nice companion to my UI Components series — the Inviqa article has some application specific details that will be useful to any developer customizing the checkout flow. (hat tip to Joe Constant)

[ 3 Oct 2016 ]

I came across this code recently while researching Magento 2’s UI Component system

initComponent: function (node) {
    if (!node.component) {
        return this;


    return this;

That block in the middle might confuse a junior programmer, but I’m no spring chicken. That looks like a javascript promise and confusion around the .done(initComponent) being a different method than the initComponent whose scope we’re in at the moment, this should be straight forward code to follow.

Except – whose promises library is it? What are the nuances …

[ 3 Oct 2016 ]

Magento 2 uiClass Imports and Exports Explained:

I’m working on my own version of this as we speak, but the Jessie Maxwell does a nice job of breaking down the imports and exports feature of Magento’s UI Components.

[ 22 Sep 2016 ]

Magento 2: Approximating Local Code Pool Overrides:

Not sure if I like the idea of this becoming a common practice, but if you know your composer autoloading you can replace any class in Magento with a version of your own.

[ 13 Sep 2016 ]

Knockoutjs context debugger:

Chrome extension for peeking at a node’s KnockoutJS context. Useful if you’re doing frontend Magento work and hewing to their view of the world. via Daniel Sloof.

[ 9 Sep 2016 ]

Another javascript debugging snippet for the intrepid Magento 2 javascript programmer. The Magento_Ui/js/core/app RequireJS module/application/program is an important part of Magento 2’s UI Component system. This is the program that registers KnockoutJS views and makes them available for use in the (custom to Magento 2) Knockout.js scope binding.

data-bind="scope: some-viewmodel"

While the binding process still remains a bit of a mystery, I’ve recently unearthed a way to view all the available Knockout.js view models.

reg = requirejs('uiRegistry')

The uiRegistry RequireJS module (pointing to Magento_Ui/js/lib/registry/registry by default (located in vendor/magento//module-ui/view/base/web/js/lib/registry/registry.js)) returns an object that’s a very fancy dictionary/array. This is the object that Magento registers view models to. You can fetch individual view models …

[ 6 Sep 2016 ]

Magento 2: Syncing Backend and Frontend State/Cache:

Haven’t had time to check this out yet, but this is a far more cogent explaination of Magento 2’s mysterious sections.xml than anything I’ve seen so far.

[ 3 Sep 2016 ]

When I started work on pestle’s Magento 2 code generation, I deliberately left the the <preference/> feature of Magento’s di.xml files off the list of commands. This was, in short, to help encourage the use of plugins over preferences. i.e. to encourage developers to use the system that allowed multiple extensions to change system behavior – and not use the system that behaved like Magento 1 rewrites with a winner-take-all end result.

Unfortunately, while the plugin system shows promise, I’ve seen too many situations where it fails to provide the stable functionality a Magento developer needs. I suspect preferences will be the order of the day in the wild, and withholding easy code generation from pestle users seems short …