<s>
The	O
Cocoa	B-Application
text	I-Application
system	I-Application
(	O
formerly	O
known	O
simply	O
by	O
the	O
primary	O
class	O
name	O
NSText	B-Application
)	O
is	O
the	O
linked	O
network	O
of	O
classes	O
,	O
protocols	O
,	O
interfaces	B-Application
and	O
objects	O
that	O
provide	O
typography	B-Application
and	O
text	O
field	O
editing	O
capabilities	O
and	O
to	O
Cocoa	B-Operating_System
applications	O
on	O
Apple	O
's	O
macOS	B-Application
,	O
where	O
it	O
is	O
the	O
primary	O
text-handling	O
system	O
.	O
</s>
<s>
Although	O
"	O
extremely	O
complex	O
"	O
,	O
the	O
standard	O
text-handling	O
abilities	O
of	O
the	O
Cocoa	B-Application
text	I-Application
system	I-Application
have	O
been	O
widely	O
praised	O
as	O
without	O
peer	O
.	O
</s>
<s>
Formerly	O
embodied	O
in	O
developer	O
NeXT	O
Inc.	O
'	O
s	O
OpenStep	B-Operating_System
API	B-General_Concept
specification	O
,	O
and	O
implemented	O
in	O
NeXT	O
's	O
OPENSTEP	B-Operating_System
operating	O
system	O
,	O
and	O
probably	O
also	O
in	O
the	O
earlier	O
NeXTSTEP	B-Application
platform	O
,	O
Cocoa	B-Operating_System
's	O
NSText	B-Application
has	O
additionally	O
been	O
implemented	O
via	O
the	O
OpenStep	B-Operating_System
API	B-General_Concept
specification	O
successfully	O
in	O
third-party	O
implementations	O
such	O
as	O
the	O
free-and-open-source	B-License
GNUstep	B-Application
.	O
</s>
<s>
The	O
Cocoa	B-Application
text	I-Application
system	I-Application
uses	O
a	O
Model	O
–	O
View	O
–	O
Controller	O
design	O
pattern	O
.	O
</s>
<s>
The	O
view	O
layer	O
is	O
handled	O
by	O
NSTextView	O
and	O
NSTextField	O
,	O
NSLayoutManager	O
and	O
NSTextContainer	O
are	O
the	O
controller	O
layer	O
,	O
and	O
NSTextStorage	O
(	O
a	O
mutable	B-Application
attributed	O
string	O
subclass	O
)	O
is	O
the	O
model	O
.	O
</s>
<s>
The	O
Cocoa	B-Application
text	I-Application
system	I-Application
also	O
interacts	O
with	O
Services	O
to	O
provide	O
standard	B-Operating_System
streams	I-Operating_System
functionality	O
in	O
a	O
GUI	O
environment	O
.	O
</s>
<s>
This	O
was	O
done	O
to	O
reduce	O
high	O
memory	O
requirements	O
that	O
would	O
arise	O
if	O
every	O
field	O
implemented	O
its	O
own	O
NSTextView	O
object	B-Application
graph	I-Application
when	O
only	O
one	O
field	O
can	O
actually	O
have	O
focus	B-Application
at	O
any	O
time	O
.	O
</s>
<s>
Cocoa	B-Operating_System
adopts	O
many	O
Emacs	B-Application
keybindings	O
familiar	O
to	O
programmers	O
.	O
</s>
