How do you ensure your Magento ecommerce project is in the hands of a pro? You ask Magento 2 interview questions.
Screening developers’ competencies takes a big chunk of the hiring process. You want to recruit a skilled, innovative candidate who delivers quality results even if the project goes into fire-fighting mode. With the help of a trusted tech recruiting advisor, the chances to hire such top talent increase.
So we’ve decided to share our expertise in filling in the technical positions. We’ve checked up with Volodymyr Leshchyshyn, the lead Magento developer responsible for technical screenings at Elogic, and asked how he sifts the best from a vast pool of candidates.
Here’s a list of the top Magento 2 technical interview questions & concepts you should discuss while hiring a professional developer.
The rule is: start easy. Interviews, especially the technical ones, are a nerve-racking process. So you want to start with an icebreaker to make your candidate loosen up a bit. This way, there’s a higher chance you’ll see their real-world development skills.
Here are a few general Magento 2 technical questions you can ask both back-end and front-end specialists.
Before the interview, try to come up with some simple core questions that any developer qualified for a position should be able to answer. Here we talk extremely low-level basic questions related to a developer’s CV, their past projects and achievements, and experiences integrating third-party apps.
Don’t simplify too much, though. Questions like “What is Magento 2?” may be completely out of line for a professional Magento interview.
Once you take the edge off the applicant, get to the topic you’ve actually met to discuss — Magento. Don’t slammer the candidate with the hard Magento 2 interview questions for experienced developers. Instead, start with the basics: zero in on object-oriented programming, the principles of extensibility and modularity, patterns and magic methods, etc. This way, you’ll direct the applicant in the right frame of mind for the rest of the interview.
A back-end Magento developer should have an in-depth knowledge of PHP and MySQL, proven experience working with OOP & design patterns, and expertise in Git and Composer.
Use the following Magento 2 technical interview questions to check whether your applicant has the required backend skills.
Service contracts are sets of PHP interfaces that are defined for a module. They enhance the modularity of Magento and guarantee compatibility among Magento versions. The applicant should understand what service contracts are, how to use them, and for what purposes.
Now, this is one of the Magento tricky interview questions because service contracts are not strictly necessary in Magento development. As Volodymyr Leshchyshyn explains,
A developer can do without service contracts; but not the one who writes quality code. It’s thanks to service contracts that Magento merchants can integrate third-party systems, configure services as web APIs, and easily upgrade a store when new platform versions are released. If an applicant avoids service contracts, he/she either lacks the knowledge of Magento or has been working for a company that never followed programming best practices.
The question about dependency injections forms the crux of a Magento tech screening. In software engineering, dependency injection is a design pattern in which object A receives other objects (aka dependencies) that it depends on. Magento uses a constructor to retrieve information about all class dependencies. ObjectManager is used to generate objects of a specific class.
An interviewee should be able to elaborate on the dependency injection & inversion principle, injection types used in Magento, and their configuration. You can also ask about the specific use cases of each type of dependency injection.
ObjectManager is another technology used with large applications like Magento. It prevents boilerplate code and has the following functions:
Why is this one of the Magento tricky questions? Because ObjectManager is never used directly in classes/templates. A Magento developer should know that, if referenced directly, ObjectManager will break dependency injection principles, make code testing more difficult, and breach best coding practices.
A virtual type refers to the way of configuring dependency injection via a di.xml file. It allows changing or configuring specific classes. The trick is that a virtual type can never be referenced directly in the source code. Your candidate should specify this exception and possibly provide use cases of a virtual type.
If you see that your applicant has some knowledge gaps on any of the aforementioned questions, take a step back and ask the Magento 2 interview questions for beginners.
A question about Magento 2 file structure, what it serves for, and how it’s implemented will help you understand how comfortable a developer is with writing custom bugless code. Specifically, Magento 2 file structure may contain directories, blocks, controllers, models, etc. that relate to a particular business feature (like admin panel or user login). The applicant should mention the types of file content and ways to customize the structure.
Magento follows the EAV database model. It contains a handful of supporting tables with metadata and is used where product attributes are numerous and sparse. For instance, a store may have different attributes of a product: TVs may be categorized based on their screen size or resolution; while women’s clothes will have such attributes as size or color. EAV keeps the store architecture clear and organized and, therefore, optimized for the web on the back-end.
It’d be great if the applicant mentioned the types of Magento databases and spoke about the indexers, too.
This question is a logical continuation of the previous one. Here you may go more specific about Magento EAV (Entity, Attribute, & Value) model:
Whatever the question, make sure your candidate understands the EAV model. After all, your project architecture will depend on this.
A primary key is a static column or set of columns that produce unique values within a table (e.g. an order ID for the customer and business to track its fulfillment).
A foreign key is a column inside a table that links to the primary key of another table. They create references between the tables and help analysts to look up and link records together (e.g. a customer ID linked to the order ID column to see all purchases made by a particular customer).
The candidate should also elaborate on how to use primary and foreign keys safely, which benefits it brings to the store architecture, and which limitations it imposes on the merchant.
Experience with Composer is a must for any Magento back-end developer. It allows to manage Cloud for Adobe Commerce dependencies and upgrades as well as informs about the included packages, what the packages do, and how they fit together.
An experienced candidate should understand that a composer.lock contains information about the exact versions of Magento packages and dependencies, not just the last edited ones. It ensures that all website versions on a server and in development are aligned. If the developer doesn’t use a composer.lock while making changes to the website, store versions will differ and a merchant will experience problems next time they re-install the project.— says Volodymyr Leshchyshyn.
Even though Magento 2.4 is the latest version of the platform, many merchants still run on Magento 2.3. So one of Magento 2 developer interview questions should be about the peculiarities of both versions so as to set up systems correctly.
Specifically, Magento 2.3 introduced a new approach of a declarative database schema. Now, all tables can be described via .xml files, and patches are coded as a separate PHP class. Magento 2.4 builds on that approach and supports ElasticSearch as the catalog search solution. Besides, the use of declarative schemas is the latest trend in Magento programming, so your candidate should receive an extra bonus for experience with this technology.
A declarative schema is a recent update of Adobe that simplifies Magento installation and upgrades. Without a declarative schema, a developer will have to write PHP database scripts for each new version of Magento, which takes time and clutters the code. So you’ll want to make sure your candidate keeps their finger on the pulse of the latest Magento technologies and makes use of them in programming.
Magento Cloud deployment is one of the Magento tricky interview questions. The real intent of an interviewer here is to see the tools a Magento developer is familiar with. For Magento Commerce Cloud, Adobe gives a ready-made system code and hosting infrastructure.
That system is closed, so the knowledge of command line tools and interface is a must. Usually, it’s the job of DevOps to deploy Magento in the Cloud. But a developer should still be proficient in CLI tools to analyze logs and resolve deployment issues in case something goes wrong.— warns Volodymyr Leshchyshyn.
This is yet another Magento 2 interview question for experienced developers. The task of a senior developer is to know the Varnish cache system. They should be able to configure, use, and customize Varnish to reduce the website response time and network bandwidth consumption in the future. A developer who manages to answer this question will be a real gem to all your Magento performance optimization projects.
Magento API is a framework that allows sending requests and receiving responses between Magento core code and third-party systems. Magento 2 equally supports REST and SOAP APIs and provides three types of authentication:
You can also ask an applicant about their prior working experience with API integrations.
If one’s CV lists skills with specific technologies, I always ask about it. For one thing, it’s a way to check that the candidate really knows the tech stack they’ve included in the resume. Especially, when payment methods are mentioned: they’re quite complex, so I want to see whether an applicant isn’t bluffing. For another, specific knowledge of API integrations can make a candidate an asset to a team next time related projects are on the table.— explains Volodymyr Leshchyshyn.
Magento is a pretty cumbersome platform, so you don’t want to see clumsy code slowing down your website. That’s why a developer should know and follow Magento programming best practices:
It’s also an advantage if the candidate mentions the Magento Coding Standard and SOLID principles. This way, you can be sure the code is always neat and bugless.
To answer this question, a developer should know the file structure of a Magento theme. They should mention theme common directories (e.g. web, i18n, media, etc.), static and dynamic files, and theme.xml file configuration for theme customization.
HTML and CSS quiz is common across all front-end developer role interviews. To check the knowledge of HTML, you can ask about the difference between cookies, sessionStorage and localStorage; data attributes; tags and applets, among other things. For CSS, you might inquire about a “reset” CSS file and its benefits, ways of icon implementation, and the kinds of selectors.
Magento encourages the use of UI components to build the UX and ensure smooth interaction of all website features, especially the ones with asynchronous initialization. They also allow a developer to create more complex UI components out of smaller components (e.g. for the store checkout page).
Magento 2 technical interview questions never aim to blindside the candidate. Instead, they should drive the answers that will show the applicant’s depth of expertise in Magento.
Here are a few final tips on how to make the hiring process more efficient:
In case you’re looking for more questions to enhance your technical screening process, let us know in the comments below. Or better yet, leave this daunting task to us.
Save yourself the trouble of preparing for a Magento 2 interview. Hire a Magento developer at Elogic and rest assured that your project is in the hands of a professional.