SlideShare una empresa de Scribd logo
1 de 31
Real World API Design Using The Entity Framework Services
dotNetDave Conference DVD! Packed full of: Videos of all sessions from 2010 & 2011(1)! Slide decks from 2011 & 2010! Demo projects from 2011 & 2010! David McCarter’s .NET interview Questions! Extras Conference Photos from 2010! Surprise videos! Book + DVD $25! Only $15!
Check Out Your Local User Groups! San Diego Cloud Computing User Group www.azureusergroup.com/group/sandiegoazureusergroup San Diego .NET Developers Group www.sddotnetdg.org San Diego .NET User Group www.sandiegodotnet.com San Diego SQL Server User Group www.sdsqlug.org
Overview
Current Problem Partner Company Data Store Internet All Data Stored in local Data Center Customers/ Partners do not have access to data No ability to create “add-ins” to application No ability to “upsell” products
Partner Company Data Store Internet Immediate access to the network data for partners Provide customers with an ever growing wealth of tools for extending application Marketing Exposure Handle billing and purchasing transactions with the end-user Business Proposition
Goals Make it easy to access data Access to data from any application Windows Web iPhone … Track Usage For billing  Detect abuse
Goals Provide ability for different application types Visual Application Surface partner application inside of company application Data Application Allow data access to authorized customers Composite Application Combination of Visual and Data
Challenges Current database design Very Confusing Same data in multiple tables. Allow secure access to data App can only access a select number of services App can only access data for authorized customers Access data from multiple locations Some customers store data locally
Design
Database Issues Hundreds of tables. Tables can have hundreds of columns (some not used anymore) Same data is stored in different tables. Tables store multiple types of data. Primary data keys duplicated in almost every table. Too much expertise needed to understand database.
Database Solution Design model of how data should look, regardless of how it’s currently structured
Database Solution Use Views instead of Tables Allows creating data structures that make more sense, easier to use. Allows splitting/ combining of data from Tables. Allows renaming of columns that make data more understandable/ consistency. Use stored procedures to insert/ update data
Database Solution Use Entity Framework 4 to implement object model on top of Views Easy for developers to use/ understand Separate models by purpose Easier to deal with Re-use views in different models (sparingly) Remove properties that don’t make sense in model Insert/ updates only through “main” Entity Use POCO T4 template Easy to separate entities from data access Can add functionality/ business logic Smaller payloads across the wire
Exposing Data to Partners Expose services via HTTPs Use WCF Data Services Expose data via REST (JSON and AtomPub)	 Easy to expose Models One model per service Control Entity access using EntitySetAccessRule
Exposing Data to Partners Use WCF Data Services	 Limit number of records returned using EntitySetPageSize Prevent partners from access to clients that have not “enabled” the application Modify data coming into service using ChangeInterceptor’s Can also update date in multiple Entities
Security Limit partners access to data/ services Validate call is from authorized partner Using certificate or token Validate client Validate partner has access to service. Validate client/ app Validate app Validate app is active Validate app access to client
Security Use WCF Message Inspectors Intercept service call before it hits the service Different Message Inspectors for different types of services General services uses certification Client data services uses token Smaller than a certification Authentication done by calls to back-end Also used for logging partner usage data What they are hitting Payload sizes
Summary
Challenges EF does better with “properly” designed databases EF designer can easily screw up models (better in EF 4) WCF Data Services can be limiting Have to jump through a few hoops to have WCF Data Services to expose entities from a separate project Have to manually edit .svc files to use Message Inspectors
Challenges Bad REST Queries = Bad SQL Queries Demands more processing power on the web tier Majority of programmers have never used REST/ LINQ to Rest More of a challenge with other languages (mostly because samples are written in .NET 4)
Looking Forward Allow more write access to data Provide “batch” processing Faster data access on first hit Allow read/write access to Entity per app Create new database from cleaned up model (far in the future) Better configuration, security, logging and developer portal using third-party vendor
Real World API Design Using The Entity Framework Services

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Short Sales Overview of EmpowerID
Short Sales Overview of EmpowerIDShort Sales Overview of EmpowerID
Short Sales Overview of EmpowerID
 
Microsoft Ignite Recap: Microsoft 365 Security & Compliance with Vlad & Drew
Microsoft Ignite Recap: Microsoft 365 Security & Compliance with Vlad & DrewMicrosoft Ignite Recap: Microsoft 365 Security & Compliance with Vlad & Drew
Microsoft Ignite Recap: Microsoft 365 Security & Compliance with Vlad & Drew
 
