Re-using codes is not entirely bad for Cloud-native apps

Bamyx Technologies
3 min readAug 12, 2021

Many people working on micro-services and service-based architectures put too much emphasis on reuse. Don’t do that again

Image credit: Bamyx Technologies

Since I was a lowly COBOL programmer in the 1980s, reusing has been a rallying cry for coders. The structural programming era began when we defined functions that could be called multiple times. We subsequently moved on to other languages, such as C and object-oriented C++, as better ways to expand on the reuse concept. Eventually we moved on to distributed objects and SOA (service-oriented architecture) services, where reuse grew out of single apps, and then to loosely linked, cross-platform reusable services. Now we have cloud services or APIs, as well as the intriguing concept of micro-services, which provide a new level of shared granularity!!!.

For both cloud and non-cloud developers, reusing and/or sharing has taken on a new meaning. In 2022, many people are adopting the term DRY, which stands for “don’t repeat yourself,” as their new slogan for developing and deploying apps and systems. However, it is not that simple. Over the years, I’ve made two main mistakes while developing service-based applications: excessive reuse and not enough.

Is it possible to have too much service reuse? It occurs when the productivity gained from using the same services on a regular basis decreases or even becomes negative. Utilizing services that must be abstracted and some of their functionalities altered to match the needs of an application is an example. For example, a service that gets consumer credit data with complete client information but returns most of the common data in a response set or a data stream because it isn’t needed for this specific function within the application.

These kind of hacks that force the reuse are becoming more common. Whether they should or not, application development is becoming a mix of services that are reused. Furthermore, these inefficiencies are frequently overlooked in code reviews and code scanners that have yet to recognize that some reuse may be inefficient. I’m sure some of you who sling code more than I are concerned that the reuse baby will be thrown out with the unproductivity bathwater, but I’m not suggesting that you go back to creating one-time-use services and micro-services.

It all boils down to comprehending the benefits and drawbacks of using reusable services, as well as how they should be created and implemented. The main concerns are: Will reusing these services improve my application? Is it necessary to redesign and deploy the service I’m using? Or should I construct a new, purpose-built service?

You’ll discover that taking multiple paths and keeping an open mind about which services should be reused is often more effective. Learn to notice when you’re trying to fit a popular concept into your life. I’d rather be productive than follow the mob any day.

kindly follow and like this page for more exciting and educative Tech news.

Be the first to know what’s happening in the Tech world, click on “subscribe”. Thank You!!!

--

--

Bamyx Technologies

We are a technology business that provides large-scale saas solutions to companies in a variety of industries.