<s>
WCF	B-Device
Data	I-Device
Services	I-Device
(	O
formerly	O
ADO.NET	B-Device
Data	I-Device
Services	I-Device
,	O
codename	B-Device
"	I-Device
Astoria	I-Device
"	I-Device
)	O
is	O
a	O
platform	O
for	O
what	O
Microsoft	O
calls	O
Data	O
Services	O
.	O
</s>
<s>
It	O
also	O
includes	O
the	O
Data	O
Services	O
Toolkit	O
which	O
lets	O
Astoria	O
Data	O
Services	O
be	O
created	O
from	O
within	O
ASP.NET	B-Application
itself	O
.	O
</s>
<s>
The	O
first	O
CTP	O
was	O
made	O
available	O
as	O
a	O
part	O
of	O
the	O
ASP.NET	B-Application
3.5	O
Extensions	O
Preview	O
.	O
</s>
<s>
The	O
name	O
change	O
from	O
ADO.NET	B-Device
Data	I-Device
Services	I-Device
to	O
WCF	B-Device
data	I-Device
Services	I-Device
was	O
announced	O
at	O
the	O
2009	O
PDC	O
.	O
</s>
<s>
WCF	B-Device
Data	I-Device
Services	I-Device
exposes	O
data	O
,	O
represented	O
as	O
Entity	O
Data	O
Model	O
(	O
EDM	O
)	O
objects	O
,	O
via	O
web	O
services	O
accessed	O
over	O
HTTP	B-Protocol
.	I-Protocol
</s>
<s>
The	O
data	O
can	O
be	O
addressed	O
using	O
a	O
REST-like	O
URI	B-Protocol
.	O
</s>
<s>
The	O
data	O
service	O
,	O
when	O
accessed	O
via	O
the	O
HTTP	B-Protocol
GET	O
method	O
with	O
such	O
a	O
URI	B-Protocol
,	O
will	O
return	O
the	O
data	O
.	O
</s>
<s>
The	O
web	O
service	O
can	O
be	O
configured	O
to	O
return	O
the	O
data	O
in	O
either	O
plain	O
XML	B-Protocol
,	O
JSON	B-General_Concept
or	O
RDF+XML	O
.	O
</s>
<s>
In	O
the	O
initial	O
release	O
,	O
formats	O
like	O
RSS	O
and	O
ATOM	B-Language
are	O
not	O
supported	O
,	O
though	O
they	O
may	O
be	O
in	O
the	O
future	O
.	O
</s>
<s>
In	O
addition	O
,	O
using	O
other	O
HTTP	B-Protocol
methods	O
like	O
PUT	O
,	O
POST	O
or	O
DELETE	O
,	O
the	O
data	O
can	O
be	O
updated	O
as	O
well	O
.	O
</s>
<s>
Windows	B-Application
Communication	I-Application
Foundation	I-Application
(	O
WCF	B-Application
)	O
comes	O
to	O
the	O
rescue	O
when	O
we	O
find	O
ourselves	O
not	O
able	O
to	O
achieve	O
what	O
we	O
want	O
to	O
achieve	O
using	O
web	O
services	O
,	O
i.e.	O
,	O
other	O
protocols	O
support	O
and	O
even	O
duplex	O
communication	O
.	O
</s>
<s>
With	O
WCF	B-Application
,	O
we	O
can	O
define	O
our	O
service	O
once	O
and	O
then	O
configure	O
it	O
in	O
such	O
a	O
way	O
that	O
it	O
can	O
be	O
used	O
via	O
HTTP	B-Protocol
,	O
TCP	O
,	O
IPC	O
,	O
and	O
even	O
Message	O
Queues	O
.	O
</s>
<s>
We	O
can	O
consume	O
Web	O
Services	O
using	O
server	O
side	O
scripts	O
(	O
ASP.NET	B-Application
)	O
,	O
JavaScript	B-General_Concept
Object	I-General_Concept
Notations	I-General_Concept
(	O
JSON	B-General_Concept
)	O
,	O
and	O
even	O
REST	B-Protocol
(	O
Representational	B-Protocol
State	I-Protocol
Transfer	I-Protocol
)	O
.	O
</s>
<s>
When	O
we	O
say	O
that	O
a	O
WCF	B-Application
service	O
can	O
be	O
used	O
to	O
communicate	O
using	O
different	O
protocols	O
and	O
from	O
different	O
kinds	O
of	O
applications	O
,	O
we	O
will	O
need	O
to	O
understand	O
how	O
we	O
can	O
achieve	O
this	O
.	O
</s>
<s>
If	O
we	O
want	O
to	O
use	O
a	O
WCF	B-Application
service	O
from	O
an	O
application	O
,	O
then	O
we	O
have	O
three	O
major	O
questions	O
:	O
</s>
<s>
1.Where	O
is	O
the	O
WCF	B-Application
service	O
located	O
from	O
a	O
client	O
's	O
perspective	O
?	O
</s>
<s>
Once	O
we	O
have	O
the	O
answer	O
to	O
these	O
three	O
questions	O
,	O
then	O
creating	O
and	O
consuming	O
the	O
WCF	B-Application
service	O
will	O
be	O
a	O
lot	O
easier	O
for	O
us	O
.	O
</s>
<s>
The	O
WCF	B-Application
service	O
has	O
the	O
concept	O
of	O
endpoints	O
.	O
</s>
<s>
A	O
WCF	B-Application
service	O
provides	O
endpoints	O
which	O
client	O
applications	O
can	O
use	O
to	O
communicate	O
with	O
the	O
WCF	B-Application
service	O
.	O
</s>
<s>
The	O
answer	O
to	O
these	O
above	O
questions	O
is	O
what	O
is	O
known	O
as	O
the	O
ABC	O
of	O
WCF	B-Application
services	O
and	O
in	O
fact	O
are	O
the	O
main	O
components	O
of	O
a	O
WCF	B-Application
service	O
.	O
</s>
<s>
Address	O
:	O
Like	O
a	O
webservice	O
,	O
a	O
WCF	B-Application
service	O
also	O
provides	O
a	O
URI	B-Protocol
which	O
can	O
be	O
used	O
by	O
clients	O
to	O
get	O
to	O
the	O
WCF	B-Application
service	O
.	O
</s>
<s>
This	O
URI	B-Protocol
is	O
called	O
as	O
the	O
Address	O
of	O
the	O
WCF	B-Application
service	O
.	O
</s>
<s>
This	O
will	O
solve	O
the	O
first	O
problem	O
of	O
"	O
where	O
to	O
locate	O
the	O
WCF	B-Application
service	O
?	O
"	O
</s>
<s>
Binding	O
:	O
Once	O
we	O
are	O
able	O
to	O
locate	O
the	O
WCF	B-Application
service	O
,	O
one	O
should	O
think	O
about	O
how	O
to	O
communicate	O
with	O
the	O
service	O
(	O
protocol	O
wise	O
)	O
.	O
</s>
<s>
The	O
binding	O
is	O
what	O
defines	O
how	O
the	O
WCF	B-Application
service	O
handles	O
the	O
communication	O
.	O
</s>
<s>
This	O
will	O
solve	O
the	O
second	O
problem	O
of	O
"	O
how	O
to	O
communicate	O
with	O
the	O
WCF	B-Application
service	O
?	O
"	O
</s>
<s>
Contract	O
:	O
Now	O
the	O
only	O
question	O
one	O
is	O
left	O
with	O
is	O
about	O
the	O
functionalities	O
that	O
a	O
WCF	B-Application
service	O
provides	O
.	O
</s>
<s>
The	O
contract	O
is	O
what	O
defines	O
the	O
public	O
data	O
and	O
interfaces	O
that	O
WCF	B-Application
service	O
provides	O
to	O
the	O
clients	O
.	O
</s>
<s>
The	O
URIs	B-Protocol
representing	O
the	O
data	O
will	O
contain	O
the	O
physical	O
location	O
of	O
the	O
service	O
,	O
as	O
well	O
as	O
the	O
service	O
name	O
.	O
</s>
<s>
The	O
URIs	B-Protocol
can	O
also	O
specify	O
a	O
traversal	O
of	O
a	O
relationship	O
in	O
the	O
Entity	O
Data	O
Model	O
.	O
</s>
<s>
The	O
OData	B-Application
2.0	O
spec	O
adds	O
support	O
for	O
the	O
$count	O
path	O
segment	O
(	O
to	O
return	O
just	O
a	O
count	O
of	O
entities	O
)	O
and	O
$inlineCount	O
(	O
to	O
retrieve	O
a	O
page	O
worth	O
of	O
entities	O
and	O
a	O
total	O
count	O
without	O
a	O
separate	O
trip	O
....	O
)	O
.	O
</s>