Windows Azure SQL Database Federations
Windows Azure SQL Database FederationsWindows Azure SQL Database Federations
Windows Azure SQL Database Federations
 
Everything you need to know about sharing files in SharePoint and OneDrive
Everything you need to know about sharing files in SharePoint and OneDriveEverything you need to know about sharing files in SharePoint and OneDrive
Everything you need to know about sharing files in SharePoint and OneDrive
 
FileMaker Data Integration with SharePoint, Office 365 and 100+
FileMaker Data Integration with SharePoint, Office 365 and 100+FileMaker Data Integration with SharePoint, Office 365 and 100+
FileMaker Data Integration with SharePoint, Office 365 and 100+
 
30 on Thursday - Your Digitial Workplace: Store, Share & Sync with Microsoft ...
30 on Thursday - Your Digitial Workplace: Store, Share & Sync with Microsoft ...30 on Thursday - Your Digitial Workplace: Store, Share & Sync with Microsoft ...
30 on Thursday - Your Digitial Workplace: Store, Share & Sync with Microsoft ...
 
ShareFile vs Box vs Dropbox
ShareFile vs Box vs DropboxShareFile vs Box vs Dropbox
ShareFile vs Box vs Dropbox
 
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
Upload Oracle EBS Attachments via MS-Excel Templates using Project Partners U...
 
What's New with OneDrive for Business - SPFestSeattle
What's New with OneDrive for Business - SPFestSeattleWhat's New with OneDrive for Business - SPFestSeattle
What's New with OneDrive for Business - SPFestSeattle
 
Barcelona salesforce sdg november lightning connect
Barcelona salesforce   sdg november lightning connectBarcelona salesforce   sdg november lightning connect
Barcelona salesforce sdg november lightning connect
 
SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012SharePoint Saturday Louisville 2012
SharePoint Saturday Louisville 2012
 
Accessing data within VB Applications
Accessing data within VB ApplicationsAccessing data within VB Applications
Accessing data within VB Applications
 
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
Ladies Be Architects - Study Group III: OAuth 2.0 (Ep 1)
 
The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)The Who, What, Why and How of Active Directory Federation Services (AD FS)
The Who, What, Why and How of Active Directory Federation Services (AD FS)
 
Integrate External Data w/ business connectivity services (BCS)
Integrate External Data w/ business connectivity services (BCS)Integrate External Data w/ business connectivity services (BCS)
Integrate External Data w/ business connectivity services (BCS)
 
Everything you need to know about external sharing in OneDrive, SharePoint, a...
Everything you need to know about external sharing in OneDrive, SharePoint, a...Everything you need to know about external sharing in OneDrive, SharePoint, a...
Everything you need to know about external sharing in OneDrive, SharePoint, a...
 
What is hibernate?
What is hibernate?What is hibernate?
What is hibernate?
 
Ether solutions implements Oracle Document Cloud
Ether solutions   implements Oracle Document CloudEther solutions   implements Oracle Document Cloud
Ether solutions implements Oracle Document Cloud
 
Everything you need to know about sharing files in SharePoint & OneDrive - SP...
Everything you need to know about sharing files in SharePoint & OneDrive - SP...Everything you need to know about sharing files in SharePoint & OneDrive - SP...
Everything you need to know about sharing files in SharePoint & OneDrive - SP...
 
Securing SharePoint & OneDrive in Office 365
Securing SharePoint & OneDrive in Office 365Securing SharePoint & OneDrive in Office 365
Securing SharePoint & OneDrive in Office 365
 

Destacado

Destacado (13)

The Entity Data Model
The Entity Data ModelThe Entity Data Model
The Entity Data Model
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Back-2-Basics: Code Contracts
Back-2-Basics: Code ContractsBack-2-Basics: Code Contracts
Back-2-Basics: Code Contracts
 
Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3
 
How To Survive The Technical Interview
How To Survive The Technical InterviewHow To Survive The Technical Interview
How To Survive The Technical Interview
 
.NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012).NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012)
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 
Rock Your Code with Code Contracts
Rock Your Code with Code ContractsRock Your Code with Code Contracts
Rock Your Code with Code Contracts
 
Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework Services
 
Code Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & ExtensionsCode Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & Extensions
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)
 
