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

Asked

Viewed 867 times

14

I received a commenting in one of my questions and found the theme interesting, because I do not know how to differentiate a componente of a extensão in a system.

What are components and what are extensions, and what is the difference between them?

  • 1

    I suspect that the extensions in that context refers to Extension methods of C#, is a feature that allows adding methods to existing types (as if it were a native method), see in the example of the answer that the class is not called, the WordCount() was applied directly to the variable (probably of the string type).

  • 1

    Renan, I also suspect that this is specific to C#. Please review if this is what the question is about and update it as needed.

  • 1
  • @utluiz, I will try to confirm if this is so, I find in the OS in English, I thought it was a general terminology and not specific, so I asked, and also because I did not find anything in Portuguese. http://stackoverflow.com/questions/14139519/what-is-the-difference-between-component-extension-module-in-yii.

  • 1

    @Renancavalieri Extension and Component are extremely overloaded terms, that is, there is a general terminology that explains what they are, as well as there are thousands and different types of components and specific extensions of languages, systems and even hardware components, but I think just knowing the general terms won’t satisfy what you want to know according to that comment. Anyway, you should decide if you want to know what are, generically speaking, components and extensions, or if you want to know what are components and Extensions of C#.

  • @utluiz understood, I wanted to know the same general terms, I quoted the comment because I thought it would be relevant to the question, but I was unaware of the existence so many variations of the terms.

Show 1 more comment

2 answers

8


Software Component

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

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

Componentization, when correctly implemented, brings several benefits. For example:

  • Allows 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.
  • Allows the independent evolution of the implementation of the components, since each component is accessed by the interfaces.
  • Allows individual testing on each component before system integration, thus allowing anticipation of problems.

Extension

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

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

A software is extensible when it has mechanisms for new components, or extensions, to add functionalities that are not foreseen or required by the main 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) /SO (Linux), which are executable libraries that can be dynamically loaded.
  • Code classes or files that are automatically detected by the system and can, for example, add menus or components to the main system.
  • Hooks / Webhooks / Observer Pattern, which are mechanisms where any application can register in the target application to receive notifications of events and perform various actions.

Anyway, in general, there will be some kind of API with extension points that make it possible to contribute components and perform something logical in certain events of the system.

Some extension types may be plugged 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 various 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 seen as a component.
  • For a module, certain classes may function as components.
  • For an application that accepts plugins, each plugin is seen as an extension.
  • A plugin, which works as an extension, can be composed of several subcomponents.

Anyway, the term is quite overloaded and most of the time, the understanding that part of software is a component or an extension depends on the context and the point of view you are dealing with.

1

In short, a component adds more functionality to something already existing.

An extension adds new functionalities that do not exist or even exist already, such functionalities are like an independent entity. Usually called Libraries (libraries).

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

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

In the ASP language (classical Asp), for example, there is no native resource for sending email. For this there are components such as CDONT. But why is it treated as a component and not with an extension since the CDONT adds a function independently? CDONT should be treated as an extension. The same for file uploads. Due to the lack of native resource, there are components such as "DUNDAS Upload".

But if we analyze it well, the term "extension" can be interpreted as an extension of functionalities, which gives in the same context of "component".

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.