Category: Programming Quickies
Back in they day, I ran a Tumblr blog named Magento Quickies where I’d post shorter, less in-depth posts about my travels through Magento’s source code. This Programming Quickies categories is the successor to that Tumblr blog. You’ll find all the old Magento Quickies content here, as well as new short posts about programming in general.
This section has its own RSS feed, the old Magento Quickies feed should should be redirecting, and we’re cross posting notifications for new posts over to magento-quickies.tumblr.com. In other words, you shouldn’t need to know any of this, but the duct tape that keeps the internet held together isn’t aging well, so your mileage may vary.
Below you'll find all the Programming Quickies articles on the site,
followed by a chronological listing of the same.
You may also browse the
7
series directly via the following links.
Pestle, Four Steps to Async Iterators, Checking in on OpenMage and Magento in 2020, Text Encoding and Unicode, Shopware's Development Environment, A Sentimental Gen-X Programmer Culls his Tech Books, and, Containers, Containers, Containers.
Magento developer of note Daniel Sloof recently tweeted about the open sourcing (MIT) of — his? his company’s — Magento 2 Clean Checkout extension Breaking a couple months silence to bring you guys an early christmas gift: https://t.co/dIi6J9mLx0 A drop-in replacement for #Magento2 Checkout. Commercial project turned [...]
astorm
Coming at C from a “test legacy code first” point of view is tricky. All those neat test framework features for testing code not written under test (i.e. mocks, etc.) rely on a language’s dynamic nature for implementation details. You don’t get that easily in C, so it was a pleasure to be introduced to the cmocka framework. [...]
astorm
I’m not sure if the talks (i.e. videos) from the recent MageTestFest conference will show up online, but these slides from Vinai Kopp are worth a link, if only because they capture most of the weird, non-obvious incantations you’ll need to run Magento 2’s unit and integration tests.
astorm
You can’t walk ten steps in this businesses without hearing Engineering is a set of tradeoffs. You rarely hear the other side of that: and sometimes we make the wrong tradeoffs which lead to living with garbage behavior for years. PHP leaks memory like a sieve. By leak we mean during a long running PHP request the amount of memory [...]
astorm
Campaigning season’s winding down, which means conference season is upon us. Two years after release, Magento’s XML/PHP/HTML/Javascript/KnockoutJS based UI Component System continues to be a topic of regular dissection and drubbing. At the recent Mage Titans conference in Manchester Maria Kern gave a well regarded talk on [...]
astorm
This one came out of a conversation in my Patreon mentoring Slack room. Someone was having trouble with their Magento 2 object manager configurations (di.xml) not showing up — but only during checkout. Their problem? They were dropping their di.xml files into the frontend folder etc/frontend/di.xml This is good enough to get class [...]
astorm
My career’s headed down the other end of the Stack these days, so caveat-ihaventusedit-emptor, but based on pedigre alone this WordPress+React starter kit seems worth checking out.
astorm
The answer seems to be Yes, if you’re dealing with systems with a large number of stores or categories.
astorm
Visit Linked Page
TLDR; There’s a real .dev top level domain that Google owns (and Amazon previously tried to buy), and a recent Chromium nightly (Google Chrome’s browser engine) automatically redirects all .dev domain names to an HTTPs version of the site. Chrome to force .dev domains to HTTPS via preloaded HSTS
astorm
Visit Linked Page
An Unofficial Magento Roadmap, pulled together from various promises, metions, and allusions made by Magento Inc. employees. (Glad I took Dr. Jones’ course at Marshal University (I thought about Kremlinolgy joke instead but too real)).
astorm
Visit Linked Page
When I’m working solo, (which usually means I’m doing the initial scoping and prototyping of some sort of feature and/or system), my “git workflow” is usually a shove it all into master affair. When I switch off to team work I often find myself in a situation where I’ve done a done of work without branching first. That’s where git move comes to the rescue. Okay, one more… Ever commit something only to immediately realize that you're on the wrong branch? Use "git move <branch>". pic.twitter.com/fKpZTRkdRu — coderabbi™[for rent] (@coderabbi) September 4, 2017
astorm
Visit Linked Page
Real Talk: I mostly just split/explode strings down to the parts I need these days, but I’ll always have a palce in my heart for regular expressions. Regular expression cheat sheet. pic.twitter.com/C0PdZ5aNXx — Mike Kearney📊 (@kearneymw) September 3, 2017
astorm
One thing I breezed by in my recent Modifying a jQuery Widget in Magento 2 article was the whole returns two widgets RequireJS module thing. We mentioned that modules like the mage/menu module will do this. //File: vendor/magento/magento2-base/lib/web/mage/menu.js define([ "jquery", "matchMedia", "jquery/ui", [...]
astorm
Visit Linked Page
Re: A Declarative Approach for Database Schema Upgrades It sounds like Magento’s planning a pretty radical overhaul of how it handles schema and data upgrades between versions. The looks to be a fiat from on high (vs. the community driven approach they’ve been using for bug fixes). If you’re making schema/data changes that aren’t in Magento’s core or Marketplace code bases, you’ll want to pay attention to this – your deck chairs may need shifting about.
astorm
Visit Linked Page
Menu Editor to Replace Category Based Menus in Magento 2. Feels like I can recommend checking out stuff from SnowdogApps, sight unseen.
astorm
Visit Linked Page
Create a PHPUnit Dashboard With New Relic Not strictly Magento related, but if you’re using New Relic it looks like they can automatically detect test runs and give you useful metrics about your tests. Neat!
astorm
Visit Linked Page
oddyssey/mailtrap A simple mailtrap extension for Magento 2. Mailtrap is a service that lets you point your development instances at an SMTP server that accepts mail, but doesn’t deliver it. Instead mailtrap collects all the mail in a single INBOX. If you’ve ever accidentally emailed an entire customer list with a subject line like Subject: Testing, hope this s——t works. you’ll instantly see the value. The Magento extension is also a simple example of how to hook into the MagentoFrameworkMailTransport class with a custom preference and change the behavior of the email system.
astorm
Visit Linked Page
Reserved Words in Magento 2 URL Paths A StackExchange self answer where I use a plugin to work around the reserved-PHP-symbol-in-class-name problem that can plague Magento 2 URL routing. What’s extra baffling about this is Magento has a fix coded up, but only applies it to one URL segment. I suspect this is less baffling if you can gives up the idea that Magento 2 should retain its the rapid application prototyping roots of its ancestors.
astorm
Visit Linked Page
Magento 2 – Form Validation A StackExchange post that contains most (all?) of the CSS classes that can control Magento 2’s form validation. Magento seems to apply the validation rules on all form submits – although I haven’t dug too deeply into that one so caveat emptor etc. Also, a bonus for folks who read these Tumblr desciptions — here’s a quick bit of javascript that will take M1 style HTML and make all the fields required in an M2 context. require(['jquery'], function($){ $('.required-entry').each(function(key, element){ $(element).attr('required','required'); }); }); Useful if you have a complex form built with a combination of […]
astorm
Visit Linked Page
Magento custom Knockout.js bindings | Magento 2 Developer Documentation It might have taken 11 months, but it looks like Magento finally gave its dev docs team the resources they needed to document the UI Component Knockout JS custom bindings.
astorm