1 / 37

Distributed data apps with .NET

Distributed data apps with .NET . Zlatko Knezevic Developer Evangelist Microsoft zlatko.knezevic@microsoft.com. Data options in .NET world. Some history included. Native interfaces ODBC as a abstraction layer OLE DB ADO.NET as a wrapper with .NET With factories in 2.0 world

betty_james
Download Presentation

Distributed data apps with .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed data apps with .NET Zlatko Knezevic Developer Evangelist Microsoft zlatko.knezevic@microsoft.com

  2. Data options in .NET world

  3. Some history included • Native interfaces • ODBC as a abstraction layer • OLE DB • ADO.NET as a wrapper with .NET • With factories in 2.0 world • ORMs as of 3.0

  4. Today, things are different • Client-server is a past paradigm • Services talking to one another • Distribution of data, applications, infrastructure • TDD/DDD/BDD as a development practice

  5. Visual Studio “Quadrant” Entity Framework Data Services ADO.NET “M”/EDM SQL Azure SQL Server … SQL Server Modeling Services

  6. Entity Framework 4.0

  7. Entity Framework 1.0 had too many pain points • The designer! • Model First not supported • Poor support for Stored Procedures • No Pluralization/Singularization • Foreign Keys hidden • Lazy Loading not supported • Missing LINQ Operators vs LINQ to SQL • Generated SQL unreadable • No support for Plain Old CLR Objects • N-Tier difficult

  8. Self-tracking entities SQL generation improvements More LINQ operator support LINQ extensibility ExecuteStoreQuery ExecuteStoreCommand SPROC import improvements Model defined functions WPF designer integration Code-First development (Feature CTP) New in Entity Framework 4 • Model-first development • Automatic pluralization • Foreign keys in models • POCO class support (Add-in) • Lazy loading • T4 Code Generation • Template customization • IObjectSet • Virtual SaveChanges • ObjectStateManager control

  9. Better Tools and Design Experience • Model First • Templated code generation • Stored Procedures • Pluralization/Singularization • Complex Types • Better delete and search

  10. More powerful/flexible runtime • Deferred Loading (aka lazy loading) • Foreign Keys surfaced • More complete LINQ implementation • ExecuteStoreQuery • EntityFunctions and SqlFunctions • Improvements to generated SQL

  11. Persistence Ignorance • First class support for Persistence Ignorance • No modifications to your classes!

  12. N-Tier • Self Tracking Entities

  13. Code Only database modelling • All above is nice, but you still need the edmx file • What if you want the code to be “the truth”? • Code-only modelling means just that • Currently only in CTP

  14. DEMO

  15. oData (WCF Data Services)

  16. oData? • What is it? • Why should we care? • How are we supposed to use it?

  17. A little bit of history… • MIX07 was a birthplace of “Astoria” • Later renamed ADO.NET Data Services • Requirements for web data services • Plain HTTP • Uniform patterns • Focus on data • Abstract

  18. Basic idea The basic idea is simple You already have this HUGE platform and API thing Why not build on top of it?? In a way that is friendly and automatic??

  19. REPRESENTATIONAL STATE TRANSFER REST

  20. | !protocol | !standard | !format REST

  21. REST == architectural style

  22. | decoupling | scalability | layering REST

  23. OData • Uniform way of representing structured data • Atom, JSON formats • Uniform URL conventions • Navigation, filtering, sorting, paging, etc. • Uniform operations • Addressability • GET, POST, PUT, DELETE always mean the same

  24. Expose • Any data over HTTP • Through either JSON or XML (Atom) • Your source needs to be IQueryable<T> • Works like a charm for Entity Framework contexts

  25. Data Source Options HTTP traffic Custom providers: - IDataServiceMetadataProvider - IDataServiceQueryProvider Updates: - IDataServiceUpdateProvider Special features: - IDataServiceStreamProvider - IDataServicePagingProvider Data Services Runtime Entity Framework Provider Reflection Provider Custom Provider Entity Framework .NET Classes [+ LINQ provider] Database Data Source Data Source

  26. Consume • Data on any platform • Bindings and POC code for • PHP • Java • JavaScript • Client libraries for .NET • Power Pivot and other means

  27. got an HTTP stack?

  28. data service != gateway to database service interface business logic store

  29. oData point: SharePoint 2010 • SharePoint needed 2 things in this space • Flexible data interface • Maximize reach, minimum barrier of entry • Data centric, but enforcing business logic • Developer story • Libraries for as many clients as possible • Great Visual Studio integration

  30. oData consumer: PowerPivot • “Self-service business intelligence” • Let people find and use their own data • …but where’s the data? • Broad direct database access is impractical • OData feeds expose data over application logic • PowerPivot can handle OData natively • Reports often represent the best data sources • All reports in Reporting Services are now OData feeds

  31. http://odata.org/producers • Servers • WCF Data Services • SharePoint 2010 • SQL Server Reporting Services 2008 R2 • SQL Azure • IBM WebSphereeXtremeScale • Microsoft Media Room • WCF RIA Services • Services • Netflix • Mix 2010 • Nerd Dinner • Vancouver’s vanGuide • Open Government Data Initiative • Open Science Data Initiative • Microsoft Codename “Dallas” • City of Edmonton http://odata.org/consumers • Clients • Excel + PowerPivot • LINQPad • OData Explorer • Client libraries • .NET • Silverlight • Windows Phone 7 Series • Javascript • Java • Objective-C • PHP

  32. DEMO

  33. SQL Server 2008 R2

  34. SQL Server 2008 at a glance • A lot of improvements for next-generation apps • Beyond rational data types • Spatial Data type • Hierarchy data type • Improvements in rational engine • FILESTREAM data type • New DateTime functions • Support for sparse columns • Better management • And a lot more…

  35. SQL Server 2008 R2 • Adding on the solid foundation that is SQL 2008 • Improvements in management, reporting and federation • StreamInsight™ • Support for oData in Reporting Services • Better business insight with new BI advances • PowerPivot

  36. Visual Studio 2010 & SQL Server 2008 R2 • Continued “DB professional” support • Offline database projects • Provides a place for the DB in ALM cycle • New T-SQL IDE and developing features • Data-tier Application projects

  37. Data-tier Applications • Improved Transact-SQL IDE • Supports offline development, refactoring, versioning, policy • Builds single unit of deployment containing all database objects (DACPAC) • Registered with SQL Server when deployed

More Related