Welcome everyone to the, as mentioned, last talk of at least this track. I'm first and foremost super excited to be here. One of the reasons is that this is actually the first time I'm talking at a conference, and the other reason is that I will be sharing how we accidentally built a plugin SDK for microfrontends, which I refer to as microfrontends on steroids, but the responsibility in me put in the disclaimer, so really bad.
Quick intro for me or about me, it's, my name is Andre, I'm a principal engineer at Betamax, which is a Berlin based education tech company and happens to build, have built the world's most advanced adaptive learning and teaching systems for school. So besides, as mentioned, building digital products, I love to build actual things also, so in case you get already tired about talking about code, then hit me up and we can talk about woodworking or water sports for that matter, but back to the topic, how did we get there?
In order to answer the question, I want to give you a little context of the problem we are trying to solve and how we ended up in the position of having to solve it in the first place. So I'm old, which is not the root cause of the problem of course, but it means that back in 2008 when Betamax started development, I was amongst the first developers who, who kicked us off and we built a traditional multi-page application powered by PHP, which got us quite far.
In fact, so far that four and a half years later, we were able to announce that Uruguay has chosen Betamax to provide all math material for all the schools, which was a huge win back in the days, but it also meant that we will have a problem pretty soon because from the data we got in Germany, we know this setup would not scale on the level of a whole country. So, we thought it would be a nice idea to build a single page application, hot shit back in the day. By chance, any one of you know, when React was open sourced? One month later. So I think it's time to address the elephant in the room. We are at the React conference, but at this point in time, we went with the only reasonable choice being AngularJS.
So we, we in fact built the app, we shipped it and we built upon this base ever since actually. So, but fast forward, nine years later, the inevitable happened and Google discontinued the long-term support for AngularJS. I mean, quite some time to be fair. Um, at this time I was, I already rejoined Betamax, uh, with a mission to come up with a plan of how to iteratively migrate from AngularJS to React. So I rooted for a micro frontend approach and we executed it with a single span, which is basically a JavaScript router for micro services in the frontend. And it differentiates amongst other things, different types of micro frontends, which I will quickly explain because I will use the terminology moving forward.
So we have apps, of course, which are just like any other single page app, but without an actual HTML page. We have a root config which provides this root HTML page, it handles app registration, mounting, unmounting. So it is responsible for the whole composition of the micro frontend setup. Then we have utilities to share common logic and like services or component lib and we have parsers to share UI between frameworks. This will be important later. Um, our proof of concept was fairly easy done. So we implemented the navigation and react and kept the content area as a stripped down AngularJS version with bespoke bootstrapping process for the app, which worked pretty nicely.
So we put a whole team on it and started developing fast forward to this point. We now run a full blown micro frontend setup where apps can render parts within other apps where we are currently at 58 micro frontends and still counting. We have services, utility micro frontends that provide shared APIs, including global state management and behind the scenes, we do this with RxJS quite heavily. And yes, we still have some use cases in AngularJS, unfortunately, but we are getting there. Um, yeah, I did promise you that. I know.
Comments