By Brian Holecko Certified Magento Developer at InteractOne
Magento 1 vs. Magento 2
After about 10 years from the inception of M1, M2 was released to address many of the shortcomings of M1 using lessons learned from many years of community feedback. Some of the most critical architectural issues resolved in M2 involve extension conflicts, large class files, and JavaScript files. In addition, there are many upgrades to the admin and front end to improve customer experience.
Architectural Differences in Magento 2
Extension conflicts
- Due to a thriving community extensions market, clients tend to rack up on pre-made extensions, with 30 or more community extensions being the norm. The trouble here comes with extension conflicts when two or more extensions try to rewrite the same functionality. This has to be resolved manually and can be very time consuming to determine where the conflict is and how to fix it so that any conflicting extensions are fully functional.
- Magento 2 introduces plugins which allow code to overlap core code rather than override it. This significantly reduces the chance of conflicting code.
Large class files
- Class files which are most critical to M1 are often large, so large it made it difficult to quickly determine the core functionality of its functions. An architectural decision inherited from less enterprise grade platforms, this eventually became more of a problem as additional functionality was packed on in later releases.
- M2 solved this issue through dependency injection: abstracting out the dependencies of a class to make it lighter weight and easier to read.
Too many JavaScript files
- M1 made a mistake by choosing Prototype as their core JavaScript library over the more popular jQuery library. This led to most implementations importing jQuery in addition to Prototype, often mixing calls to both libraries which were designed to do the same thing. Also, many extensions require additional JavaScript libraries, resulting in a large number of JavaScript files which were applied to every page of the site, whether in use or not.
- M2 solved this problem by removing Prototype in favor of jQuery and also adding the RequireJS library. Now, the JavaScript libraries required for any script must be specified beforehand. This change improves performance by reducing the number of JavaScript files which can be called.
Many of the architectural decisions made in Magento 1 were most likely influenced by its predecessor, osCommerce. Magento 2 clearly stands on its own as an independent enterprise platform which is up-to-date with industry trends, both frontend and backend.
New Key B2B Features in Magento 2
- Account management – You are able to manage accounts, create sub-accounts, and set permissions and roles easily.
- Negotiated Pricing Terms – You can associate accounts with specific price lists, payment options, and shipping methods.
- Mobile Responsive Design – your customers will be able to order on any device or platform.
- Quick Order – Your B2B customers will be able to create a quick and easy re-order, large scale orders, and even recurring orders.
- Credit Accounts – You can customize for the businesses to make purchases based on their needs. They can check out now and pay later.
- Inventory Tracking – You will be able to manage your inventory across multiple warehouse locations.
Magento originally said that support for M1 will likely end after 3 years from when M2 was initially released. That means that patch and upgrade support could end sometime around Q4 of 2018. Although, Magento recently said they will be supporting M1 for the foreseeable future with an 18-month notice before any changes are made.
However, with many features and extensions for M2 created and even free, there’s not a lot of reason to stay on M1 if you don’t have to. With support coming to an end possibly sometime next year, mixed with the cost of upgrading to M2 vs the cost of maintaining M1, now is the time to make the move.
If you’re currently experiencing issues and conflicts on M1, contact us about moving to M2.