Monday, April 6, 2020

Magento 2 Interview Questions and Answers

1. What is MVC Architecture?

The Model-View-Controller (MVC) framework is an architectural pattern that separates an application into three main logical components Model, View, and Controller. ... MVC separates the business logic and presentation layer from each other. It was traditionally used for desktop graphical user interfaces (GUIs).


2. Which command is used to enable or disable a Magento 2 module?


php bin/magento module:enable module_name

php bin/magento module:disable module_name


3. What technology does Magento 2 use?


Magento uses MySQL for database and PHP as a web server language.

Magento 2 uses PHP 7.0.2 up to 7.0.10
  • 5.6.x;
  • 5.5.x, for x>=22;
  • 7.0.2 to 7.1.0, except for 7.0.5.
  • 7.1.3+ 7.2.x (for Magento 2.3.0)
  • 7.3 (for Magento 2.3.3)

For MySQL, it uses version 5.6 or 5.7.

  1. Magento 2.0.x = MySQL 5.6 
  2. Magento 2.1.x = MySQL 5.6 (For Magento 2.1.2 and higher, use MySQL 5.7) 
  3. Magento 2.2.x  = MySQL 5.6, 5.7 
  4. Magento 2.3.x  = MySQL 5.6, 5.7 

4. What is EAV?

The Entry, Attribute, Value model, also known as object-attribute-value or Open Schema, is a database or catalog management system that is used in Magento.

Entity–attribute–value model (EAV) is a data model to encode, in a space-efficient manner, entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest.


5. How can you write a custom module in Magento 2?


Say you the model name is ‘hosting’. You have to define it in app/code folder

It should be: app/code/VendorName/moduleName.

For example: app/code/MageHost/Hosting

Steps:

  1. Create the folder of ‘hosting’ module
  2. Create etc/module.xml file
  3. Create etc/registration.php file
  4. Enable the module


There are two possible locations for modules in Magento 2: the app/code folder and the vendor folder depends on your Magento installation.



2 comments:

  1. Hey! I am Talha Tariq and I am a Magento expert. I am a Certified Magento 2 developer having more than 4 years of experience in Magento and Magento Website’s development and design. I can develop Magento E-Commerce, PHP-based websites.
    I am an experienced and seasoned Magento expert seamlessly delivering diverse projects. These projects are simple information systems to complex enterprise-type architectures by using the Agile-Scrum Methodology. And visit my fiver account

    ReplyDelete
  2. it is nice information. i am very happy to see this latest technology news 2022 .

    ReplyDelete

Any Questions or Suggestions ?

About

Professional & Experienced Freelance Developer From India, Technologist, Software Engineer, internet marketer and Open Sources Developer with experience in Finance, Telecoms and the Media. Contact Me for freelancing projects.

Enter your email address:

Delivered by FeedBurner