Design Patterns for Framework Agnostic Extensions/Plugins – Autoloading

Part 5 of my blog series on integer-net.com about framework independent code is out: Using Advanced Autoloading. This one is only relevant for the integration of legacy applications that do not use composer autoloading yet (Magento 1).

Previous Parts

  1. Introduction: Shared Code For Magento 1 and Magento 2 Extensions
  2. Accessing Configuration Data
  3. Using Dependency Injection
  4. Building Bridges
  5. Preparing Data For Output

The week on StackExchange #11 / 2016

Here’s the next update with new, hopefully interesting, questions and answers on StackExchange.

New Answers

New Questions

  • After a day of Magento 2 develoment with JavaScript, I shared the frustrating summary on Twitter, which attracted some attention:


    Looks like I am not alone with this experience but it’s not really how it is supposed to be. This lead me to the question Which compilation commands are needed in developer mode and when?

  • There seems to be a bug in certain Magento versions with order reports and timezones but I could not quite pin it down yet: Magento Reporting – Is it bucketing by UTC?

The week on StackExchange #10 / 2016

Here’s the next update with new, hopefully interesting, questions and answers on StackExchange.

New Answers

New Questions:

The week on StackExchange #9 / 2016

I’ll try a new weekly format on the blog with a summary of recent questions and answers from StackExchange, all around PHP and Magento. Let’s see how it works out and start right away:

New Answers

Open questions

In the next week there is more to come on the topic of Magento 2, since I am just starting to get deeper into it.

Design Patterns for Framework Agnostic Extensions/Plugins

My new article series on integer-net.com introduces useful design patterns for decoupled Magento extensions, which are divided in two parts: the Magento module and a framework independent (framework agnostic) library, that is reusable for Magento 1 and Magento 2. Of course, the same principles can also be applied to other frameworks and applications.

Diagram of Magento 2 Extension Dependencies for Framework Agnostic Modules

It will not cover the refactoring process from existing extensions to this model, that’s a different topic and I am going to talk about it at Developers Paradise 2016 in Croatia. Stay tuned!

The first part is about accessing application configuration, using Configuration Value Objects.

Continue reading on integer-net.com

Use Feature Toggles in Magento

Today, Joshua Warren asked an interesting question on Twitter:

I had thought about the topic earlier and if some genereric feature flag module would be worth developing. My conclusion was that it was too trivial in the end and I would just build feature toggles as needed for the respective project.

Feature Toggles: What and Why?

Feature toggles are a way to roll out partially developed features and keep them disabled in production, so it is often mentioned in the context of continuous delivery. They support the “ship early and often” paradigm and decouple code deployment from feature activation.

But feature toggles (or “feature flags”) also can be used to roll out new features gradually, for example only for a certain customer group, based on user location, or for randomly selected users, as with A/B testing.
Continue reading “Use Feature Toggles in Magento”