A small proof of concept for building an eCommerce system based on an underlying API system. Moltin, Magento 2, CommerceJS and more.
As developers we are all stubborn and think we know best. Myself and Sander are no exception so we asked ourselves "How would we build a system to give you the freedom of your side projects but the power of a big ecommerce system".
At first it was a proof of concept for Moltin (a fully api based commerce system) but over time while working on the system we thought why not make it much more. The aim is to have a framework that you control and simply plugin a bridge to the API based ecommerce system of your choice.
We do not fully know where this roller coaster will take us but are happy to be on it!
Over the past years it has become more and more important to build systems and utilities that work with multiple frameworks. With the help of Darko Poposki I have spent a year testing out my architecture ideas in projects (sadly covered by NDAs) but now we are venturing into the public space.
The idea came to us to have a utility that can import and export entities into a common format. Because what really is a page, product or user?
We came up with the idea of having one central module that contains interfaces to define the generic service layer and then building a bridge for each framework's implementation.
For the first iteration we have build a way to import and export basic pages into and from a JSON file using a serializer. At the time of writing this is a very small set of features but with the focus being on extend-ability..
So this is it:
Some interesting facts overall it took us 15 hours to build and once we have the generic module and Magento2 module it took 10 minutes to build the Magento1 bridge.
Magento 2 like Magento 1 comes with an inbuilt rest api system. This system will allow you to do a multitude of things including, but not limited to: product manipulation, cms page and block manipulation, checkout and search.
For the purpose of this article I will focus on the cms part and in particular creating and editing cms pages. Though more detailed information on all the rest api calls can be found on DevDocs. The outcome of this article is to demonstrate how it would be possible to add and edit cms pages via a rest api built into Magento 2.
I am making the assumption that you have the following:
NOTE: to access the rest api you need to call your local url, in our case http://www.mage2.devbox, with the url /rest
In modern web development git seems to be the version control system of choice. Even though it is popular a lot of people only know the 5 main commands and are happy with them. In this talk I stepped through some does and don’ts of working with git, so advanced features and talk about team workflow with git.
MageStackDay is an online hackathon dedicated to answering questions on magento.stackexchange.com & Magento community forum. It's all about getting together online and enjoying the best thing about Magento: community!