How we met the new kid on the block, Magento 2

How we met the new kid on the block, Magento 2

We’ve started to hear about Magento 2 for some time now. My colleagues and I tried to play with this new toy a little, but it’s not that easy to practise it while working on a Magento 1 project full time.

We all spoke with our clients about the future of our projects and it’s part of our job to keep them updated with the evolution of the technologies and platforms we use. So it’s pretty obvious that Magento 2 popped up in our conversations soon enough after its launching. The thing is that we couldn’t vouch for this new kid. Deep down, we wanted really bad to be able to do it, but we couldn’t. However, we also knew that we had to start from somewhere, so we went to DevParadise in Opatija, a Meet Magento event held by the well known tutorial gurus Inchoo.

The organizer had announced that the event would start with a Hackathon, so we joined in, even though we didn’t really know what to expect (hackathon means coding so what else do you need to know, right?). We all took care of the prerequisite (we had installed Magento 2 on our laptops), so the game began.

The set-up

The rules were simple - we all had to vote one time, using our GitHub account, for a DevParadise issue on a magento-hackathon repo. After that, all the people who voted for a particular issue formed a team that had to solve the said issue. We had about 6 hours to do it.

After voting for the ReactPhp implementation, I had the pleasant surprise to discover that I had to team up with 3 of my colleagues (Boby, Bogdan and Lilian) and with Fabian, whom I knew from the last year’s edition of Meet Magento Romania. As highly extroverted people, we took up a corner of the room to start on the development. 

After we met Fabian and introduced ourselves, we decided that this would be a pair programming job. The winner of the keyboard was my dear colleague Boby, who was the most entitled to do it, due to his experience. Me and Bogdan were struggling to understand the concept behind ReactPhp and its benefits, while the other 3 were already gathered around Boby's laptop, discussing the best approach for the task.

The challenge

Lilian had a little experience with ReactPhp on Symfony and, knowing that Magento 2 has a working bundle with Symfony, it seemed like the best place to start. The main goal was to make every hit on Magento 2 go through ReactPhp shell script, which would take the response from Magento and send it through React, and then output the response from React. This way, React would manage the processes in which the request was to take place. By doing this, React keeps the process alive through an event loop. Keeping a php process alive was another debate. This was the theory behind React.

Time was ticking and, after a few beers, me, Bogdan and Fabian were trying to help the Boby-Lilian duo, who was struggling with each Request element. At first, it was the Headers, then the POST/GET info and, in the end, the Session Id. The thing is that you cannot take the whole Request Object, with all the aforementioned elements, and pass the output of the request to a third party, in this case, the React Library. We had to take care of each element separately and add them to the React request.

Now, everything is clear in our minds. But, in the heat of the moment, we had little knowledge of these impediments and how to solve them.

I was clearly playing out of my league, but you can only get smarter by playing a smarter opponent. I had hit my limit and I was ready to give up, but our duo of colleagues had not yet thrown in the towel and dragged the rest of us after them. And now I have new limits.

What I’ve learned

There are some key mindsets in every challenge when the idea of giving up first pops in your head. The proper attitude is to never give up. You never know how far you can reach by taking things slowly and confidently in the right direction.

For sure the duo’s experience and attitude inspired us to go further in our little worlds as web developers. In this case, we were the ones who followed, in other cases, we are the ones who lead. But the rules never change, only the players. Inspire the ones who are following you and respect the ones who lead you. This way, everyone is happy.

Do I know more about Magento 2 and was I more confident about its capabilities after this hackathon? Maybe, but my focus has changed throughout the day and my take away was different than what I had expected. (Pretty common stuff, right?)

The whole hackathon context fueled our determination to overcome a challenge, but in a tiny little world this also happens with our daily tasks. For many people we are just weird, introverted people who solved something with a computer, but for us, it’s a daily challenge, a step by step journey to discover new and brave worlds.

Don't kill this little daily excitement, nurture it! You never know where it will take you.


NO COMMENTS

Tell us what you think

Fields marked with " * " are mandatory.

We use cookies to offer you the best experience on our website. Learn more

Got it