Slot # 18 - Building Flexible Data Services for the Web
Using the ADO .NET Data Services Framework
17:00 GMT (UTC)
Artemak...
Agenda

•   Data Access
•   The ADO .NET Entity Framework
•   The ADO .NET Data Services Framework
•   Why ADO .NET Data S...
Data Access
Definition
• A way of accessing a data repository for storing, retrieving, or manipulating
  data


Standards ...
The ADO .NET Entity Framework (I)
Entity Data Model
• Describes conceptual schema
• An object model, independent of storag...
The ADO .NET Entity Framework (II)
Benefits
• Abstraction in Data Access
   – Just know and use the conceptual schema
   –...
The ADO .NET Data Services Framework (I)
                      Mobile &
                      Smart              Different...
The ADO .NET Data Services Framework (II)
REST Interface
• Data is communicated/handled in the style of representational s...
Why ADO .NET Data Services?

Industry Trends
• “Connected” applications
   – Rich AJAX web applications
   – Flash & Silve...
Why ADO .NET Data Services?


        Data                      The data is conveyed along
                               ...
The Architecture of a Data Service
                                              • Out of the box: WCF hosted within an AS...
DEMO:
Examining an ADO .NET Data Service
Building a Data Service from Scratch

Development Environment
• Visual Studio 2008 SP1
• .NET Framework 3.5 SP1


Data Sou...
DEMO:
Building a Data Service from Scratch
Consuming a Data Service

An HTTP Stack is Enough!              Lowest


JSON & AtomPub clients
                          ...
DEMO:
Consuming a Data Service
Data Services Security (I)

Visibility
• Per-container visibility control
• Read, Query and Write options


Authentication...
Data Services Security (II)

Interceptors
• Execute before HTTP GET/PUT/POST/DELETE
• Enable validation, custom row-level ...
Summary