Performance Optimization In Angular 2
Performance Optimization In Angular 2Performance Optimization In Angular 2
Performance Optimization In Angular 2
 

Similar a Real World API Design Using The Entity Framework Services

Solve Todays Problems with 10 New SharePoint 2010 Features
Solve Todays Problems with 10 New SharePoint 2010 FeaturesSolve Todays Problems with 10 New SharePoint 2010 Features
Solve Todays Problems with 10 New SharePoint 2010 Features
Cory Peters
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
Dave Bost
 
WPF Unleashed: Building Application with Visual Studio 2008 SP1
WPF Unleashed: Building Application with Visual Studio 2008 SP1WPF Unleashed: Building Application with Visual Studio 2008 SP1
WPF Unleashed: Building Application with Visual Studio 2008 SP1
Dave Bost
 
Doors 9 Doors Web Access
Doors 9  Doors Web AccessDoors 9  Doors Web Access
Doors 9 Doors Web Access
Bill Duncan
 
Ipedo Company Overview
Ipedo Company OverviewIpedo Company Overview
Ipedo Company Overview
Tim_Matthews
 
Accessing sap and_mainframe_data_and_applications_via_share_point
Accessing sap and_mainframe_data_and_applications_via_share_pointAccessing sap and_mainframe_data_and_applications_via_share_point
Accessing sap and_mainframe_data_and_applications_via_share_point
Yuval Birenboum
 

Similar a Real World API Design Using The Entity Framework Services (20)

Enterprise Deployments & SOA
Enterprise Deployments & SOAEnterprise Deployments & SOA
Enterprise Deployments & SOA
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 
How to Approach Tool Integrations
How to Approach Tool IntegrationsHow to Approach Tool Integrations
How to Approach Tool Integrations
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
 
Denodo Partner Connect: Business Value Demo with Denodo Demo Lite
Denodo Partner Connect: Business Value Demo with Denodo Demo LiteDenodo Partner Connect: Business Value Demo with Denodo Demo Lite
Denodo Partner Connect: Business Value Demo with Denodo Demo Lite
 
SAP BusinessObject's Webi Rich Client
SAP BusinessObject's Webi Rich ClientSAP BusinessObject's Webi Rich Client
SAP BusinessObject's Webi Rich Client
 
Why Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by DenodoWhy Data Virtualization? An Introduction by Denodo
Why Data Virtualization? An Introduction by Denodo
 
Modern Data Management for Federal Modernization
Modern Data Management for Federal ModernizationModern Data Management for Federal Modernization
Modern Data Management for Federal Modernization
 
Syn framework 4.0 and sql server
Syn framework 4.0 and sql serverSyn framework 4.0 and sql server
Syn framework 4.0 and sql server
 
Solve Todays Problems with 10 New SharePoint 2010 Features
Solve Todays Problems with 10 New SharePoint 2010 FeaturesSolve Todays Problems with 10 New SharePoint 2010 Features
Solve Todays Problems with 10 New SharePoint 2010 Features
 
MSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF DemystifiedMSDN Unleashed: WPF Demystified
MSDN Unleashed: WPF Demystified
 
Work with data in ASP.NET
Work with data in ASP.NETWork with data in ASP.NET
Work with data in ASP.NET
 
WPF Unleashed: Building Application with Visual Studio 2008 SP1
WPF Unleashed: Building Application with Visual Studio 2008 SP1WPF Unleashed: Building Application with Visual Studio 2008 SP1
WPF Unleashed: Building Application with Visual Studio 2008 SP1
 
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
Granite state #spug The #microsoftGraph and #SPFx on steroids with #AzureFunc...
 
Doors 9 Doors Web Access
Doors 9  Doors Web AccessDoors 9  Doors Web Access
Doors 9 Doors Web Access
 
Ipedo Company Overview
Ipedo Company OverviewIpedo Company Overview
Ipedo Company Overview
 
Help File Proposal
Help File ProposalHelp File Proposal
Help File Proposal
 
Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)Whats New In 2010 (Msdn & Visual Studio)
Whats New In 2010 (Msdn & Visual Studio)
 
Accessing sap and_mainframe_data_and_applications_via_share_point
Accessing sap and_mainframe_data_and_applications_via_share_pointAccessing sap and_mainframe_data_and_applications_via_share_point
Accessing sap and_mainframe_data_and_applications_via_share_point
 
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
 

