Feature Modules: The Answer to Building Micro Frontends for Mobile?
In our research and through observing engineering teams, we have found that companies have tried various ways to implement the micro frontends technique for mobile like creating mobile apps using feature modules. But is this the best way?
The approach to building applications using micro frontends is becoming more prevalent. Micro frontends is an architectural style where UI front-ends in desktop web apps are composed of independent components that can be built by different teams at different times, saving development time and costs. But adopting the micro frontend technique to develop mobile apps is complicated.
In our research and through observing engineering teams, we have found that companies have tried various ways to implement the micro frontends technique for mobile. More recently, developers have discovered that creating mobile apps using feature modules could be one way to tackle the micro frontend technique on mobile. But is this the best way?
What are feature modules?
Similar to the micro frontends model, feature modules break up apps into smaller, specific functions, allowing for fast application development. Feature modules are written in native languages like Swift and Kotlin because they are used to develop native mobile apps.
The benefits to using feature modules
There are some benefits with going this route.
Google Play and Apple App Store have created resources to help teams deploy and manage these native code bundles. Google Play created a feature delivery service which lets developers take Android app bundles (AABs) and break them into smaller feature modules that can be downloaded on demand by users.
This tends to be used more with game developers who need to implement in-app purchases and prompt players to download new levels as they move up in the game. For example, rather than downloading the entire mobile game at once, developers can break the app into packages that are downloaded once a new level is unlocked.
The problems with feature modules
Even with the prospect of feature modules to help speed up the mobile app development process, mobile teams are still unable to build, test, and deploy independently in parallel.
Feature modules need to compile down to the same binary.
Though the work to create these micro experiences are split between business units, the app still needs to be combined into a single binary at the integration and testing step of the process. This eliminates the ability to constantly work independently once the app is compiled.
Feature modules actually make build times longer.
Because the feature modules need to be combined into a single binary, and the amount of code and SDKs that get leveraged in the apps is so large, building these apps will not save as much time as promised. Legacy applications and apps that support hundreds of different devices can especially run into this issue.
Dependencies need to be managed.
Though teams are working independently on feature modules, communication between different teams can become complicated. Everyone needs to be on the same page to ensure architectural decisions are made and adopted across the organization.
For instance, the same analytics libraries, data storage systems, and other common core libraries need to be used by each team building the app to avoid creating duplicate code or using separate libraries. Duplicating efforts can also cause the app size to become too large, which could cause users to run out of space on their devices or incur extra data fees for downloading big apps.
All app updates must go through the app store review process.
From minor bug fixes to important feature updates, all changes made while building on a native codebase must go through the app store review process. Each team must synchronize with each other to make sure that their code is up to standard and ready to be released on time.
Ionic Portals: The alternative to feature modules
Ionic Portals is a secure and extensible way to bring micro frontend capabilities to native apps backed and developed by Ionic. Rather than using native code bundles to develop apps, Portals embeds web experiences into native mobile applications. It is built for teams with native mobile apps and web developer talent that need a flexible way to enable their web developers to add new features and screens to native apps in a safe, controlled way.
Work in parallel.
Ionic Portals allows native and web development teams to work in tandem. We give teams granular control over which sections and which features the web developers can access.
Access to native components.
Though Ionic Portals integrates web content into native apps, developers will get full access to native components and device APIs (like camera and geolocation). The seamless integration between native and web, native feature access, and offline capabilities will be invisible to your users; they will experience your app like any other native app.
Avoid the app store review process.
Ionic Portals comes with a Live Updates feature that will allow your team to update your web based content, images, and more, by bypassing the app store review process. This saves time when critical bugs or A/B changes need to be made daily without having to go through the app store review.
Ionic Portals is backed by Ionic.
Ionic is known for our enterprise support, advisory, and training services that you don’t get from Apple, Google, or Facebook. We have mobile and security experts available to help.
We also have security experts that make sure we’re following Apple and Google’s guidelines to provide you with a great experience that is also safe for your users' data.