What is the difference between the terms "extension" and "component"?

13

I've received an

asked by anonymous 07.01.2016 / 00:29

2 answers

7

Software Component

Software component is a logical entity that groups together a set of related features. It is usually composed of one or more interfaces that define which services (methods) are provided by the component and classes that implement the features.

In a financial application, for example, you can have one component to deal with bank accounts, another related to customers and another to collect tickets. All of these components are integrated through their interfaces and cooperate for the overall object of the application.

The componentization, when correctly implemented, brings several benefits. For example:

  • Allows the coherent division of work, where people or teams can work on different components, while the way the interaction between them occurs is well defined through interfaces.
  • Enables the independent evolution of component implementation, since each component is accessed by the interfaces.
  • Enables individual tests on each component before system integration, thus allowing you to anticipate problems.

Extension

Extension of a software is an entity, usually a software component, that adds functionality to existing software.

In general we can say that an extension is a specialized type of component that is commonly distributed separately from the main system.

Software is extensible when it has mechanisms for new components, or extensions, to add functionality that is not anticipated or required by the master code.

A software can be composed of components, but not extensible, that is, not allow new components to be added.

Extension mechanisms include:

  • DLL (Windows) / OS (Linux), which are executable libraries that can be loaded dynamically.
  • Classes or files with code that are automatically detected by the system and can, for example, add menus or components to the host.
  • Hooks / WebHooks / Observer Pattern, which are mechanisms where any application can log into the target application to receive event notifications and perform various actions.

Anyway, in general, there will be some APIs with extension points that allow you to contribute components and perform something logical on certain system events.

Some extension types can be plugged in at runtime, others need to be loaded during startup of the main program.

Considerations

Components and extensions exist at different levels of abstraction and have many applications. For example:

  • For an ERP, each subsystem can be viewed as a component, while third parties can extend the ERP by implementing new subsystems or new modules for existing subsystems.
  • For a system, each module can be viewed as a component.
  • For a module, certain classes can function as components.
  • For an application that accepts plugins, each plugin is viewed as an extension.
  • A plugin, which functions as an extension, can be made up of several subcomponents.
In short, the term is quite overwhelming and most of the time understanding that part of software is a component or an extension depends on the context and the point of view that you are dealing with.

    
07.01.2016 / 01:48
1

In a nutshell, a component adds more functionality to something that already exists.

An extension adds new functionalities that do not exist or even exist, such features are as an independent entity. Usually called libraries.

In practice, there is ambiguity in the use of both terms. Sometimes you will find softwares that define an "extension" as "component" or vice versa. You'll also see terms like "plugin". After all, is a plugin an extension or a component?

There is no universal normal for exact definition because it depends on the context.

In the ASP (classic asp) language, for example, there is no native resource for sending e-mail. For this there are components such as CDONT. But why is it treated as a component and not with an extension since the CDONT aggregates a funcinality independently? The CDONT should be treated as an extension. The same in case of file upload. Due to the lack of native resources, there are components like "DUNDAS Upload".

But if we look closely, the term "extension" can be interpreted as an extension of functionality, which gives the same context as "component."

As you can see, it is confusing and ambiguous to define what is what. It will depend on the application developer's interpretation if there is no longer a consensus within the context of the tools used.

    
07.01.2016 / 07:26