Book Image

Magento Extensions Development

By : Jérémie Bouchet
Book Image

Magento Extensions Development

By: Jérémie Bouchet

Overview of this book

Magento has been revealed as the best and the most popular open source e-commerce platform in the world, with about 250k+ online stores. Magento 2 is the most recent version of this awesome toolset: every new and modern development techniques are used to offer a real modular approach and powerful architecture. The book will support you in the writing of innovative and complex extensions. Starting from the beginning, we will cover how to set up a development environment that allows you to be really efficient in your functionality writing, including GIT registering and many other development tools. We then move on to provide a large overview of the best practices to scale your module in a high-load environment. After these foundations, you will see how to use test driven-development (TDD) and unit tests to handle your code. We then build a complex extension together, step by step, and internationally-ready. Next, you will find out how to protect the users’ data. Finally, we will take a look a publishing the extension on the new Magento Connect marketplace and how to protect your intellectual property. After you read this book, you will know everything you need to know to become an invaluable extension editor, whether it is for your customers’ needs or for your own requirements.
Table of Contents (16 chapters)
Magento Extensions Development
About the Author
About the Reviewer

Designing our extension for speed

Magento is a fantastic and high-level platform which works with thousands of files, exchanging a lot of information with databases and generating large HTML pages. Have you ever wondered how this engine generates a page in less than 100 milliseconds?

Magento contains basic tools that help us take care of the consequences of our development. Browser and server tools will be very useful too. We are going to find out about them.

In the second part, we will see that our code can be written in many different ways, but not all render at the same speed.

Enabling developer mode

The developer mode is a mode that forces you to write clean and alert free PHP code the server can generate. This is a good way to prevent performance loss.

The developer mode can be activated through the .htaccess file at the root of your Magento installation, or the pub/ directory if you use it as your document root.

Here's how we go about doing this:

  1. Uncomment the following line by removing the...