Among developers you hear from many of them that the work with Magento 2 is challenging. For me as a longtime Magento 1 developer, the switch was not easy, either. With the different resources available you can make the learning process easier. In just a few weeks two of my colleagues and I managed to become Magento 2 developers. In this post you find out how.
It was only end of October that I started working on my first Magento 2 project and already by mid-December I was able to offer a Magento training for developers.
Magento 1 Experience
Even if Magento 2 partly requires completely different development techniques than Magento 1, your experience with Magento 1 comes in handy when learning Magento 2. For example knowing which functionality is in which core module and an understanding of the database structure are a big help. In addition, concepts such as collections, layout XML or MVC are already familiar to Magento 1 developers. If you are well versed about Magento 1, you can find your way in Magento 2 faster. However, I have already heard of others that young PHP developers find it easier to learn Magento 2 than experienced Magento 1 developers. It's an imperative to accept new concepts and engage with some unusual proceedings in Magento 2.
Read, read, read
Since the first Magento 2 blog posts were published, my colleagues and I followed up. So we had a good overview of concepts in Magento 2 right from the start. Plus, you learn which technologies are already fully developed and which might lead to you getting stuck. You learn on which parts you should keep an eye and which technologies you should better avoid. Reading these blog posts and short messages (e. g. on Twitter, hashtag #magento2) you collect a lot of theoretical knowledge.
The jump start for me was the participance at a Magento 2 Hackathon in Zurich, Switzerland in October 2015, shortly before Magento 2 was officially released. There, I teamed up with two experienced Magento 1 developers I hadn't known before to make our first steps with Magento 2.
Last 1.5h: created module, used Dependency Injection, Interception, setup scripts and i18n in #magento 2. Very effective group programming.— Andreas von Studnitz (@avstudnitz) October 24, 2015
This first hands-on experience was essential to my motivation - it was a positive realisation that the start with Magento 2 was less complex than I had previously anticipated. I am sure that there are currently enough Magento 2 newbies to set up similar groups at hackathons. At following hackathons I continued to work with Magento 2. However, in my opinion this first Magento 2 hackathon was the most important to get me started.
And another event was vital for my quick start with Magento 2 development: MageUnconference in March 2016. Especially a session by Peter Jaap Blaakmeer, in which he presented a jump start in Magento 2 development, deserves to be highlighted here.
Prefer event observers over before/after interceptors over around interceptors over DI class replacements in #magento2. @PeterJaap #mageuc16 â€” Andreas von Studnitz (@avstudnitz) 12. März 2016
This contribution by Peter Jaap was also part of a training programme, therefore I would say it's equivalent to attending a training. At other Magento conferences there were other suitable talks, too, that helped to get started with Magento 2. My main intent here was to have a good understanding of Magento 2 before actually getting started with development. As a result, I felt well prepared before writing the first line of code.
To really learn how to work with Magento 2, hands-on work on a real Magento 2 project is indispensable. In my opinion, this is the only way to get the absolutely necessary development experience. With the groundwork described above it was fortunately fairly easy and painless to get started. Within a few weeks I felt confident enough to share my newly acquired knowledge in a training.
While working with Magento 1 without a debugger such as XDebug is comparatively unproblematic (at least a few developers I know have never used a debugger), I think it's difficult to continue this practice in Magento 2, mainly because of the increased complexity. The execution paths are longer and more complex, and finding your way in a new technology is much easier with a debugger at hand. My personal aha moment was during a hackathon in Paderborn, Germany, where I tried to find out how Dependency Injection works. It was the debugger which led me to automatically created classes and the use of Reflection, and, thereby, finally helping me understand the underlying principles.