What are modules in programming?

Asked

Viewed 4,065 times

9

I know there’s this question: What are modules?
But the explanation does not go straight to the point and left me confused, as well as properties, methods, arguments and other words I have seen enough use of the word modules.

I’d really like to know the definition of the word modules, a very simple explanation. So how to say that métodos são funções de classes associadas a um objeto, etc... with a small example.

  • 1

    I don’t think this applies to a specific language, my suggestion is to exchange the current tags for software engineering and terminology, clearly if it doesn’t change the meaning of the question.

2 answers

9

Module is a Generic term to define a unit code or artifact with a specific purpose, the basic idea is to join certain elements by some criterion ex cohesion. Once grouped these elements can be distributed and easily integrated into other systems, examples are dlls, jars and even plugins. In other words modules are subsystems that can be aggregated to other systems.

A class can be 'module' in the sense that its responsibility is to solve a well-defined problem. A namespace or package would be an example of a set of classes or functions (technology-dependent) that combined solve certain tasks.

9


There is no single definition. Each context, each technology can define it in a different way. So the dictionary definition can help more than a specific definition. It can be seen in Priberam or Michaelis, then it would be something measured in a small and harmonious way?

There are modules that do not have these names. And there are things called modules that may not go through a rigorous inspection of the term.

Note that there is not even a definition of the size of this module. It can have a very specific responsibility or have a much more general responsibility. Although it is certain that it does not correspond to the whole, it is a part of the whole.

Anyway, there is not a good canonical definition of what this is. You have to analyze the context to better define what is being said.

Modular programming

There is the modular programming (see more) which proposes to create applications divided into small parts. What are these parts is not well defined. A module in this context can be a method, can be a class, can be a source file, can be an executable, can be a package, whatever this means in each situation, can be some other grouping of other smaller parts yet.

Static classes

In fact it has a language that calls a module a class that only has static members.

Grouping of types and other constructions

It has language that groups several types (represented by classes, for example) within it. In some this resembles a namepace, others to a compilation unit, usually even mixing the two concepts.

PHP

In PHP the term is used for things other than programming itself.

Off-schedule

I didn’t even come close to talking about the modules used in something in the developer’s professional cycle but it’s not related to the programming itself.

Mathematics

So little spoke of the module which is the operation of obtaining the rest of an entire division. I think that is not the purpose of the question.

  • What is an ERP module (modular Erps)? Is it a set of features that can be added to the system conditionally? How would this be implemented? If it is broad I ask new question, I am curious to know about the implementation.

  • Each one can give i name you want, in general there is no definition of engineering for this, it is nomenclature that serves a little as marketing (not in the sense of advertising, but to give a limit to one thing or another, and who knows how to charge based on it). In general the staff has the financial module, or accounts receivable, pay, banks and cash flow, among others separate, has the inventory control, which can have the costs together or not, the tax books, purchases, but which could be a module of Supply Chain (although some consider something separate from ERP), PCP, etc.

  • And these modules, whose use can be charged separately, are usually made available in what way? It’s a lot of ifs in the code? Then the code checks next to a server if it is enabled to be used?

  • No, it’s usually different executables, but there are different cases, it can be much more conceptual. In general it is common for you to be required to buy a module if you need a small detail of it. This is an area that is more zoned than much that we see.

Browser other questions tagged

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