- 12 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Module reuse strategy
- Updated on 12 Mar 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
The first step in CodeOps adoption is to design your modules with a reuse strategy.
Module design is an important consideration for any application. An app could be composed of a single module or hundreds of modules. It’s all up to you.
Based on our experience and research, here’s the breakdown of application code and potential for reuse.
Layer | % of a Typical app | Reusability |
---|---|---|
Infrastructure definition and deployment services | 5% | HIGH |
Connectivity to remote services | 20% | HIGH |
Application logic related to foundational services | 20% | HIGH |
Styles | 5% | HIGH |
Database models | 10% | MEDIUM |
Screen layouts | 15% | MEDIUM |
Application logic | 25% | LOW |
Roadmap to 70% Reuse
1. Start with the highest reusability layers
Use the guide above and ask yourself what infrastructure, connections, services and styles will be common amongst your applications. Start by mapping these into modules and work your way down the rest of the list.
2. Fine-grained modules have better reusability
You need to decide how large or small your modules should be. For example, if you are producing two applications that allow users to view different product catalogs, you could create two different modules, one for each catalog. Another way to go would be to create a single product catalog module that can handle both representations. The latter approach lends itself more towards maximizing reuse.
3. Maintain catalog hygiene
Be sure to set standards and review your catalog to ensure those standards are being followed. Remember to review the makeup of modules, remove out-of-date modules, and ensure your users can find modules in your catalog.
For more context, watch this video from our CTO.