Más de David McCarter

Más de David McCarter (8)

Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real World
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 
Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real World
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 

Último

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Real World API Design Using The Entity Framework Services

  • 1. Real World API Design Using The Entity Framework Services
  • 2.
  • 3. dotNetDave Conference DVD! Packed full of: Videos of all sessions from 2010 & 2011(1)! Slide decks from 2011 & 2010! Demo projects from 2011 & 2010! David McCarter’s .NET interview Questions! Extras Conference Photos from 2010! Surprise videos! Book + DVD $25! Only $15!
  • 4. Check Out Your Local User Groups! San Diego Cloud Computing User Group www.azureusergroup.com/group/sandiegoazureusergroup San Diego .NET Developers Group www.sddotnetdg.org San Diego .NET User Group www.sandiegodotnet.com San Diego SQL Server User Group www.sdsqlug.org
  • 5.
  • 7. Current Problem Partner Company Data Store Internet All Data Stored in local Data Center Customers/ Partners do not have access to data No ability to create “add-ins” to application No ability to “upsell” products
  • 8. Partner Company Data Store Internet Immediate access to the network data for partners Provide customers with an ever growing wealth of tools for extending application Marketing Exposure Handle billing and purchasing transactions with the end-user Business Proposition
  • 9. Goals Make it easy to access data Access to data from any application Windows Web iPhone … Track Usage For billing Detect abuse
  • 10. Goals Provide ability for different application types Visual Application Surface partner application inside of company application Data Application Allow data access to authorized customers Composite Application Combination of Visual and Data
  • 11. Challenges Current database design Very Confusing Same data in multiple tables. Allow secure access to data App can only access a select number of services App can only access data for authorized customers Access data from multiple locations Some customers store data locally
  • 13. Database Issues Hundreds of tables. Tables can have hundreds of columns (some not used anymore) Same data is stored in different tables. Tables store multiple types of data. Primary data keys duplicated in almost every table. Too much expertise needed to understand database.
  • 14. Database Solution Design model of how data should look, regardless of how it’s currently structured
  • 15. Database Solution Use Views instead of Tables Allows creating data structures that make more sense, easier to use. Allows splitting/ combining of data from Tables. Allows renaming of columns that make data more understandable/ consistency. Use stored procedures to insert/ update data
  • 16. Database Solution Use Entity Framework 4 to implement object model on top of Views Easy for developers to use/ understand Separate models by purpose Easier to deal with Re-use views in different models (sparingly) Remove properties that don’t make sense in model Insert/ updates only through “main” Entity Use POCO T4 template Easy to separate entities from data access Can add functionality/ business logic Smaller payloads across the wire
  • 17.
  • 18.
  • 19. Exposing Data to Partners Expose services via HTTPs Use WCF Data Services Expose data via REST (JSON and AtomPub) Easy to expose Models One model per service Control Entity access using EntitySetAccessRule
  • 20. Exposing Data to Partners Use WCF Data Services Limit number of records returned using EntitySetPageSize Prevent partners from access to clients that have not “enabled” the application Modify data coming into service using ChangeInterceptor’s Can also update date in multiple Entities
  • 21.
  • 22.
  • 23. Security Limit partners access to data/ services Validate call is from authorized partner Using certificate or token Validate client Validate partner has access to service. Validate client/ app Validate app Validate app is active Validate app access to client
  • 24. Security Use WCF Message Inspectors Intercept service call before it hits the service Different Message Inspectors for different types of services General services uses certification Client data services uses token Smaller than a certification Authentication done by calls to back-end Also used for logging partner usage data What they are hitting Payload sizes
  • 25.
  • 26.
  • 28. Challenges EF does better with “properly” designed databases EF designer can easily screw up models (better in EF 4) WCF Data Services can be limiting Have to jump through a few hoops to have WCF Data Services to expose entities from a separate project Have to manually edit .svc files to use Message Inspectors
  • 29. Challenges Bad REST Queries = Bad SQL Queries Demands more processing power on the web tier Majority of programmers have never used REST/ LINQ to Rest More of a challenge with other languages (mostly because samples are written in .NET 4)
  • 30. Looking Forward Allow more write access to data Provide “batch” processing Faster data access on first hit Allow read/write access to Entity per app Create new database from cleaned up model (far in the future) Better configuration, security, logging and developer portal using third-party vendor