<s>
Convention	B-Application
over	I-Application
configuration	I-Application
(	O
also	O
known	O
as	O
coding	B-Application
by	I-Application
convention	I-Application
)	O
is	O
a	O
software	O
design	O
paradigm	O
used	O
by	O
software	B-Architecture
frameworks	I-Architecture
that	O
attempts	O
to	O
decrease	O
the	O
number	O
of	O
decisions	O
that	O
a	O
developer	B-Application
using	O
the	O
framework	O
is	O
required	O
to	O
make	O
without	O
necessarily	O
losing	O
flexibility	O
and	O
do	O
n't	O
repeat	O
yourself	O
(	O
DRY	O
)	O
principles	O
.	O
</s>
<s>
The	O
concept	O
was	O
introduced	O
by	O
David	O
Heinemeier	O
Hansson	O
to	O
describe	O
the	O
philosophy	O
of	O
the	O
Ruby	B-Application
on	I-Application
Rails	I-Application
web	B-Application
framework	I-Application
,	O
but	O
is	O
related	O
to	O
earlier	O
ideas	O
like	O
the	O
concept	O
of	O
"	O
sensible	O
defaults	O
"	O
and	O
the	O
principle	O
of	O
least	O
astonishment	O
in	O
user	O
interface	O
design	O
.	O
</s>
<s>
The	O
phrase	O
essentially	O
means	O
a	O
developer	B-Application
only	O
needs	O
to	O
specify	O
unconventional	O
aspects	O
of	O
the	O
application	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
there	O
is	O
a	O
class	O
Sales	O
in	O
the	O
model	O
,	O
the	O
corresponding	O
table	B-Application
in	O
the	O
database	O
is	O
called	O
"	O
sales	O
"	O
by	O
default	B-General_Concept
.	O
</s>
<s>
It	O
is	O
only	O
if	O
one	O
deviates	O
from	O
this	O
convention	O
,	O
such	O
as	O
the	O
table	B-Application
"	O
product	O
sales	O
"	O
,	O
that	O
one	O
needs	O
to	O
write	O
code	O
regarding	O
these	O
names	O
.	O
</s>
<s>
Ruby	B-Application
on	I-Application
Rails	I-Application
 '	O
use	O
of	O
the	O
phrase	O
is	O
particularly	O
focused	O
on	O
its	O
default	B-General_Concept
project	O
file	O
and	O
directory	O
structure	O
,	O
which	O
prevent	O
developers	B-Application
from	O
having	O
to	O
write	O
XML	B-Protocol
configuration	O
files	O
to	O
specify	O
which	O
modules	B-Architecture
the	O
framework	O
should	O
load	O
,	O
which	O
was	O
common	O
in	O
many	O
earlier	O
frameworks	O
.	O
</s>
<s>
Disadvantages	O
of	O
the	O
convention	B-Application
over	I-Application
configuration	I-Application
approach	O
can	O
occur	O
due	O
to	O
conflicts	O
with	O
other	O
software	O
design	O
principles	O
,	O
like	O
the	O
Zen	O
of	O
Python	O
's	O
"	O
explicit	O
is	O
better	O
than	O
implicit.	O
"	O
</s>
<s>
A	O
software	B-Architecture
framework	I-Architecture
based	O
on	O
convention	B-Application
over	I-Application
configuration	I-Application
often	O
involves	O
a	O
domain-specific	B-Language
language	I-Language
with	O
a	O
limited	O
set	O
of	O
constructs	O
or	O
an	O
inversion	B-Language
of	I-Language
control	I-Language
in	O
which	O
the	O
developer	B-Application
can	O
only	O
affect	O
behavior	O
using	O
a	O
limited	O
set	O
of	O
hooks	O
,	O
both	O
of	O
which	O
can	O
make	O
implementing	O
behaviors	O
not	O
easily	O
expressed	O
by	O
the	O
provided	O
conventions	O
more	O
difficult	O
than	O
when	O
using	O
a	O
software	B-Library
library	I-Library
that	O
does	O
not	O
try	O
to	O
decrease	O
the	O
number	O
of	O
decisions	O
developers	B-Application
have	O
to	O
make	O
or	O
require	O
inversion	B-Language
of	I-Language
control	I-Language
.	O
</s>
<s>
Other	O
methods	O
of	O
decreasing	O
the	O
number	O
of	O
decisions	O
a	O
developer	B-Application
needs	O
to	O
make	O
include	O
programming	O
idioms	O
and	O
configuration	O
libraries	O
with	O
a	O
multilayered	B-Operating_System
architecture	I-Operating_System
.	O
</s>
<s>
These	O
provide	O
information	O
specific	O
to	O
each	O
project	O
,	O
ranging	O
from	O
URLs	O
to	O
mappings	O
between	O
classes	O
and	O
database	B-Application
tables	I-Application
.	O
</s>
<s>
For	O
example	O
,	O
early	O
versions	O
of	O
the	O
Java	B-Language
persistence	O
mapper	O
Hibernate	B-Library
mapped	O
entities	O
and	O
their	O
fields	O
to	O
the	O
database	O
by	O
describing	O
these	O
relationships	O
in	O
XML	B-Protocol
files	O
.	O
</s>
<s>
Most	O
of	O
this	O
information	O
could	O
have	O
been	O
revealed	O
by	O
conventionally	O
mapping	O
class	O
names	O
to	O
the	O
identically	O
named	O
database	B-Application
tables	I-Application
and	O
the	O
fields	O
to	O
their	O
columns	O
,	O
respectively	O
.	O
</s>
<s>
Later	O
versions	O
did	O
away	O
with	O
the	O
XML	B-Protocol
configuration	O
file	O
and	O
instead	O
employed	O
these	O
very	O
conventions	O
,	O
deviations	O
from	O
which	O
can	O
be	O
indicated	O
through	O
the	O
use	O
of	O
Java	B-Language
annotations	I-Language
(	O
see	O
JavaBeans	O
specification	O
,	O
linked	O
below	O
)	O
.	O
</s>
<s>
Many	O
modern	O
frameworks	O
use	O
a	O
convention	B-Application
over	I-Application
configuration	I-Application
approach	O
.	O
</s>
<s>
The	O
concept	O
is	O
older	O
,	O
however	O
,	O
dating	O
back	O
to	O
the	O
concept	O
of	O
a	O
default	B-General_Concept
,	O
and	O
can	O
be	O
spotted	O
more	O
recently	O
in	O
the	O
roots	O
of	O
Java	B-Language
libraries	O
.	O
</s>
<s>
To	O
quote	O
the	O
JavaBeans	O
specification	O
1.01	O
:	O
"	O
As	O
a	O
general	O
rule	O
we	O
do	O
n't	O
want	O
to	O
invent	O
an	O
enormous	O
java.beans.everything	O
class	O
that	O
people	O
have	O
to	O
inherit	O
from	O
.	O
</s>
<s>
Instead	O
we	O
'd	O
like	O
the	O
JavaBeans	O
runtimes	O
to	O
provide	O
default	B-General_Concept
behaviour	O
for	O
'	O
normal	O
 '	O
objects	O
,	O
but	O
to	O
allow	O
objects	O
to	O
override	O
a	O
given	O
piece	O
of	O
default	B-General_Concept
behaviour	O
by	O
inheriting	O
from	O
some	O
specific	O
java.beans.something	O
interface.	O
"	O
</s>
