Now, if you want to dive a little bit more into it, of course, then you would need to continue reading because they allow independent implementations with the same or different technology, meaning you can, of course, use, I don't know, React to write your components, but you could also use something else. So a little bit of the promises that you know already from microservices. In general, microfrontends can be thought of as just an extension or, let's say, the next step after microservices and they, of course, also touch the frontend. They don't need to be exclusive to the frontend. They can, of course, have some backend part in there and the best, let's say, scalable solutions out there, they really are full stack, meaning that there is, of course, some UI fragment that gets delivered, but there are also backend fragments that are delivered here from these teams. Now, what they should do in order to achieve that is they should minimize the code shared like you already do with your backend. And, of course, you don't want, let's say, to have interleaving areas with other subdomains, meaning other teams that are also creating microfrontends. At the end, the goal is to have autonomous teams here. So one team can also have multiple microfrontends, but the real important part is that there is no microfrontend that's shared among different teams. So also the microfrontends represent really an isolated unit that you talk about. Now, as I said, there are multiple things that you can do actually implement them. This will not be a talk where I go over all of these things. I just then use, of course, sample implementations to show you now the eight things that you can do instead. So let's start right away with local and offline development. Quite often when you get in the area of microfrontends, people say, well, then we need to have an aggregation environment, and only in that environment, can you not say, let your microfrontends run? So you always will have, let's say, this kind of weird feeling that you just not develop something. We don't even know how it then looks when it gets integrated and really used by end users. And that's not really good. So what you can do instead, and what, of course, we always encourage people to do is, we have a build tooling that, of course, triggers the start of your development session locally against your microfrontend, but then also takes into consideration some other sources. And very often these sources can be installed already upfront, for instance, in form of NPM packages, but they can also reside somewhere online. And then when you start your development session, just be grabbed or not, right? If you already have some locally, the cache one could be used, but this allows you to automatically update it. So now you run a studio microfrontend, but it now runs in the context of this, what we usually refer to as emulator. The name was chosen because it's the same idea that you have, for instance, when you develop, for instance, an Android app, you also don't do it on your phone right away. You don't do the integration, but you work against this emulator. And this, of course, can give you some bad tips. Now, looking at this scenario here, we have one microfrontend, it's just a standard Node or NPM project. So here based, of course, on React, and you see, we have a lot of development dependencies already installed, but the code base is rather small. If you look in the depth dependencies, you also have this strange one, which is our emulator. Now, if you just start this, then of course our microfrontend will run, but it looks rather empty, but it's already in something where we see not flicks. So that's the demo behind. So we have this Netflix shell, but it's rather empty because we are developing isolation, right? But what it can do via browser extension, for instance, is bring in other microfrontends.
Comments