How to develop a good generic component?

Updated IT News

There may be times when people mistakenly think that reusing a component from one project in another will reduce development costs. However, in many cases, this is not the case. And as we will see, you need to be particularly careful when reusing a single component in other IT tools.

Reusing a piece of code in other environments tends to be a popular option among developers, as it allows them to make faster progress by duplicating a component and reducing development costs. But doing so is in fact not so simple.

In most cases, the issue of reusing a computer component is not so much a question of technology, but rather of design.

It’s important to keep in mind that a reusable component is at least 3 times more complex to design than a single-use component. (Robert Glass – American software engineer)

Beware of duplicating components

There always comes a time in an IT project when developers say to themselves: “we’ve already developed this component for a previous application or iteration, and it’s good. So, we can just copy and paste it to our new project and save time.”

But if you’ve ever been involved in the development of a software project, then you’ll probably know that in most cases, a simply copy and paste does not work.

Indeed, an exact duplication of a component in a context that is 100% the same as the initial context the component was applied to never really happens. There will always be differences and a variability between environments that is functional and/or technical.

It is extremely rare to have two different environments in which a single component can fit perfectly – there are always differences from one context to another.

A high level of design

This leads us to the issue of design. In order to allow all variations from one environment to be successfully employed in another, a very high level of design is required. And it is precisely this high level of design that requires most investment and attention, if we are to successfully create a component that can be reusable in other applications.

It’s essential to remember that the effort it takes to develop a reusable component is significantly greater than the effort it takes to build a component that will only be used once. In the case of the creation of a reusable component, it will be necessary to anticipate and design for all the variables that the component will encounter during its use.

When is it time to design a generic component?

To design a good generic and reusable component, it’s best to wait until the next iterations are complete. By doing so, the team of developers will already have detailed knowledge of all the contexts in which the future generic component will be deployed. It is only when the planned contexts are complete and ready that we can start designing the component that will be used in all of them.

The testing phase is also very important when building a reusable component. Often, one of the most complicated tasks is actually testing this component in all environments, which is another reason that it’s best to wait until all of the environments are testable before deploying the component.

At Bocasay we develop your IT projects from start to finish: from design, through development, to testing, production and final deployment of your application.

Visit our Website - related posts from same category