The economy of reusable components

The economy of reusable components
Photo by Ashkan Forouzani / Unsplash

Every application has a hidden mountain of source code in the form of imports. DRY is not the only reason for code reusability. There is an economic impact that's far more important.

Consider a blog platform. It's costly to build it from scratch, which includes a modular editor, image uploads, SEO utilities, web servers, grammar correction, and themes. The revenue from selling the platform at a reasonable price won't recoup the cost.

However, if Editor Corp develops the modular rich-text component, it can sell it to you plus hundreds of other companies. Similar would be the case for all other components. The cost is shared within the software company, while everyone gets to build a great product, which results in better outcomes for users.

SaaS is one example of this phenomenon. An earlier incarnation was reusable desktop libraries. On the other hand, niche products would continue to be costly to develop.