14 Migration, local development, and testing

 

This chapter covers:

  • Migrating a monolithic application to a micro frontends architecture
  • Setting up a local development environment and examining techniques like micro frontend mocks to ensure independence
  • Implementing automated testing in a micro frontends architecture

Micro frontends is not the first architecture for most companies. It’s something you migrate to because the old architecture has trouble keeping up with new demands like increasing team size or high demand for features.

If you are a fresh startup that needs to grow quickly, it might be a good idea to start with micro frontends from scratch. However, most larger companies use micro frontends to replace a functioning but slow or unmaintainable monolith. If you find yourself in the latter camp, this chapter will help you by highlighting some good migration strategies.

In the second part of this chapter, we’ll take a closer look at the developers’ day-to-day life in a micro frontends project. A team only works on its slice of the complete application. Developing a feature locally without seeing it integrated with the rest of the software will feel strange at first. You’ll learn techniques and tricks that make developing and testing easier.

14.1 Migration

14.1.1 Proof of concept and building a lighthouse

14.1.2 Strategy #1: Slice-by-slice

14.1.3 Strategy #2: Frontend first

14.1.4 Strategy #3: Greenfield and big bang

14.2 Local development

14.2.1 Don’t run another team’s code

14.2.2 Mocking fragments

14.2.3 Fragments in isolation

14.2.4 Pulling other teams micro frontends from staging or production

14.3 Testing

Summary

sitemap