Magento PHP Developer's Guide Get Started with Magento Development!

Magento has completely reshaped the face of e-commerce since its launch in 2008. Its revolutionary focus on object oriented and EAV design patterns has allowed it to become the preferred tool for developers and retailers alike.

Magento is the king of ecommerce frameworks and the famous for its flexibility and power. Unfortunately is also (in)famous for being complex and having a step learning curve. Developers new to Magento often get frustrated and confused with the platform due to scarce documentation.

Who this book is for?

This book is written for developers who have previous experience with PHP and PHP frameworks, such as Zend or CakePHP, and want to start developing and working with Magento. Even developers with previous experience with Magento will find the book extremely useful to gain a full understanding of Magento fundamentals, architecture, and overall philosophy.

What you will learn from this book?

The Magento PHP Developer's Guide will help new developers to quickly pickup the fundamentals of the system like Entity Attibute Value(EAV), Magento's ORM, the design patterns used, Magento MVC, the layout system.

Chapters Overview Topics Covered in the book

Chapter 1: Our Development Environment

In this chapter we will setup a complete environment for Magento development with Mysql and Apache. Additionally, we will go over the tools available to facilitate the development, several IDE's and Version control systems.

Challenges

None Available

Chapter 2: Magento Fundamentals

This chapter will cover the Magento fundamental concepts like the system architecture, MVC implementation and it's relation with the zend framework. All the concepts in this chapter will set the foundation for developers starting with Magento.

Resources

None Available

Challenges

None Available

Chapter 3: ORM and Data Collections

Collections and Models are the bread and butter of everyday Magento development, on this chapter we will introduce the reader to the Magento ORM system and we will learn how to properly work with data collections and the EAV system

Challenges

None Available

Chapter 4: Frontend Development

In this chapter we will give practical use to the skills and knowledge we have acquired so far and we'll build a functional Magento Module step by step. The custom module will allow readers to apply a variety of important concepts like working with collections, routing, sessions and caching.

Chapter 5: Backend Development

In the previous chapter we created the frontend part our module, on this chapter will extend what we previously build and create an interface in the Magento backend for interacting with our application data. We will learn about extending the backend, the adminhtml theme, setting data sources and controlling our extension behavior through configuration.

Chapter 6: The Magento API

In this chapter we will learn about the Magento API and how we can extend it for providing access to the custom data that we captured using our extension.

Resources

Challenges

None Available

Chapter 7: Testing and Quality assurance

In this chapter the reader will learn critical skills for testing our Magento modules and customizations, this is an integral part of development. We will learn about the different types of tests and the tools available for each particular type of tests

Challenges

None Available

Chapter 8: Deployment and Distribution

In this chapter we will learn about the multiple tools available for deploying our code to a production environment and will also learn how to properly pack our extensions for distribution through channels like Magento connect.

Challenges

None Available

About the Author Certified Magento Developer Plus, Lead Magento Developer Demac Media



Allan MacGregor is a Magento Certified Developer Plus with four years of Magento experience. He also has a certification in Linux System Administration by IBM.

He started working with Magento as a freelance looking for a better framework to build e-commerce solutions, and he is now the Magento Lead Developer at Demac Media (www.demacmedia.com). He's very passionate about software development in general. He is constantly working with new technologies and frameworks.

At Demac Media, he has participated in building core solutions for a wide range of clients; this has given him the experience and knowledge to solve many Magento challenges.

As part of an internal project at Demac Media, he worked on Triplecheck.io, a unique service for monitoring and auditing the code health of a Magento store.



Demac Media is an award winning eCommerce agency based out of Toronto. As the largest Magento Gold Partner in Canada, Demac was awarded the 2011 Magento Partner Excellence Award, which placed the company among the top 10 Magento Partners worldwide. From day one the company’s mission has been to be at the core of eCommerce and help grow the industry within Canada. Some notable partners include: Bench, Ardene, Stokes, Boathouse, Snuggle Bugz, eLUXE, and Ren’s Pets Depot.

From design & user experience, implementation and development, straight through to backend systems integration, the team at Demac Media is intimately familiar with the many facets of running an eCommerce business. We provide reliable solutions that have been built and battle tested with some of the best merchants on the web. Our goal is to be a strategic piece of our partners online businesses, be it B2C, B2B or some weird variation of the two, we exist to provide value to our partners through solutions that are driven by proven eCommerce strategy and rooted in experience.

FAQ Frequently Asked Questions

Why was this book writen?

This book was written as an effort to contribute back to the Magento community and provide a better starting point for new developers that are just getting started with Magento.

Who wrote this book?

Check the author section

What topic does the book cover?

Chapter 1: Our Development Environment In this chapter we will setup a complete environment for Magento development with Mysql and Apache. Additionally, we will go over the tools available to facilitate the development, several IDE's and Version control systems.

Chapter 2: Magento Fundamentals In this chapter we will cover the Magento fundamental concepts like the system architecture, MVC implementation and it's relation with the zend framework. All the concepts in this chapter will set the foundation for developers starting with Magento.

Chapter 3: ORM and Data Collections Collections and Models are the bread and butter of everyday Magento development, on this chapter we will introduce the reader to the Magento ORM system and we will learn how to properly work with data collections and the EAV system

Chapter 4: Frontend Development In this chapter we will give practical use to the skills and knowledge we have acquired so far and we'll build a functional Magento Module step by step. The custom module will allow readers to apply a variety of important concepts like working with collections, routing, sessions and caching.

Chapter 5: Backend Development In the previous chapter we created the frontend part our module, on this chapter will extend what we previously build and create an interface in the Magento backend for interacting with our application data. We will learn about extending the backend, the adminhtml theme, setting data sources and controlling our extension behavior through configuration.

Chapter 6: The Magento API In this chapter we will learn about the Magento API and how we can extend it for providing access to the custom data that we captured using our extension.

Chapter 7: Testing and Quality assurance In this chapter the reader will learn critical skills for testing our Magento modules and customizations, this is an integral part of development. We will learn about the different types of tests and the tools available for each particular type of tests

Chapter 8: Deployment and Distribution In this chapter we will learn about the multiple tools available for deploying our code to a production environment and will also learn how to properly pack our extensions for distribution through channels like Magento connect.

Who this book is for?

This book is written for developers who have previous experience with PHP and PHP frameworks, such as Zend or CakePHP, and want to start developing and working with Magento. Even developers with previous experience with Magento will find the book extremely useful to gain a full understanding of Magento fundamentals, architecture, and overall philosophy.

The code doesn't work and this book sucks!

I apologize if you are having problems with the code examples, we did our best to make sure all the code was functional and easy to follow; unfortunately mistakes are bound to happen.

Thats the reason github repos have been created for the code on each chapter, so we can easily make updates, correct errors and accept contributions. Even the code examples on this site are hosted on github Gists.

Also if you have trouble understanding the code please shoot me an email to info@allanmacgregor.com I more than happy to make any corrections or help you out with the code.

Screencasts Coming Soon!

Training Coming Soon!