260 likes | 406 Views
Våra sponsorer. REST/ OData /Entity Framework & BizTalk Certification Cram. Mikael Håkansson - Enfo Zystems MVP BizTalk http://blogical.se/blogs/mikael Twitter : @ wmmihaa. Johan Hedberg- Enfo Zystems MVP BizTalk http://blogical.se/blogs/johan Twitter : @ JoHed. Kommande events….
E N D
REST/OData/Entity Framework & BizTalk Certification Cram Mikael Håkansson - Enfo Zystems MVP BizTalk http://blogical.se/blogs/mikael Twitter: @wmmihaa Johan Hedberg- Enfo Zystems MVP BizTalk http://blogical.se/blogs/johan Twitter: @JoHed
Kommande events… 23:e Maj BizTalk - EDI & B2B Mikael Håkansson & Anders Wasén 12:e Juni Windows Azure Service Bus- Connectivity and Messaging Alan Smith SommarKollo with Johan Hedberg Helsingborg 26:e Juni, Stockholm 27:e Juli+ 21:a Aug
Why is this session relevant to me? More devices Platform diversity Applications has become commodity Bandwidth is not infinite Size matters
Agenda What is REST? What is Entity Framework? What is WCF Data Services? What is Odata?
<Disclaimer> Jag avser inte att ljuga, med det jag säger är inte nödvändigtvis sant </Disclaimer>
What is REST? Representational State Transfer Introduced by Roy Fielding in 2000 Not bound to XML Focuses on resources (nouns) Resources are exposed through URI’s Utilizes all HTTP verbs (GET, PUT, POST & DELETE) Supports caching Light weight Interoperable
What is REST? Richardson’s Maturity Model * Level 4 – Hypermedia Level 3 – HTTP Verbs =RESTful Level 2 - Resourses Level 1 - POX *Developed by Leonard Richardson Källa: http://martinfowler.com/articles/richardsonMaturityModel.html
Building a ”REST” Service Level 1 - POX Level 4 – Hypermedia Level 3 – HTTP Verbs Level 2 - Resourses Level 1 - POX
Building a ”REST” Service Level 2 – Using Resources Level 4 – Hypermedia Level 3 – HTTP Verbs Level 2 - Resourses Level 1 - POX
Building a ”REST” Service Level 3 – Using HTTP Verbs Level 4 – Hypermedia Level 3 – HTTP Verbs Level 2 - Resourses Level 1 - POX
What is REST? Using Hypermedia Relationships between entities are defined by links Builds on the web architecture
What is REST? Using Hypermedia Order http://.../Order(23) Customer Orders http://.../Customer(21) Order http://.../Order(24)
What is REST? <Person> <id>16</id> <FirstName>Mikael</FirstName> <LastName>Håkansson</LastName> <Children> <Person> <id>20</id> <FirstName>Linus</FirstName> <LastName>Håkansson</LastName> </Person> <Person> <id>21</id> <FirstName>Pontus</FirstName> <LastName>Håkansson</LastName> </Person> <Person> <id>22</id> <FirstName>Matilda</FirstName> <LastName>Håkansson</LastName> </Person> </Children> </Person> Using Hypermedia Resourses
What is REST? <Person> <idhref="Person(16)">16</id> <FirstName>Mikael</FirstName> <LastName>Håkansson</LastName> <Childrenhref="Person(16)/Children"/> </Person> Using Hypermedia <Persons> <Person> <idhref="Person(20)">20</id> <FirstName>Linus</FirstName> <LastName>Håkansson</LastName> </Person> <Person> <idhref="Person(21)">21</id> <FirstName>Pontus</FirstName> <LastName>Håkansson</LastName> </Person> <Person> <idhref="Person(22)">22</id> <FirstName>Matilda</FirstName> <LastName>Håkansson</LastName> </Person> </Persons>
Building a ”REST” Service Level 3 – Using Hypermedia throught ATOM http://services.odata.org/Northwind/Northwind.svc
What is ADO.NET Entity Framework? an object-relational mapping (ORM) framework for the .NET Framework supports both “Database First” and “Model First” along with “Code First” supports all ADO.NET providers
What is ADO.NET Entity Framework? Building a model using Database-First
What is WCF Data Services? formerly known as ADO.NET Data Services represents Entity Data Model as RESTful services supports both xml and JSON
What is WCF Data Services? Expose the model as a RESTful service Level 4 – Hypermedia Level 3 – HTTP Verbs Level 2 - Resourses Level 1 - POX
What is Odata? Open Data Protocol Query over HTTP
What is Odata? Query the service
Min egen reflektion… 1995 ODBC WinApp (VB6) 2000 COM/SOAP OLEDb ASP 2005 SOAP/WCF ADO.Net ASP.Net + AJAX 2012 2012 OData OData ADO.Net HTML+ JavaScript HTML+ JavaScript
REST ipraktiken (RESTLess) http://wcfdstoolkit.codeplex.com/ Skapavyer! WCF Data Services Toolkit