Book Image

Mastering Adobe Commerce Frontend

By : Jakub Winkler
Book Image

Mastering Adobe Commerce Frontend

By: Jakub Winkler

Overview of this book

Navigating the frontend realm of the Adobe Commerce platform can often feel like a labyrinth, given its multifaceted systems and intricate layering. This book demystifies Adobe Commerce frontend development, guiding you through its paths with clarity and precision. You'll learn how to set up your local environment, paving the way for a smooth development experience and navigate the platform's theming ecosystem, exploring layout XML systems and the power of templates. As you progress through the book, you'll leverage an array of JavaScript libraries and frameworks that Adobe Commerce boasts of, with special emphasis on RequireJS, jQuery, Knockout.JS, and UI Components. Additionally, you'll gain an understanding of the intricacies of Adobe Commerce CMS, explore frontend-related configurations in the admin panel, and unlock the secrets of frontend optimization. Practical exercises provided in the book will enable you to create top-notch Adobe Commerce sites that are functional, optimized, user-centric, and a step ahead in the ever-evolving frontend landscape.
Table of Contents (18 chapters)

Alternatives to a functional local environment

In my opinion, environments based on Docker engines are the most efficient way to work. The biggest advantage of this is that, in the end, it does not matter what operating system you use – you can use the same tools.

Of course, there are other ways of setting up a local environment, so let’s try to summarize them in a few words:

  • Bare-metal: In this approach, you configure everything on your local machine manually without using any virtual machines and containers. While some backend developers think that this is the best way to work in terms of performance, there are a few issues you might face:
    • Errors when upgrading or changing the version of the database or scripting language. With Docker Engine, you simply specify a new machine and specify the version; in a bare-metal setup, you have to install everything manually, and it is not always possible to run multiple instances of ES (for example) on the same machine without some issues.
    • Let’s say that you have taken on a project with a very outdated software and technology stack (AC/Magento 2 in version 2.1.x or, even worse, 2.0.x). If you keep your software up to date on your local machine, it might be hard to install the old version of the software required to run the platform. With Docker or a virtualized environment, this is not an issue.
    • You might need to install additional services on the computer to match and run multiple domains for one store. Keep in mind that AC can run multiple stores with different domain names at the same time. In the “bare-metal” setup, you can either edit the /etc/hosts (Linux/macOS) file and map the domains locally, or you can try installing tools such as dnsmasq, but it’s much more advanced than this.
    • In my opinion, the biggest issue with a bare-metal solution is the fact that multiple developers working on the same project might have different versions of the required services. This might cause conflicts or even break the code once it is pushed to the production environment.
  • Vagrant: I’ll use a giant simplification again, but Vagrant is very similar to Docker-based environments. However, in my humble opinion, Vagrant is slower than Docker. Some backend developers might argue that Vagrant is a better solution, and they have very good points about it, but I’ve run into a lot of performance issues in the past and decided not to use Vagrant for my daily work.

    If I were to describe the differences between these two options, I would summarize it like this: Vagrant is primarily used to create and manage virtual machines, while Docker is used to create and manage containerized applications. Vagrant is useful when you need a complete virtual machine with a specific operating system and software stack, while Docker is best when you need to deploy lightweight and portable applications or services.