Archive of month: August 2017

Magento 2 Frontend: RequireJS

Now that we’ve covered the basics of including javascript and CSS files in Magento 2, we’re going to start exploring Magento’s adoption of modern front end tools and libraries. Magento’s in a bit of a tricky position when it comes to adopting modern front end technologies. Magento is a software platform, and an ecommerce one […]

Magento 2 Frontend: Adding Javascript and CSS via Layout XML

Layout system critiqued, let’s get back to the practical business of adding a front end file to our Magento module. Before we begin, per pervious articles in this series, the following assumes You’re working with developer mode enabled (SetEnv MAGE_MODE developer in your apache config) That you’ve disabled the full page caching in System -> Cache Management You […]

Magento 2 Frontend: layout changes

we’re going to provide an engineering critique of Magento 2’s XML based layout rendering language. This language is similar to the XML based language in Magento 1, but has some differences that might trip up an experienced Magento 1 developer.  Magento 2’s Domain Specific Language for Rendering HTML With Magento 2, the core team has […]

Magento 2 Frontend: Adding Frontend Files to your Module

Last time we discussed how Magento serves and generates front end (javascript, css) files to end users from its own modules. Like most of Magento’s feature, if it’s done in a core module, third party developers can do it in their own modules. This time we’ll be creating a module of our own, and using it […]

Magento 2 Frontend: Serving Frontend Files

When Magento 1 was initially released, “front end development” as it exists today was barely a thing. CSS was still largely written by hand, and jQuery vs. PrototypeJS was still a legitimate question for a new software project. Magento 2 enters a world where javascript is the dominant language in the interactive agency world, and the thought […]

Magento 2: No More MVC

Today we’re going to run through a basic “Hello World” example in Magento 2. We’ll setup a new URL, and show you how to create a phtml template for that URL. Along the way we’re going to be talking about Design Patterns™, design patterns, and how Magento got here. However, at the heart of this article are […]

Magento 2 Frontend: CMS Blocks

Magento 2 has done a lot of work on themes including a improved inheritance structure. A lot of positive feedback has been received on the improvements. But that does not mean there is not even more potential to improve! So rather than have Magento resting on its laurels, I will like to describe a few […]

Magento 2 Frontend: Theme Structure

There are major changes in themes and when upgrading from Magento 1.x to Magento 2, it will involve quite some effort from the developer end. This blog is about themes and focuses on the differences between Magento 1.x and Magento 2 theme structure. The two significant changes we can see in Magento 2 in terms of theme […]

Working with Resource Models in Magento 2

What is A Resource Model? A resource model is a model that is responsible for the CRUD (Create, Read, Update, Delete) implementations for the Magento ORM.  In simple terms, it is used to process your data from your model to your database.  Models hold your data.  Resource models do something with that data. Normally, applications will have […]

Working With Models in Magento 2

What Are Models? Models are a flexible, highly abstract class that represents business logic in your application.  Models in Magento 2 can be anything that is packaged up and labeled.  For instance, database tables are representative of models. Magento’s ORM demands that only models can work with data in the application.  Models in the scope of ORM […]