It is still 2 weeks until Christmas, but after yesterday’s Magento 2 Development Update Webinar and today’s release of Magento v22.214.171.124 it already feels like Christmas eve. Some of you might have hoped that Magento 2 would be released in 2014, but if you read on, we will disclose some never before revealed, highly classified information by one of the Magento community’s finest developers, Tim Bezhashvyly.
This article does not aim to summarize yesterday’s webinar in all details, but only gives a rough summary of Magento 2 in general and then addresses one area that, as a frontend developer, struck me most, i.e. theme customizations. Another area covered in this article is test driven development (TDD) in Magento 2, which is of interest to both frontend and backend developers: some pretty amazing figures that show why Magento in gerenal has evolved to the next level of maturity in terms of enterprise software and code quality.
Here a list of some of the advantages of the Magento 2 programming approach and the Magento 2 platform.
- Less overall code coupling
- Clear and organized dependencies
- Enables testing
- Enables using well-known OOP patterns
- Enables rubust and compact customization
- Enables Aspect-Oriented Programming (AOP)
Inheritence will work differently in Magento 2, which means that you can define your own fall back mechanism.
- Simplified concepts: only themes instead of skins and packages
- Most of the files in themes are per module
- Unlimited levels of theme fallback
- Using language context for localization
The following changes will result in 80% less code in layout XML-files:
- Contents of all layout XML-files are completely revisted
- The are broken down into smaller pieces: 1 handle = 1 layout file
- Instead of overriding, the “melding” of layouts is by default
- Considerable reduction of copy paste
Test Driven Development
The Magento 1 Test Automation Framework (TAF) will not be used in Magento 2. Instead, there are already thousands of tests available in the Magento 2 Github repository and there will be many more once Magento 2 has been released.
- Location: dev/tests/integration
- Framework features: Tests isolation; Fixtures for database and configuration
- 2,500 tests, 25 minutes
- Location: dev/tests/unit
- Unit testing became possible due to dependency injection
- 5,500 tests, 11 seconds
- Location: dev/tests/js
- JsTestDriver, browser
- 170 tests, 2 secondes
- Mess Detector – code complexity
- Code Sniffer – code style
- Copy/Paste Detector – code duplicator
<img src="<?php echo $this->getViewUrl('new_year_2014.png') ?>" />
<observer instance="Magneto\Observer" mehtod="makeIt" /><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;"> </span>
<depends module="Magento_Cms" />
<depends module="Magento_catalog" />
- Location: dev/tests/static
- ~120,000 tests, 1 hour
- Control of the system response time
- Location: dev/tests/performance
- Typical scenarios: Adding product to cart; Admin login; Checkout; Data viewing for bigger stores, etc.
- 2 hours
Magento 2 Release Date?
So finally, here’s Tim’s eye-opening revelation from a highly classified tweet:
— Tim (@tim_bezhashvyly) December 11, 2013
But seriously: Unfortunately, there is still no exact release date for Magento 2, but the weekly Github development updates will be continued until the team is more confident about giving a definite release date. They are using agile methods like 2 week Scrum sprints to steadily progress to a more and more complete version.
I can actually understand from my own development and project management experience that it might be still too early to give any exact dates for the final release of Magento 2, but the statement in yesterday’s webinar that no roadmap will been made public, either, left sort of a bitter aftertaste. There is obviously some goodwill towards the developer community, but Magento Inc. (and/or eBay?) should be much more open to benefit from real open source developer community synergies.