commerce & mobile solutions

Magento 2 is mobile-friendly?

Mobile is set to overtake Internet access and the e-commerce market. Smaller, vertical touchscreens and customers switching from one device to another are new challenges to deal with. As an Android developer I’m going to check if Magento 2 is ready for these changes. Today I will ask our Magento developers about what they think.

Original photo by Olu Eletu

Bartek Kwiatkowski (BK): People love mobile apps and it’s another channel to reach the customer. Does Magento 2 have modern API suited for mobile apps (like full-functional REST+JSON)? The previous version with SOAP+XML was a bit too complicated.

Kamil Balwierz

Kamil Balwierz – Senior Magento Developer

Kamil Balwierz (KB): Magento 2 introduces Service Contracts – internal APIs for communication between Magento modules. This means that every core module exposes all its functionality over internal API. Even better, is that everyone of them can be easily exposed as WebAPI – REST or SOAP depending on your preference (both are exposed). With this design, using Magento 2 as set of micro services running your application – either mobile app or custom javascript app independent of your Magento website is easier than ever.

BK: Sounds promising. Any other features?

KB: Great changes for mobile purposes come with API authentication methods. Now you can communicate with API using OAuth with specific per-app credentials, access public methods that do not require authentication or perform customer (or admin user) authentication to acquire a token allowing you to perform actions within customer context.

There is also good news for SOAP API users. Now WSDL files are generated only for services you require – there is no longer a need to parse heavy WSDL with thousands of methods when you need to call two or three of them.

BK: Authentication as a customer is a really desired feature; it was missing in older Magento versions. How about Magento 2 performance?

KB: Magento 2 now offers built-in Full Page Cache extension in community edition (previously available for the Enterprise edition) – this cuts down the time for serving cached websites. Moreover there is native support for Varnish – another Full Page Cache solution – that is much more performant than any PHP code.

Native support for PHP7 that brings massive performance boost for backend processing time – PHP processing time is cut by half compared to PHP 5.6—is worth mentioning.

BK: More and more people shop using smartphones and tablets. Does Magento 2 support many web user interface versions depending on device capabilities?

Bartosz Igielski

Bartosz Igielski – Front-end developer

Bartosz Igielski (BI): The default Magento 2 theme is built on top of a responsive web design approach and provides an optimal viewing and interaction experience across a wide range of devices. We should divide device capabilities into two groups: physical and software. Physical capabilities include: screen size, input type, possibility to rotate etc. Software capabilities include: based on browser abilites to run modern code, supports API like Bluetooth, vibration, location etc. Detecting physical device capabilities, like touch screen, is nearly impossible on the web, that’s why everyone, like designers and developers do in Magento 2, should build one consistent UI. The software part of device powers can be easily tracked and have to be used to support as many user devices as possible and in Magento 2 this works as expected.

BK: Do you think that front-end development will be easier than before?

BI: If we compare Magento 1.9.1 “rwd” theme with Magento 2 Luma theme, we get out of the box a much better font-end performance, codebase built on top of modern libaries and a well-suited toolset. And now you may think that the answer should be simply “yes”, but not really  Front-end entry level skills are much higher than in Magento 1.x. It’s not a problem for teams specialized in providing Magento solutions, like we are. Of course everyone can build (or buy) custom themes on top of well-known libraries and override that complexity, but it’s not cost effective and possibly closes access to easy Magento 2 updates.

BK: Mobile is often the first and only Internet connected device in many places like Africa or India. But it’s also linked with a slow Internet connection. Is Magento 2 lighter and performs better than the previous version?

BI: Unfortunately Magento 2 is not lighter, but performance is quite well designed – the whole page is built with smaller modules, resources can be downloaded asynchronously and that’s why the core of the page is displayed faster than in Magento 1.x. Of course there are sill many things to be polished in further versions of Magento 2; that’s why we are going to support the community in this process – we believe in open source.

BK: Thank you guys!