Here's an intriguing job interview question — Can you describe the difference between a component and a module?
If you're the prospective candidate you may begin squirming in your seat when you hear this asked. And if you're the hiring manager, you may begin wondering why such an entry-level question has sparked so much consternation.
Yes, we can agree that it's just semantics. But if you search for "modules versus components" you'll discover that none of the top answers can quite agree on what's what. Here's how the confusion begins:
"A module is larger than a component. A component is relatively small in scope." 
"Modules deal with static code and compile-time dependencies, whereas components deal with instances and execution-time dependencies." 
And then there's this less-than-helpful definition that sounds suspiciously recursive: "Modules are added so that each of the functionalities can be easily identified. This is known as component-based software. In this, there are different components of software and each of the components represents a modular . . . part of a system."  WTF !?
Maybe the confusion stems from the fact that each computer language has its own particular terminology.
- The popular PHP framework, Joomla, says: "A component always displays its results in the main body area of a template. On the other hand, modules are normally the other bits around the main content." 
- For the Java community a module is code that is distributed in a JAR, while a component is "the fundamental user interface object in Java; everything you see on the display in a Java application is a component." 
- For the Python community modules are a layer of abstraction for "separating code into parts holding related data and functionality". 
And when we finally wrap our heads around the module mess, we're still left with a variety of definitions for "component", , which is where the confusion begins to get opinionated.
- A Vue developer will read the docs and find that "components are reusable instances with a name — they accept the same options as a root instance, such as data and life-cycle hooks." 
- A Svelt developer will discover that "components are the building blocks of applications; they are written using a superset of HTML with script, style, and markup all in one file." 
- Finally, an Angular developer will encounter a similar definition for "component", but will be dismayed to learn that the word "module" has a divergent meaning: "modules are containers for a cohesive block of code dedicated to an application domain. They can contain components, which are a set of directives, associated with a template." 
Anyone who says that they all amount to the same thing might be right. Or would they?
The Component Model
Way back in 2011, the Web Hypertext Application Technology Working Group (WHATWG) defined the Component Model to complement its work on the all-important Document Object Model (DOM).
To quote from the WHATWG wiki: "The Component Model introduces comprehensive support for creating DOM elements." And it goes on to explain that "the Component Model formalizes the concept of loosely coupled, coherent units of behavior in the Web platform." 
This was at a time in history when you could explain it this way — to the delight of everyone: "Examples include layout managers, combinations of Dojo and jQuery widgets, isolated widgets, such as Like/+1 buttons, and built-in HTML elements themselves."
It took a full decade to bring this comprehensiveness to fruition, but today all of the major browsers have native support for the model's four pillars:
- HTML Custom Elements
- W3C Shadow DOM
- HTML <template> and <slot> elements
- ES Modules using export/ import
It seems that all of this semantic confusion points to a failure in marketing. Who's ever heard of the Component Model? Yes, we've all heard of "web component", but we fail to recognize that as something distinct from the unadorned word "component".
In the end, considering all the confusion, perhaps we can forgive our hapless interviewee who was put on the spot when asked about modules and components.