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.
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, theWordCount()
was applied directly to the variable (probably of the string type).– rray
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.
– utluiz
Has, What is the difference of API, library and Framework? which strikes the beam.
– rray
@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.
– Renan Cavalieri
@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
@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.
– Renan Cavalieri