<s>
In	O
software	B-General_Concept
engineering	I-General_Concept
,	O
a	O
plain	O
old	O
Java	B-Language
object	O
(	O
POJO	O
)	O
is	O
an	O
ordinary	O
Java	B-Language
object	O
,	O
not	O
bound	O
by	O
any	O
special	O
restriction	O
.	O
</s>
<s>
The	O
term	O
"	O
POJO	O
"	O
initially	O
denoted	O
a	O
Java	B-Language
object	O
which	O
does	O
not	O
follow	O
any	O
of	O
the	O
major	O
Java	B-Language
object	O
models	O
,	O
conventions	O
,	O
or	O
frameworks	O
;	O
nowadays	O
"	O
POJO	O
"	O
may	O
be	O
used	O
as	O
an	O
acronym	O
for	O
plain	O
old	O
JavaScript	B-Language
object	O
as	O
well	O
,	O
in	O
which	O
case	O
the	O
term	O
denotes	O
a	O
JavaScript	B-Language
object	O
of	O
similar	O
pedigree	O
.	O
</s>
<s>
The	O
term	O
continues	O
an	O
acronym	O
pattern	O
to	O
coin	O
retronyms	O
for	O
technologies	O
that	O
do	O
not	O
use	O
fancy	O
new	O
features	O
:	O
plain	O
old	O
Ruby	B-Language
object	O
(	O
PORO	O
)	O
in	O
Ruby	B-Language
,	O
plain	O
old	O
telephone	O
service	O
(	O
POTS	O
)	O
in	O
telephony	O
and	O
Plain	B-Language
Old	I-Language
Documentation	I-Language
(	O
pod	O
)	O
in	O
Perl	B-Language
.	O
</s>
<s>
The	O
equivalent	O
to	O
POJO	O
on	O
the	O
.NET	B-Application
Framework	I-Application
is	O
plain	B-Language
Old	I-Language
CLR	I-Language
object	I-Language
(	O
POCO	B-Language
)	O
.	O
</s>
<s>
For	O
PHP	B-Application
,	O
it	O
is	O
plain	O
old	O
PHP	B-Application
object	O
(	O
POPO	O
)	O
.	O
</s>
<s>
Ideally	O
speaking	O
,	O
a	O
POJO	O
is	O
a	O
Java	B-Language
object	O
not	O
bound	O
by	O
any	O
restriction	O
other	O
than	O
those	O
forced	O
by	O
the	O
Java	B-Language
Language	I-Language
Specification	I-Language
;	O
i.e.	O
</s>
<s>
However	O
,	O
due	O
to	O
technical	O
difficulties	O
and	O
other	O
reasons	O
,	O
many	O
software	O
products	O
or	O
frameworks	O
described	O
as	O
POJO-compliant	O
actually	O
still	O
require	O
the	O
use	O
of	O
prespecified	O
annotations	B-Language
for	O
features	O
such	O
as	O
persistence	O
to	O
work	O
properly	O
.	O
</s>
<s>
The	O
idea	O
is	O
that	O
if	O
the	O
object	O
(	O
actually	O
class	O
)	O
were	O
a	O
POJO	O
before	O
any	O
annotations	B-Language
were	O
added	O
,	O
and	O
would	O
return	O
to	O
POJO	O
status	O
if	O
the	O
annotations	B-Language
are	O
removed	O
then	O
it	O
can	O
still	O
be	O
considered	O
a	O
POJO	O
.	O
</s>
<s>
Then	O
the	O
basic	O
object	O
remains	O
a	O
POJO	O
in	O
that	O
it	O
has	O
no	O
special	O
characteristics	O
(	O
such	O
as	O
an	O
implemented	O
interface	O
)	O
that	O
makes	O
it	O
a	O
"	O
Specialized	O
Java	B-Language
Object	O
"	O
(	O
SJO	O
or	O
(	O
sic	O
)	O
SoJO	O
)	O
.	O
</s>
<s>
A	O
JavaBean	O
is	O
a	O
POJO	O
that	O
is	O
serializable	B-Application
,	O
has	O
a	O
no-argument	O
constructor	O
,	O
and	O
allows	O
access	O
to	O
properties	O
using	O
getter	O
and	O
setter	O
methods	O
that	O
follow	O
a	O
simple	O
naming	O
convention	O
.	O
</s>
<s>
The	O
JavaBeans	O
specification	O
,	O
if	O
fully	O
implemented	O
,	O
slightly	O
breaks	O
the	O
POJO	O
model	O
as	O
the	O
class	O
must	O
implement	O
the	O
Serializable	B-Application
interface	O
to	O
be	O
a	O
true	O
JavaBean	O
.	O
</s>
<s>
Since	O
Serializable	B-Application
is	O
a	O
marker	O
(	O
method-less	O
)	O
interface	O
,	O
this	O
is	O
not	O
much	O
of	O
a	O
burden	O
.	O
</s>
<s>
The	O
following	O
shows	O
an	O
example	O
of	O
a	O
JavaServer	B-Language
Faces	I-Language
(	O
JSF	O
)	O
component	O
having	O
a	O
bidirectional	O
binding	O
to	O
a	O
POJO	O
's	O
property	O
:	O
</s>
<s>
This	O
POJO	O
purely	O
focuses	O
on	O
business	B-Architecture
logic	I-Architecture
and	O
has	O
no	O
dependencies	O
on	O
(	O
enterprise	O
)	O
frameworks	O
.	O
</s>
<s>
Aspect-oriented	B-Architecture
programming	I-Architecture
(	O
AOP	O
)	O
frameworks	O
then	O
transparently	O
add	O
cross-cutting	O
concerns	O
like	O
persistence	O
,	O
transactions	O
,	O
security	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
Spring	B-Application
was	O
an	O
early	O
implementation	O
of	O
this	O
idea	O
and	O
one	O
of	O
the	O
driving	O
forces	O
behind	O
popularizing	O
this	O
model	O
.	O
</s>
<s>
An	O
example	O
of	O
an	O
EJB	B-Language
bean	O
being	O
a	O
POJO	O
:	O
</s>
<s>
Enterprise	B-Language
JavaBeans	I-Language
(	O
EJB	B-Language
)	O
,	O
</s>
<s>
The	O
following	O
shows	O
a	O
fully	O
functional	O
EJB	B-Language
bean	O
,	O
demonstrating	O
how	O
EJB3	O
leverages	O
the	O
POJO	O
model	O
:	O
</s>
<s>
As	O
given	O
,	O
the	O
bean	O
does	O
not	O
need	O
to	O
extend	O
any	O
EJB	B-Language
class	O
or	O
implement	O
any	O
EJB	B-Language
interface	O
and	O
also	O
does	O
not	O
need	O
to	O
contain	O
any	O
EJB	B-Language
annotations	B-Language
.	O
</s>
<s>
Instead	O
,	O
the	O
programmer	O
declares	O
in	O
an	O
external	O
XML	B-Protocol
file	O
which	O
EJB	B-Language
services	O
should	O
be	O
added	O
to	O
the	O
bean	O
:	O
</s>
<s>
In	O
practice	O
,	O
some	O
people	O
find	O
annotations	B-Language
elegant	O
,	O
while	O
they	O
see	O
XML	B-Protocol
as	O
verbose	O
,	O
ugly	O
and	O
hard	O
to	O
maintain	O
,	O
yet	O
others	O
find	O
annotations	B-Language
pollute	O
the	O
POJO	O
model	O
.	O
</s>
<s>
Thus	O
,	O
as	O
an	O
alternative	O
to	O
XML	B-Protocol
,	O
many	O
frameworks	O
(	O
e.g.	O
</s>
<s>
Spring	B-Application
,	O
EJB	B-Language
and	O
JPA	O
)	O
allow	O
annotations	B-Language
to	O
be	O
used	O
instead	O
of	O
or	O
in	O
addition	O
to	O
XML	B-Protocol
.	O
</s>
<s>
The	O
following	O
shows	O
the	O
same	O
EJB	B-Language
bean	O
as	O
shown	O
above	O
but	O
with	O
an	O
annotation	O
added	O
.	O
</s>
<s>
In	O
this	O
case	O
the	O
XML	B-Protocol
file	O
is	O
no	O
longer	O
needed	O
:	O
</s>
<s>
With	O
the	O
annotation	O
as	O
given	O
above	O
the	O
bean	O
is	O
n't	O
a	O
truly	O
pure	O
POJO	O
anymore	O
,	O
but	O
since	O
annotations	B-Language
are	O
merely	O
passive	O
metadata	O
this	O
has	O
far	O
fewer	O
harmful	O
drawbacks	O
compared	O
to	O
the	O
invasiveness	O
of	O
having	O
to	O
extend	O
classes	O
and/or	O
implement	O
interfaces	O
.	O
</s>
<s>
A	O
Plain	O
old	O
Java	B-Language
Interface	I-Language
(	O
POJI	B-Language
)	O
is	O
a	O
basic	O
form	O
of	O
Java	B-Language
interface	I-Language
and	O
acceptable	O
at	O
points	O
where	O
more	O
complex	O
Java	B-Language
interfaces	I-Language
are	O
not	O
permitted	O
.	O
</s>
