<s>
Modular	B-Architecture
programming	I-Architecture
is	O
a	O
software	O
design	O
technique	O
that	O
emphasizes	O
separating	O
the	O
functionality	O
of	O
a	O
program	B-Application
into	O
independent	O
,	O
interchangeable	O
modules	B-Language
,	O
such	O
that	O
each	O
contains	O
everything	O
necessary	O
to	O
execute	O
only	O
one	O
aspect	O
of	O
the	O
desired	O
functionality	O
.	O
</s>
<s>
A	O
module	B-Architecture
interface	B-Application
expresses	O
the	O
elements	O
that	O
are	O
provided	O
and	O
required	O
by	O
the	O
module	B-Architecture
.	O
</s>
<s>
The	O
elements	O
defined	O
in	O
the	O
interface	B-Application
are	O
detectable	O
by	O
other	O
modules	B-Language
.	O
</s>
<s>
The	O
implementation	O
contains	O
the	O
working	O
code	O
that	O
corresponds	O
to	O
the	O
elements	O
declared	O
in	O
the	O
interface	B-Application
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
is	O
closely	O
related	O
to	O
structured	B-Language
programming	I-Language
and	O
object-oriented	B-Language
programming	I-Language
,	O
all	O
having	O
the	O
same	O
goal	O
of	O
facilitating	O
construction	O
of	O
large	O
software	B-Application
programs	I-Application
and	O
systems	O
by	O
decomposition	O
into	O
smaller	O
pieces	O
,	O
and	O
all	O
originating	O
around	O
the	O
1960s	O
.	O
</s>
<s>
While	O
the	O
historical	O
usage	O
of	O
these	O
terms	O
has	O
been	O
inconsistent	O
,	O
"	O
modular	B-Architecture
programming	I-Architecture
"	O
now	O
refers	O
to	O
the	O
high-level	O
decomposition	O
of	O
the	O
code	O
of	O
an	O
entire	O
program	B-Application
into	O
pieces	O
:	O
structured	B-Language
programming	I-Language
to	O
the	O
low-level	O
code	O
use	O
of	O
structured	O
control	O
flow	O
,	O
and	O
object-oriented	B-Language
programming	I-Language
to	O
the	O
data	O
use	O
of	O
objects	O
,	O
a	O
kind	O
of	O
data	B-General_Concept
structure	I-General_Concept
.	O
</s>
<s>
In	O
object-oriented	B-Language
programming	I-Language
,	O
the	O
use	O
of	O
interfaces	B-Application
as	O
an	O
architectural	O
pattern	O
to	O
construct	O
modules	B-Language
is	O
known	O
as	O
interface-based	O
programming	O
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
,	O
in	O
the	O
form	O
of	O
subsystems	O
(	O
particularly	O
for	O
I/O	O
)	O
and	O
software	B-Library
libraries	I-Library
,	O
dates	O
to	O
early	O
software	O
systems	O
,	O
where	O
it	O
was	O
used	O
for	O
code	O
reuse	O
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
per	O
se	O
,	O
with	O
a	O
goal	O
of	O
modularity	B-Architecture
,	O
developed	O
in	O
the	O
late	O
1960s	O
and	O
1970s	O
,	O
as	O
a	O
larger-scale	O
analog	O
of	O
the	O
concept	O
of	O
structured	B-Language
programming	I-Language
(	O
1960s	O
)	O
.	O
</s>
<s>
The	O
term	O
"	O
modular	B-Architecture
programming	I-Architecture
"	O
dates	O
at	O
least	O
to	O
the	O
National	O
Symposium	O
on	O
Modular	B-Architecture
Programming	I-Architecture
,	O
organized	O
at	O
the	O
Information	O
and	O
Systems	O
Institute	O
in	O
July	O
1968	O
by	O
Larry	O
Constantine	O
;	O
other	O
key	O
concepts	O
were	O
information	B-Application
hiding	I-Application
(	O
1972	O
)	O
and	O
separation	O
of	O
concerns	O
(	O
SoC	O
,	O
1974	O
)	O
.	O
</s>
<s>
Modules	B-Language
were	O
not	O
included	O
in	O
the	O
original	O
specification	O
for	O
ALGOL	B-Language
68	I-Language
(	O
1968	O
)	O
,	O
but	O
were	O
included	O
as	O
extensions	O
in	O
early	O
implementations	O
,	O
ALGOL	B-General_Concept
68-R	I-General_Concept
(	O
1970	O
)	O
and	O
ALGOL	B-General_Concept
68C	I-General_Concept
(	O
1970	O
)	O
,	O
and	O
later	O
formalized	O
.	O
</s>
<s>
One	O
of	O
the	O
first	O
languages	O
designed	O
from	O
the	O
start	O
for	O
modular	B-Architecture
programming	I-Architecture
was	O
the	O
short-lived	O
Modula	B-Language
(	O
1975	O
)	O
,	O
by	O
Niklaus	O
Wirth	O
.	O
</s>
<s>
Another	O
early	O
modular	B-Architecture
language	O
was	O
Mesa	B-Language
(	O
1970s	O
)	O
,	O
by	O
Xerox	O
PARC	O
,	O
and	O
Wirth	O
drew	O
on	O
Mesa	B-Language
as	O
well	O
as	O
the	O
original	O
Modula	B-Language
in	O
its	O
successor	O
,	O
Modula-2	B-Language
(	O
1978	O
)	O
,	O
which	O
influenced	O
later	O
languages	O
,	O
particularly	O
through	O
its	O
successor	O
,	O
Modula-3	B-Language
(	O
1980s	O
)	O
.	O
</s>
<s>
Modula	B-Language
's	O
use	O
of	O
dot-qualified	O
names	O
,	O
like	O
M.a	O
to	O
refer	O
to	O
object	O
a	O
from	O
module	B-Architecture
M	O
,	O
coincides	O
with	O
notation	O
to	O
access	O
a	O
field	O
of	O
a	O
record	O
(	O
and	O
similarly	O
for	O
attributes	O
or	O
methods	O
of	O
objects	O
)	O
,	O
and	O
is	O
now	O
widespread	O
,	O
seen	O
in	O
C#	B-Application
,	O
Dart	B-Language
,	O
Go	B-Application
,	O
Java	B-Language
,	O
OCaml	B-Language
,	O
and	O
Python	B-Language
,	O
among	O
others	O
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
became	O
widespread	O
from	O
the	O
1980s	O
:	O
the	O
original	O
Pascal	B-Application
language	I-Application
(	O
1970	O
)	O
did	O
not	O
include	O
modules	B-Language
,	O
but	O
later	O
versions	O
,	O
notably	O
UCSD	B-Language
Pascal	I-Language
(	O
1978	O
)	O
and	O
Turbo	B-Application
Pascal	I-Application
(	O
1983	O
)	O
included	O
them	O
in	O
the	O
form	O
of	O
"	O
units	O
"	O
,	O
as	O
did	O
the	O
Pascal-influenced	O
Ada	B-Language
(	O
1980	O
)	O
.	O
</s>
<s>
The	O
Extended	O
Pascal	B-Application
ISO	O
10206:1990	O
standard	O
kept	O
closer	O
to	O
Modula2	B-Language
in	O
its	O
modular	B-Architecture
support	O
.	O
</s>
<s>
Standard	B-Language
ML	I-Language
(	O
1984	O
)	O
has	O
one	O
of	O
the	O
most	O
complete	O
module	B-Architecture
systems	I-Architecture
,	O
including	O
functors	O
(	O
parameterized	O
modules	B-Language
)	O
to	O
map	O
between	O
modules	B-Language
.	O
</s>
<s>
In	O
the	O
1980s	O
and	O
1990s	O
,	O
modular	B-Architecture
programming	I-Architecture
was	O
overshadowed	O
by	O
and	O
often	O
conflated	O
with	O
object-oriented	B-Language
programming	I-Language
,	O
particularly	O
due	O
to	O
the	O
popularity	O
of	O
C++	B-Language
and	O
Java	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
the	O
C	B-Language
family	O
of	O
languages	O
had	O
support	O
for	O
objects	O
and	O
classes	O
in	O
C++	B-Language
(	O
originally	O
C	B-Language
with	O
Classes	O
,	O
1980	O
)	O
and	O
Objective-C	B-Language
(	O
1983	O
)	O
,	O
only	O
supporting	O
modules	B-Language
30	O
years	O
or	O
more	O
later	O
.	O
</s>
<s>
Java	B-Language
(	O
1995	O
)	O
supports	O
modules	B-Language
in	O
the	O
form	O
of	O
packages	O
,	O
though	O
the	O
primary	O
unit	O
of	O
code	O
organization	O
is	O
a	O
class	O
.	O
</s>
<s>
However	O
,	O
Python	B-Language
(	O
1991	O
)	O
prominently	O
used	O
both	O
modules	B-Language
and	O
objects	O
from	O
the	O
start	O
,	O
using	O
modules	B-Language
as	O
the	O
primary	O
unit	O
of	O
code	O
organization	O
and	O
"	O
packages	O
"	O
as	O
a	O
larger-scale	O
unit	O
;	O
and	O
Perl	B-Language
5	O
(	O
1994	O
)	O
includes	O
support	O
for	O
both	O
modules	B-Language
and	O
objects	O
,	O
with	O
a	O
vast	O
array	O
of	O
modules	B-Language
being	O
available	O
from	O
CPAN	B-Language
(	O
1993	O
)	O
.	O
</s>
<s>
OCaml	B-Language
(	O
1996	O
)	O
followed	O
ML	B-Language
by	O
supporting	O
modules	B-Language
and	O
functors	O
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
is	O
now	O
widespread	O
,	O
and	O
found	O
in	O
virtually	O
all	O
major	O
languages	O
developed	O
since	O
the	O
1990s	O
.	O
</s>
<s>
The	O
relative	O
importance	O
of	O
modules	B-Language
varies	O
between	O
languages	O
,	O
and	O
in	O
class-based	O
object-oriented	B-Language
languages	I-Language
there	O
is	O
still	O
overlap	O
and	O
confusion	O
with	O
classes	O
as	O
a	O
unit	O
of	O
organization	O
and	O
encapsulation	O
,	O
but	O
these	O
are	O
both	O
well-established	O
as	O
distinct	O
concepts	O
.	O
</s>
<s>
The	O
term	O
assembly	O
(	O
as	O
in	O
.NET	B-Application
languages	I-Application
like	O
C#	B-Application
,	O
F#	B-Operating_System
or	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
)	O
or	O
package	B-Application
(	O
as	O
in	O
Dart	B-Language
,	O
Go	B-Application
or	O
Java	B-Language
)	O
is	O
sometimes	O
used	O
instead	O
of	O
module	B-Architecture
.	O
</s>
<s>
In	O
other	O
implementations	O
,	O
these	O
are	O
distinct	O
concepts	O
;	O
in	O
Python	B-Language
a	O
package	B-Application
is	O
a	O
collection	O
of	O
modules	B-Language
,	O
while	O
in	O
Java	B-Language
9	O
the	O
introduction	O
of	O
the	O
new	B-Language
module	I-Language
concept	I-Language
(	O
a	O
collection	O
of	O
packages	O
with	O
enhanced	O
access	O
control	O
)	O
was	O
implemented	O
.	O
</s>
<s>
Furthermore	O
,	O
the	O
term	O
"	O
package	B-Application
"	O
has	O
other	O
uses	O
in	O
software	O
(	O
for	O
example	O
.NET	B-Application
NuGet	I-Application
packages	I-Application
)	O
.	O
</s>
<s>
A	O
component	O
is	O
a	O
similar	O
concept	O
,	O
but	O
typically	O
refers	O
to	O
a	O
higher	O
level	O
;	O
a	O
component	O
is	O
a	O
piece	O
of	O
a	O
whole	O
system	O
,	O
while	O
a	O
module	B-Architecture
is	O
a	O
piece	O
of	O
an	O
individual	O
program	B-Application
.	O
</s>
<s>
The	O
scale	O
of	O
the	O
term	O
"	O
module	B-Architecture
"	O
varies	O
significantly	O
between	O
languages	O
;	O
in	O
Python	B-Language
it	O
is	O
very	O
small-scale	O
and	O
each	O
file	O
is	O
a	O
module	B-Architecture
,	O
while	O
in	O
Java	B-Language
9	O
it	O
is	O
planned	O
to	O
be	O
large-scale	O
,	O
where	O
a	O
module	B-Architecture
is	O
a	O
collection	O
of	O
packages	O
,	O
which	O
are	O
in	O
turn	O
collections	O
of	O
files	O
.	O
</s>
<s>
Other	O
terms	O
for	O
modules	B-Language
include	O
unit	O
,	O
used	O
in	O
Pascal	B-Application
dialects	O
.	O
</s>
<s>
Languages	O
that	O
formally	O
support	O
the	O
module	B-Architecture
concept	O
include	O
Ada	B-Language
,	O
Algol	B-Language
,	O
BlitzMax	B-Language
,	O
C++	B-Language
,	O
C#	B-Application
,	O
Clojure	B-Language
,	O
COBOL	B-Application
,	O
Common_Lisp	O
,	O
D	B-Application
,	O
Dart	B-Language
,	O
eC	B-Language
,	O
Erlang	B-Operating_System
,	O
Elixir	B-Language
,	O
Elm	B-Language
,	O
F	B-Language
,	O
F#	B-Operating_System
,	O
Fortran	B-Application
,	O
Go	B-Application
,	O
Haskell	B-Language
,	O
IBM/360	B-Application
Assembler	O
,	O
Control	B-Operating_System
Language	I-Operating_System
(	O
CL	B-Operating_System
)	O
,	O
IBM	B-Language
RPG	I-Language
,	O
Java	B-Language
,	O
Julia	B-Application
,	O
MATLAB	B-Language
,	O
ML	B-Language
,	O
Modula	B-Language
,	O
Modula-2	B-Language
,	O
Modula-3	B-Language
,	O
Morpho	O
,	O
NEWP	B-Language
,	O
Oberon	B-Language
,	O
Oberon-2	B-Language
,	O
Objective-C	B-Language
,	O
OCaml	B-Language
,	O
several	O
derivatives	O
of	O
Pascal	B-Application
(	O
Component	B-Language
Pascal	I-Language
,	O
Object	B-Language
Pascal	I-Language
,	O
Turbo	B-Application
Pascal	I-Application
,	O
UCSD	B-Language
Pascal	I-Language
)	O
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
PL/I	B-Language
,	O
PureBasic	B-Application
,	O
Python	B-Language
,	O
R	B-Language
,	O
Ruby	B-Language
,	O
Rust	B-Application
,	O
JavaScript	B-Language
,	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
and	O
WebDNA	B-Language
.	O
</s>
<s>
Conspicuous	O
examples	O
of	O
languages	O
that	O
lack	O
support	O
for	O
modules	B-Language
are	O
C	B-Language
and	O
have	O
been	O
C++	B-Language
and	O
Pascal	B-Application
in	O
their	O
original	O
form	O
,	O
C	B-Language
and	O
C++	B-Language
do	O
,	O
however	O
,	O
allow	O
separate	O
compilation	B-Language
and	O
declarative	O
interfaces	B-Application
to	O
be	O
specified	O
using	O
header	B-Language
files	I-Language
.	O
</s>
<s>
Modules	B-Language
were	O
added	O
to	O
Objective-C	B-Language
in	O
iOS	B-Operating_System
7	I-Operating_System
(	O
2013	O
)	O
;	O
to	O
C++	B-Language
with	O
C++20	B-Language
,	O
and	O
Pascal	B-Application
was	O
superseded	O
by	O
Modula	B-Language
and	O
Oberon	B-Language
,	O
which	O
included	O
modules	B-Language
from	O
the	O
start	O
,	O
and	O
various	O
derivatives	O
that	O
included	O
modules	B-Language
.	O
</s>
<s>
JavaScript	B-Language
has	O
had	O
native	O
modules	B-Language
since	O
ECMAScript	B-Language
2015	O
.	O
</s>
<s>
Modular	B-Architecture
programming	I-Architecture
can	O
be	O
performed	O
even	O
where	O
the	O
programming	O
language	O
lacks	O
explicit	O
syntactic	O
features	O
to	O
support	O
named	O
modules	B-Language
,	O
like	O
,	O
for	O
example	O
,	O
in	O
C	B-Language
.	O
This	O
is	O
done	O
by	O
using	O
existing	O
language	O
features	O
,	O
together	O
with	O
,	O
for	O
example	O
,	O
coding	O
conventions	O
,	O
programming	O
idioms	O
and	O
the	O
physical	O
code	O
structure	O
.	O
</s>
<s>
IBM	B-Application
i	I-Application
also	O
uses	O
modules	B-Language
when	O
programming	O
in	O
the	O
Integrated	B-General_Concept
Language	I-General_Concept
Environment	I-General_Concept
(	O
ILE	O
)	O
.	O
</s>
<s>
With	O
modular	B-Architecture
programming	I-Architecture
,	O
concerns	O
are	O
separated	O
such	O
that	O
modules	B-Language
perform	O
logically	O
discrete	O
functions	O
,	O
interacting	O
through	O
well-defined	O
interfaces	B-Application
.	O
</s>
<s>
Often	O
modules	B-Language
form	O
a	O
directed	O
acyclic	O
graph	O
(	O
DAG	O
)	O
;	O
in	O
this	O
case	O
a	O
cyclic	O
dependency	B-Application
between	O
modules	B-Language
is	O
seen	O
as	O
indicating	O
that	O
these	O
should	O
be	O
a	O
single	O
module	B-Architecture
.	O
</s>
<s>
In	O
the	O
case	O
where	O
modules	B-Language
do	O
form	O
a	O
DAG	O
they	O
can	O
be	O
arranged	O
as	O
a	O
hierarchy	O
,	O
where	O
the	O
lowest-level	O
modules	B-Language
are	O
independent	O
,	O
depending	O
on	O
no	O
other	O
modules	B-Language
,	O
and	O
higher-level	O
modules	B-Language
depend	O
on	O
lower-level	O
ones	O
.	O
</s>
<s>
A	O
particular	O
program	B-Application
or	O
library	O
is	O
a	O
top-level	O
module	B-Architecture
of	O
its	O
own	O
hierarchy	O
,	O
but	O
can	O
in	O
turn	O
be	O
seen	O
as	O
a	O
lower-level	O
module	B-Architecture
of	O
a	O
higher-level	O
program	B-Application
,	O
library	O
,	O
or	O
system	O
.	O
</s>
<s>
When	O
creating	O
a	O
modular	B-Architecture
system	O
,	O
instead	O
of	O
creating	O
a	O
monolithic	O
application	O
(	O
where	O
the	O
smallest	O
component	O
is	O
the	O
whole	O
)	O
,	O
several	O
smaller	O
modules	B-Language
are	O
written	O
separately	O
so	O
when	O
they	O
are	O
composed	O
together	O
,	O
they	O
construct	O
the	O
executable	O
application	O
program	B-Application
.	O
</s>
<s>
Typically	O
,	O
these	O
are	O
also	O
compiled	B-Language
separately	O
,	O
via	O
separate	O
compilation	B-Language
,	O
and	O
then	O
linked	O
by	O
a	O
linker	B-Application
.	O
</s>
<s>
A	O
just-in-time	O
compiler	B-Language
may	O
perform	O
some	O
of	O
this	O
construction	O
"	O
on-the-fly	O
"	O
at	O
run	B-Library
time	I-Library
.	O
</s>
<s>
These	O
independent	O
functions	O
are	O
commonly	O
classified	O
as	O
either	O
program	B-Application
control	O
functions	O
or	O
specific	O
task	O
functions	O
.	O
</s>
<s>
Program	B-Application
control	O
functions	O
are	O
designed	O
to	O
work	O
for	O
one	O
program	B-Application
.	O
</s>
<s>
This	O
makes	O
modular	B-Architecture
designed	O
systems	O
,	O
if	O
built	O
correctly	O
,	O
far	O
more	O
reusable	O
than	O
a	O
traditional	O
monolithic	O
design	O
,	O
since	O
all	O
(	O
or	O
many	O
)	O
of	O
these	O
modules	B-Language
may	O
then	O
be	O
reused	O
(	O
without	O
change	O
)	O
in	O
other	O
projects	O
.	O
</s>