Data is exposed over HTTP via ADO.NET Data Services
• Entity Data Model
• URIs (entities and associations  resou...
Resources
• ADO.NET Data Services Framework Website
   • http://astoria.mslivelabs.com/Default.aspx
• ADO.NET Data Service...
Q&A
Contact PASS

203 North LaSalle - Suite 2100
Chicago, IL 60601

Tel 1.604.899.6009
Fax 1.604.899.1269

www.sqlpass.org
November 2-5. Seattle WA.
The Premier Conference for SQL Server Professionals


Register Today. www.summit2009.sqlpass.org
Thank you for attending
24 Hours of PASS


Co-Sponsored by:   Media Sponsors:
Upcoming SlideShare
Loading in …5
×

Building Flexible Data Services for the Web Using the ADO .NET Data Services Framework

1,735 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,735
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
31
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Building Flexible Data Services for the Web Using the ADO .NET Data Services Framework

  1. 1. Slot # 18 - Building Flexible Data Services for the Web Using the ADO .NET Data Services Framework 17:00 GMT (UTC) Artemakis Artemiou B.Sc., M.Sc., Microsoft SQL Server MVP, MCP, MCTS Cyprus .NET User Group (CDNUG) Lead INETA-Europe Country Leader (CY) H.S.Data Ltd. a_artemiou@hotmail.com Co-Sponsored by: Media Sponsors:
  2. 2. Agenda • Data Access • The ADO .NET Entity Framework • The ADO .NET Data Services Framework • Why ADO .NET Data Services? • The Architecture of a Data Service • Building a Data Service From Scratch • Consuming a Data Service • Data Services Security • Summary
  3. 3. Data Access Definition • A way of accessing a data repository for storing, retrieving, or manipulating data Standards Used for Data Access • SQL, ODBC, JDBC, ADO.NET, XML, XQuery, Xpath, Web Services ADO .NET • Part of the base class library that is included with the Microsoft .NET Framework • Access and modify data stored in relational database systems • Access and modify data in non-relational sources • Provides developers with fast and robust data access methods
  4. 4. The ADO .NET Entity Framework (I) Entity Data Model • Describes conceptual schema • An object model, independent of storage considerations • Entities and their relationships are modeled by using two basic types: – EntityType & AssociationType Mapping Model • Conceptual schema to database storage • Mapping model implemented via three XML files – Each has its own XSD vocabulary – Conceptual schema (CSDL) – Storage schema (SSDL) – Mapping schema (MSL)
  5. 5. The ADO .NET Entity Framework (II) Benefits • Abstraction in Data Access – Just know and use the conceptual schema – If relational database changes, not need to change the code • Simplified representation of Relational Models Entity Framework and ADO .NET Data Services • Conceptual model drives the service tier • Service tier adjusts automatically upon updates to the conceptual model • Uniformity among the service code • Code reuse
  6. 6. The ADO .NET Data Services Framework (I) Mobile & Smart Different Clients Types of Desktop Users & Web Apps Media Centers WWW - HTTP Your Data
  7. 7. The ADO .NET Data Services Framework (II) REST Interface • Data is communicated/handled in the style of representational state transfer (REST) – CRUD operations are performed using HTTP Verbs: • GET = SELECT • POST = INSERT • PUT = UPDATE • DELETE = DELETE – Resources are identified by URIs (entities and associations  resources and links) – Formats: JSON, AtomPub Tightly Integrated with HTTP • HTTP is often the only line of sight from an AJAX or Silverlight application • Enormous amounts of infrastructure exists to support HTTP
  8. 8. Why ADO .NET Data Services? Industry Trends • “Connected” applications – Rich AJAX web applications – Flash & Silverlight applications, Mashups, etc. Services Supporting “Connected” Applications • Operation Center Services (example: Windows Live ID) – More about process • Data Centric Services (example: Windows Live Photos) – Very popular – Is all about data – Enables the creation of AJAX & Silverlight apps, Mashups, etc.
  9. 9. Why ADO .NET Data Services? Data The data is conveyed along with presentation and & Other Information behavior information Traditional Tiered Web Applications Data Feeds The data is moved Data Data out-of-band with the presentation and HTML + Javascript DLL + XAML behavior information AJAX Applications Silverlight Applications Mashups
  10. 10. The Architecture of a Data Service • Out of the box: WCF hosted within an ASP.NET HTTP web page • You can also author your own host Hosting/HTTP Listener • The ADO.NET Data Services framework exists as a DLL Data Services Runtime IQueryable [+ IUpdatable] Two paths: • Relational data – Entity Framework Data Access Layer • Everything else - Language Integrated Query (LINQ) Entity Custom LINQ Framework provider Relational Non-Relational Source Source
  11. 11. DEMO: Examining an ADO .NET Data Service
  12. 12. Building a Data Service from Scratch Development Environment • Visual Studio 2008 SP1 • .NET Framework 3.5 SP1 Data Sources • Entity Framework for Relational Data • LINQ for Non-Relational Data Model-Driven • Structural description in Entity Data Model • Schema shapes the service contract
  13. 13. DEMO: Building a Data Service from Scratch
  14. 14. Consuming a Data Service An HTTP Stack is Enough! Lowest JSON & AtomPub clients Level of Windows Data Services Clients abstraction • .NET Framework – LINQ to ADO.NET Data Services • Silverlight 2 • AJAX (currently on codeplex) Highest • ASP.NET Data Source control
  15. 15. DEMO: Consuming a Data Service
  16. 16. Data Services Security (I) Visibility • Per-container visibility control • Read, Query and Write options Authentication • Integrate with hosting environment • ASP.NET, WCF or custom authentication schemes
  17. 17. Data Services Security (II) Interceptors • Execute before HTTP GET/PUT/POST/DELETE • Enable validation, custom row-level security policies • Maintain the REST interface Service Operators • Custom entry points, e.g. /MyTags?startDate='2009-09-02' • Composable, follow URI scheme
  18. 18. Summary Data is exposed over HTTP via ADO.NET Data Services • Entity Data Model • URIs (entities and associations  resources and links) • HTTP Verbs for data manipulation – GET = SELECT – POST = INSERT – PUT = UPDATE – DELETE = DELETE • Formats: JSON, AtomPub ADO .NET Data Services Very Useful for: • AJAX & Silverlight Applications, Online Data Services, Mashups & the Cloud!
  19. 19. Resources • ADO.NET Data Services Framework Website • http://astoria.mslivelabs.com/Default.aspx • ADO.NET Data Services Team Blog • http://blogs.msdn.com/astoriateam • Representational State Transfer (REST) • http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm • The Atom Publishing Protocol RFC • http://tools.ietf.org/html/rfc5023 • JavaScript Object Notation RFC (JSON) • http://tools.ietf.org/html/rfc4627 • Artemakis Artemiou’s Blog • http://aartemiou.blogspot.com
  20. 20. Q&A
  21. 21. Contact PASS 203 North LaSalle - Suite 2100 Chicago, IL 60601 Tel 1.604.899.6009 Fax 1.604.899.1269 www.sqlpass.org
  22. 22. November 2-5. Seattle WA. The Premier Conference for SQL Server Professionals Register Today. www.summit2009.sqlpass.org
  23. 23. Thank you for attending 24 Hours of PASS Co-Sponsored by: Media Sponsors:

×