Slides of our talk at Meet Magento 2017 in Leipzig about getting Magento 2 headless into Typo3.
View Slide
Leipzig, 23.05.2017Marcel Kempf & Carsten Sandtner// mediaman GmbHHEADLESS IN THE CMS
Copyright © mediaman.com | 324.05.17about:usHEADLESS IN THE CMSMarcel KempfSoftware Developer at mediaman GmbH //Carsten SandtnerTechnical Director at mediaman GmbH //@casarock
Copyright © mediaman.com | 424.05.17HELLO WE ARE MEDIAMAN
Copyright © mediaman.com | 524.05.17130 digital specialists worldwide§ Founded in 1996§ Locations in Mainz, Stuttgart,Shanghai, and BostonABOUT US
Focus: We are specialised in servicing the automotive, finance, insuranceand manufacturing industries.
Copyright © mediaman.com | 724.05.17We are proud of the trustworthy and dependablerelationships with our numerous longstanding customers.ÜBER UNSAutomotive Finance Industrial Consumer
Copyright © mediaman.com | 824.05.17Derivation ArchitectureLessonslearned
Copyright © mediaman.com | 924.05.17Derivation ArchitectureLessonslearned
The Beginning© Greg Rakozyhttps://unsplash.com/photos/oMpAz-DN-9I
Our Challenges© W. Carter https://commons.wikimedia.org/wiki/File:Red_and_blue_pill.jpg
Copyright © mediaman.com | 1224.05.17Challenges§ Several multilanguage CMS instances– Mass of corporate content§ Overtake existing shop§ Existing independant systems (CMS, Shop)§ Connect PIM
Our preferred solution
Copyright © mediaman.com | 1424.05.17Preferred solutionSOLUTION§ One user interface to the customer§ One system is responsible for content delivery§ Everything else is being used with an API
Excursion: OneWeb
Why OneWeb?
Copyright © mediaman.com | 1724.05.17Website and shop melt into OneWebONEWEBOneWebWebsite ShopContent• Product experience• Productfinder• Campaign• Passion though inspiring content• Excellent UX• Dealer Locator• Company presentationShop• Buy products or save on wish list• Conversion• Lead generation• Cross- and upselling• Payment• Personal accountOverall• Multilanguage, responsive, SEO optimized
The Challenge© Sonny Abesamis: https://flic.kr/p/ed4vHr
Copyright © mediaman.com | 1924.05.17RequirementsTHE CONTENDERS§ Good documentation§ Active community§ Known technology§ An API§ Migration of existing contents should be easy
The Content Management System
Copyright © mediaman.com | 2124.05.17Typo3 as CMS§ Good documentation§ Active community§ Known technology§ Easy migration§ An API✓✗✓✓✓
The Shop System
Magento or Magento 2?
Copyright © mediaman.com | 2424.05.17Magento 2 as shop system§ Good documentation§ Active community§ Known technology§ An API§ Easy migration✓(✓)✓✓
Possible solution(s)© Gerwin Sturm: https://flic.kr/p/7zsLdk
Copyright © mediaman.com | 2624.05.17More considerations§ Shop Extension for Typo3– We need a real shop! ;)§ CMS Plugin for Magento 2– Migration of existing content pages isn‘teasy– Workflows?
Our Solution© Miguel Á. Padriñánhttps://www.pexels.com/photo/mathematics-colorful-game-color-19677/
Copyright © mediaman.com | 2824.05.17Derivation ArchitectureLessonslearned
Copyright © mediaman.com | 2924.05.17OverviewHostingBackendVersion 2.xOneWebFrontend
Copyright © mediaman.com | 3024.05.17MagentoTYPO3Highlevel architectureTYPO3 MagentoRedisBrowserRESTCache Magento RESTResponses using Tags
LogiticsBackend systemsOneWebExternal systemsWarehouse ShippingERP (SAP)Webshop (Magento)Website(Typo3)ProductdataCustomerdataOrdersPrices StockProductdataNLPermissionOrdersStockCustomerdataPricesAnalytics Paypal+TrackingTrackingData Warehouse,DMS, PIM/CRM
Copyright © mediaman.com | 3224.05.17Planned InfrastuctureTypo3 (4x EC2)auto scaling groupMagento (4x EC2)Auto scaling groupAmazonAuroraAmazonElastiCacheAmazonCloudFrontAmazonS3ELB ELB
Copyright © mediaman.com | 3324.05.17Current Infrastructure§ Typo3: nginx, Redis, MySQL§ Magento 2: nginx, MySQLProductionMagento 2 Typo3 FirewallStagingMagento 2 Typo3 Firewall
Typo3
Copyright © mediaman.com | 3524.05.17ExtensionsTYPO3Template Custom extensions by mediamanThird PartyExtensionsCustom content elementsCSS, JS, Constants etc.SharedShop Code Own Extensions
11 Extensions
~25 Templates
Magento 2
Copyright © mediaman.com | 3924.05.17Using Magento APIMAGENTO 2 - ARCHITECTURE§ Requests are proxied through Typo3– no direct access to the Magento APIs§ User is authenticated via a user token– Stored and appended by Typo3
Copyright © mediaman.com | 4024.05.17Which APIs where not included in theMagento core?MAGENTO 2 - ARCHITECTURE§ Fetching/Creating reviews§ Fetching rendered blocks§ Fetching (full) related products by relation type– Related Products/Up- and Cross-Sells§ Newsletter interactions§ Password reset§ Wishlist interactions
Copyright © mediaman.com | 4124.05.17Which APIs where not included in theMagento core?MAGENTO 2 - ARCHITECTURE§ No filter for only in-stock products§ No filter for configurable products
Copyright © mediaman.com | 4224.05.17Necessary add-onsMAGENTO 2 - ARCHITECTURE§ PayPal Plus§ Follow-Up E-Mails§ Multiple coupons
Copyright © mediaman.com | 4324.05.17API-Only and 3rd Party add-onsMAGENTO 2 - ARCHITECTURE§ Templates cannot be used– Have to be written again in Typo3§ APIs often don’t offer enough functionality§ Session based authentication has to be changed to token based– Many plugin and preference classes
Copyright © mediaman.com | 4424.05.17Tests FTW!MAGENTO 2 - ARCHITECTURE§ TDD approach– Think before you code– Secure refactoring– Better architectures– Fun!
Copyright © mediaman.com | 4524.05.17Communication with ERP (SAP)MAGENTO 2 - ARCHITECTUREMagento SAPSynchronizedCustomer has own SAP IDUser data and ordersMaster for stock and prices
Copyright © mediaman.com | 4624.05.17Workflow – Content ManagementMAGENTO 2 - ARCHITECTUREEditor Staging ProductionContent Sync
Copyright © mediaman.com | 4724.05.17Derivation ArchitectureLessonslearned
Lessons learned
Early adopters hard life© Lisa Larsen:https://pixabay.com/en/staniel-cay-swimming-pig-seagull-171908/
Copyright © mediaman.com | 5124.05.17Magento 2 Core System§ Some features may not beready yet§ Community is not that big§ There may be bugs…!EARLY ADOPTERS HARD LIFE
Copyright © mediaman.com | 5224.05.17Extensions§ Extensions may not exist§ Extensions may not be readyEARLY ADOPTERS HARD LIFE
Being headless© Carson Arias:https://unsplash.com/photos/7Z03R1wOdmI
Copyright © mediaman.com | 5424.05.17Going API only§ Where are my templates?§ Extensions may not have anAPI§ What does it mean “You cannot use the ExtensionsTemplate”?BEING HEADLESS
In summary
Copyright © mediaman.com | 5624.05.17In summary§ Being early adaptor is hard§ Headless means:– You have to rebuild many existing processes in the CMS– Extensions and add-ons are not meant to be used headless!– Shop templates have to be rebuilt (every single one…)§ But headless means, too– You are able to build content rich pages within your shop– Marketing will love you ;)§ It was a tough but interesting ride!
Leipzig, 23.05.2017Marcel Kempf Carsten Sandtner@casarock[email protected]THANK YOU!