Magento local module directory naming conventions

Local module development is always done in app/code.

Under this directory is a very specific naming convention. Magento uses a naming convention called PSR-4 to load files in this directory.

There can be many folders under code, and each one correlates to a vendor name.

We need to pick a vendor name. It needs to start with a capital letter, and can’t contain any spaces or dashes.

So for example, this could be your first and last name, MarkShust

Or, it could be a company name. For example, Macademy

If you are development this module or customization just for a specific client, you can also use that company’s name. If you work for Bill Lumberg, from my favorite movie Office Space of course, we could create a folder named Initech. It’s what’s best for the company!

I’m going to go ahead and create a vendor named Macademy for now though because all of M.academy’s module are prefixed with this vendor name.

Magento then looks for another inside this local vendor folder, and this will be the name of the module you wish to create. It follows same specs as vendor name, so a TitleCase folder.

The module should be a very general description of what you are building.

Let’s just name this Blog. Yep! We will be building a blog. While it’s not the most exciting topic, keeping this really simple will help you to follow along with this course. Everyone knows what a blog is, and the elements that we need to create to create a fully-functional blog, so it’ll be easy for everyone to follow along.

Note that we aren’t building a fully functional blog. I took a lot of time thinking about what we will be building, while still learning a majority of the framework. That said, there are things such as an admin interface & great editing experience that go well beyond the scope of this course, as they are pretty advanced concepts. So, we’ll be building a functional blog, but it won’t necessarily be ready for production on a high-traffic site, so just keep that in mind.

Complete and Continue  
Extra lesson content locked
Enroll to access all lessons, source code & comments.
Enroll now to Unlock