SlideShare a Scribd company logo
jQuery and ODataPerfect Together David Hoerster Co-Founder, BrainCredits.com david@braincredits.com
About Me C# MVP (April 2011) Co-Founder of BrainCredits (braincredits.com) Senior Technical Director for Resources Global Professionals President of Pittsburgh .NET Users Group Organizer of recent Pittsburgh Code Camps Twitter - @DavidHoerster Blog – http://geekswithblogs.net/DavidHoerster Email – david@braincredits.com
Agenda Quick overview of WCF Data Services and OData Getting data from a WCF Data Service Fiddler, LINQPad, web apps Calling WCF Data Services and Custom Service Methods via jQuery Using datajs as a client library datajs as a caching client JSONP Optional: Other uses for your data context
WCF Data Services – What? Allows you to expose or consume data over HTTP using REST Uses the Open Data Protocol (OData) Data exposed as resources addressable as URIs Data is an underlying model of some sort Entity Data Model (easiest) LINQ to SQL Custom entity classes (roll your own provider)
WCF Data Services – Why? Consistency Accepted format for data transport (OData) Navigate relationships Simple configuration in code Growing support for OData format
WCF Data Services – OData OData can be exposed in one of two formats Atom (XML) JSON (text) Data itself is exposed as one or more feeds Individual items in a feed are entries OData is published by Microsoft and is an open source specification Allows other parties to create consumers and producers of OData feeds
WCF Data Services Demo – Getting Data from a WCF Data Service
WCF Data Services Getting data from a service – WRAP-UP Understanding the URI’s XML vs. JSON size JSON structure Using jQuery to iterate through results Getting the next set of results
WCF Data Services w/ Web Apps You can create custom service operations You can use GET or POSTs with custom service operations Security still holds true SetServiceOperationAccessRule Custom Service Operations support returning void primitive Entity IEnumerable IQueryable
WCF Data Services w/ jQuery DEMO – Custom service methods and performing updates
Connecting WCF DS w/ jQuery Simple web app – WRAP-UP Custom service methods Inserts, updates, deletes Custom Operations honor OData keywords
DataJS Recently moved from Alpha to 1.0 Available via CodePlex Also, NuGet package (search ‘datajs’) Provides cross-browser support to connect to data sources Currently just supports OData services Provides helpers to caching data via remote services or local storage Supports JSON and Atom formats
DataJS w/ JSON Reading data OData.read(…) “Data” returned is at that ‘d’ level Doesn’t exist with datajs – needs to be handled with raw wcf data service calls Writing data OData.request(…) Supports POST/PUT/MERGE/DELETE Data variables don’t have to be pure JSON – datajs will format Supports batching requests
DataJS - Caching DataJS provides a simple caching mechanism createCache allows you to create named caches You can read from them You can clear them More advanced functionality See the Netflix example from datajs site
JSONP WCF Data Services don’t support JSONP by default Need JSONPDefaultBehaviorAttribute Need also to set specific parameters in request $format $callback
Using WCF Data ServicesWith jqGrid Probably easiest to set up either a WCF REST service or a MVC Action Method to retrieve the data. WCF Data Service Custom Operations expect the string arguments to be surrounded by single quotes (‘). jqGrid doesn’t send params like this. Service Operations expect either void, primitive, Entity, IEnumerable, IQueryable jqGrid requires special props to be returned row, total, etc.
Resources BrainCredits Link:http://www.braincredits.com/Lesson/16854 datajs site: http://datajs.codeplex.com/ JSONPSupportBehavior Attribute: http://go.microsoft.com/fwlink/?LinkId=208228 jqGrid site: http://www.trirand.com/blog/ OData site: www.odata.org

More Related Content

What's hot

Scim overview
Scim overviewScim overview
Scim overview
Morteza Ansari
 
Migrating On-Premises DBs to Cloud Systems
Migrating On-Premises DBs to Cloud SystemsMigrating On-Premises DBs to Cloud Systems
Migrating On-Premises DBs to Cloud Systems
Christopher Foot
 
Introduction to Microsoft Azure
Introduction to Microsoft AzureIntroduction to Microsoft Azure
Introduction to Microsoft Azure
Kasun Kodagoda
 
Microsoft azure - the cloud for modern business
Microsoft azure - the cloud for modern businessMicrosoft azure - the cloud for modern business
Microsoft azure - the cloud for modern business
Vinh Nguyen Quang
 
K8s architecture meetup2- k8saraby
K8s architecture  meetup2- k8sarabyK8s architecture  meetup2- k8saraby
K8s architecture meetup2- k8saraby
Walid Shaari
 
Trust No-One Architecture For Services And Data
Trust No-One Architecture For Services And DataTrust No-One Architecture For Services And Data
Trust No-One Architecture For Services And Data
Aidan Finn
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
smancke
 
Platform Deep Dive
Platform Deep DivePlatform Deep Dive
Platform Deep Dive
Conrad23
 
Standardizing Identity Provisioning with SCIM
Standardizing Identity Provisioning with SCIMStandardizing Identity Provisioning with SCIM
Standardizing Identity Provisioning with SCIM
WSO2
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
Robert Crane
 
Azure security and Compliance
Azure security and ComplianceAzure security and Compliance
Azure security and Compliance
Karina Matos
 
Enter The Matrix Securing Azure’s Assets
Enter The Matrix Securing Azure’s AssetsEnter The Matrix Securing Azure’s Assets
Enter The Matrix Securing Azure’s Assets
BizTalk360
 
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
ITProceed
 
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
Amazon Web Services
 
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
Nordic Infrastructure Conference
 
Windows Azure Security Features And Functionality
Windows Azure Security Features And FunctionalityWindows Azure Security Features And Functionality
Windows Azure Security Features And Functionality
vivekbhat
 
Getting started with Azure – Part 1 | TechMeet360
Getting started with Azure – Part 1 | TechMeet360Getting started with Azure – Part 1 | TechMeet360
Getting started with Azure – Part 1 | TechMeet360
BizTalk360
 
The Basics of Getting Started With Microsoft Azure
The Basics of Getting Started With Microsoft AzureThe Basics of Getting Started With Microsoft Azure
The Basics of Getting Started With Microsoft Azure
Microsoft Azure
 
WSO2 Charon
WSO2 CharonWSO2 Charon
WSO2 Charon
HasiniG
 
App Modernization with Microsoft Azure
App Modernization with Microsoft AzureApp Modernization with Microsoft Azure
App Modernization with Microsoft Azure
Microsoft Tech Community
 

What's hot (20)

Scim overview
Scim overviewScim overview
Scim overview
 
Migrating On-Premises DBs to Cloud Systems
Migrating On-Premises DBs to Cloud SystemsMigrating On-Premises DBs to Cloud Systems
Migrating On-Premises DBs to Cloud Systems
 
Introduction to Microsoft Azure
Introduction to Microsoft AzureIntroduction to Microsoft Azure
Introduction to Microsoft Azure
 
Microsoft azure - the cloud for modern business
Microsoft azure - the cloud for modern businessMicrosoft azure - the cloud for modern business
Microsoft azure - the cloud for modern business
 
K8s architecture meetup2- k8saraby
K8s architecture  meetup2- k8sarabyK8s architecture  meetup2- k8saraby
K8s architecture meetup2- k8saraby
 
Trust No-One Architecture For Services And Data
Trust No-One Architecture For Services And DataTrust No-One Architecture For Services And Data
Trust No-One Architecture For Services And Data
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
 
Platform Deep Dive
Platform Deep DivePlatform Deep Dive
Platform Deep Dive
 
Standardizing Identity Provisioning with SCIM
Standardizing Identity Provisioning with SCIMStandardizing Identity Provisioning with SCIM
Standardizing Identity Provisioning with SCIM
 
Introduction to Azure
Introduction to AzureIntroduction to Azure
Introduction to Azure
 
Azure security and Compliance
Azure security and ComplianceAzure security and Compliance
Azure security and Compliance
 
Enter The Matrix Securing Azure’s Assets
Enter The Matrix Securing Azure’s AssetsEnter The Matrix Securing Azure’s Assets
Enter The Matrix Securing Azure’s Assets
 
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
ITPROCEED_TransformTheDatacenter_ten most common mistakes when deploying adfs...
 
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
Meeting DFARS Requirements in AWS GovCloud (US) | AWS Public Sector Summit 2017
 
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
Raymond Comvalius & Sander Berkouwer - Bring your own device essentials with ...
 
Windows Azure Security Features And Functionality
Windows Azure Security Features And FunctionalityWindows Azure Security Features And Functionality
Windows Azure Security Features And Functionality
 
Getting started with Azure – Part 1 | TechMeet360
Getting started with Azure – Part 1 | TechMeet360Getting started with Azure – Part 1 | TechMeet360
Getting started with Azure – Part 1 | TechMeet360
 
The Basics of Getting Started With Microsoft Azure
The Basics of Getting Started With Microsoft AzureThe Basics of Getting Started With Microsoft Azure
The Basics of Getting Started With Microsoft Azure
 
WSO2 Charon
WSO2 CharonWSO2 Charon
WSO2 Charon
 
App Modernization with Microsoft Azure
App Modernization with Microsoft AzureApp Modernization with Microsoft Azure
App Modernization with Microsoft Azure
 

Viewers also liked

Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo
Lohith Goudagere Nagaraj
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
Glen Gordon
 
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Eric D. Boyd
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With OData
Bruce Johnson
 
Moni jaiswal resume
Moni jaiswal resumeMoni jaiswal resume
Moni jaiswal resume
Jaiswal Moni
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
Sanjay Patel
 
OData
ODataOData
Daniel Ridder How to RESTify your ABAP backend
Daniel Ridder How to RESTify your ABAP backendDaniel Ridder How to RESTify your ABAP backend
Daniel Ridder How to RESTify your ABAP backend
Daniel Ridder
 
OData Fundamental
OData FundamentalOData Fundamental
OData Fundamental
Kamrul Hasan
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
Woodruff Solutions LLC
 
Delivering a Linked Data warehouse and realising the power of graphs
Delivering a Linked Data warehouse and realising the power of graphsDelivering a Linked Data warehouse and realising the power of graphs
Delivering a Linked Data warehouse and realising the power of graphs
Ben Gardner
 
OData: A Standard API for Data Access
OData: A Standard API for Data AccessOData: A Standard API for Data Access
OData: A Standard API for Data Access
Pat Patterson
 
Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)
Apigee | Google Cloud
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017
Luigi Fugaro
 
Building Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRSBuilding Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRS
Derek Comartin
 
Semantic blockchain
Semantic blockchainSemantic blockchain
Semantic blockchain
Ben Gardner
 

Viewers also liked (17)

Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo Consuming Open Data using DataJS - jsFoo
Consuming Open Data using DataJS - jsFoo
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
Consuming Data From Many Platforms: The Benefits of OData - St. Louis Day of ...
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With OData
 
Moni jaiswal resume
Moni jaiswal resumeMoni jaiswal resume
Moni jaiswal resume
 
OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
OData
ODataOData
OData
 
Daniel Ridder How to RESTify your ABAP backend
Daniel Ridder How to RESTify your ABAP backendDaniel Ridder How to RESTify your ABAP backend
Daniel Ridder How to RESTify your ABAP backend
 
OData Fundamental
OData FundamentalOData Fundamental
OData Fundamental
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
 
Delivering a Linked Data warehouse and realising the power of graphs
Delivering a Linked Data warehouse and realising the power of graphsDelivering a Linked Data warehouse and realising the power of graphs
Delivering a Linked Data warehouse and realising the power of graphs
 
OData: A Standard API for Data Access
OData: A Standard API for Data AccessOData: A Standard API for Data Access
OData: A Standard API for Data Access
 
Practical OData
Practical ODataPractical OData
Practical OData
 
OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)OData Introduction and Impact on API Design (Webcast)
OData Introduction and Impact on API Design (Webcast)
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017
 
Building Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRSBuilding Self Documenting HTTP APIs with CQRS
Building Self Documenting HTTP APIs with CQRS
 
Semantic blockchain
Semantic blockchainSemantic blockchain
Semantic blockchain
 

Similar to jQuery and OData - Perfect Together

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)
David McCarter
 
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)
David McCarter
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
sumedha.r
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Services
ukdpe
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access Technologies
David Chou
 
Azure Platform
Azure Platform Azure Platform
Azure Platform
Wes Yanaga
 
Building big data solutions on azure
Building big data solutions on azureBuilding big data solutions on azure
Building big data solutions on azure
Eyal Ben Ivri
 
Windows Azure for .NET Developers
Windows Azure for .NET DevelopersWindows Azure for .NET Developers
Windows Azure for .NET Developers
llangit
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
ukdpe
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
Karen Benoit
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
ukdpe
 
WCF Data Services - Bandung Charity Event - 2010
WCF Data Services  - Bandung Charity Event - 2010WCF Data Services  - Bandung Charity Event - 2010
WCF Data Services - Bandung Charity Event - 2010
Andri Yadi
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
yoavrubin
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
TechMaster Vietnam
 
Using windows azure to develop secure and deploy cloud applications Santiago ...
Using windows azure to develop secure and deploy cloud applications Santiago ...Using windows azure to develop secure and deploy cloud applications Santiago ...
Using windows azure to develop secure and deploy cloud applications Santiago ...
Juan Pablo
 
Azure Mobile Services Workshop
Azure Mobile Services WorkshopAzure Mobile Services Workshop
Azure Mobile Services Workshop
Eran Stiller
 
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalRReal-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me AnythingDenodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo
 
SQL Azure the database in the cloud
SQL Azure the database in the cloud SQL Azure the database in the cloud
SQL Azure the database in the cloud
Eduardo Castro
 

Similar to jQuery and OData - Perfect Together (20)

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 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)
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data ServicesCreating Flexible Data Services For Enterprise Soa With Wso2 Data Services
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web ServicesTime for a REST - .NET Framework v3.5 & RESTful Web Services
Time for a REST - .NET Framework v3.5 & RESTful Web Services
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access Technologies
 
Azure Platform
Azure Platform Azure Platform
Azure Platform
 
Building big data solutions on azure
Building big data solutions on azureBuilding big data solutions on azure
Building big data solutions on azure
 
Windows Azure for .NET Developers
Windows Azure for .NET DevelopersWindows Azure for .NET Developers
Windows Azure for .NET Developers
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
 
WCF Data Services - Bandung Charity Event - 2010
WCF Data Services  - Bandung Charity Event - 2010WCF Data Services  - Bandung Charity Event - 2010
WCF Data Services - Bandung Charity Event - 2010
 
Dojo - from web page to web apps
Dojo - from web page to web appsDojo - from web page to web apps
Dojo - from web page to web apps
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 
Using windows azure to develop secure and deploy cloud applications Santiago ...
Using windows azure to develop secure and deploy cloud applications Santiago ...Using windows azure to develop secure and deploy cloud applications Santiago ...
Using windows azure to develop secure and deploy cloud applications Santiago ...
 
Azure Mobile Services Workshop
Azure Mobile Services WorkshopAzure Mobile Services Workshop
Azure Mobile Services Workshop
 
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalRReal-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalR
 
Denodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me AnythingDenodo Partner Connect: Technical Webinar - Ask Me Anything
Denodo Partner Connect: Technical Webinar - Ask Me Anything
 
SQL Azure the database in the cloud
SQL Azure the database in the cloud SQL Azure the database in the cloud
SQL Azure the database in the cloud
 

More from David Hoerster

Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?
David Hoerster
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
David Hoerster
 
CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
David Hoerster
 
Creating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnetCreating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnet
David Hoerster
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data Persistence
David Hoerster
 
Mongo Baseball .NET
Mongo Baseball .NETMongo Baseball .NET
Mongo Baseball .NET
David Hoerster
 
Freeing Yourself from an RDBMS Architecture
Freeing Yourself from an RDBMS ArchitectureFreeing Yourself from an RDBMS Architecture
Freeing Yourself from an RDBMS Architecture
David Hoerster
 
A Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed ApplicationA Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed Application
David Hoerster
 
Greenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows AzureGreenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows Azure
David Hoerster
 
Greenfield Development with CQRS
Greenfield Development with CQRSGreenfield Development with CQRS
Greenfield Development with CQRS
David Hoerster
 

More from David Hoerster (10)

Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?Elm - Could this be the Future of Web Dev?
Elm - Could this be the Future of Web Dev?
 
Reactive Development: Commands, Actors and Events. Oh My!!
Reactive Development: Commands, Actors and Events.  Oh My!!Reactive Development: Commands, Actors and Events.  Oh My!!
Reactive Development: Commands, Actors and Events. Oh My!!
 
CQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NETCQRS Evolved - CQRS + Akka.NET
CQRS Evolved - CQRS + Akka.NET
 
Creating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnetCreating scalable message driven solutions akkadotnet
Creating scalable message driven solutions akkadotnet
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data Persistence
 
Mongo Baseball .NET
Mongo Baseball .NETMongo Baseball .NET
Mongo Baseball .NET
 
Freeing Yourself from an RDBMS Architecture
Freeing Yourself from an RDBMS ArchitectureFreeing Yourself from an RDBMS Architecture
Freeing Yourself from an RDBMS Architecture
 
A Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed ApplicationA Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed Application
 
Greenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows AzureGreenfield Development with CQRS and Windows Azure
Greenfield Development with CQRS and Windows Azure
 
Greenfield Development with CQRS
Greenfield Development with CQRSGreenfield Development with CQRS
Greenfield Development with CQRS
 

Recently uploaded

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 

Recently uploaded (20)

みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 

jQuery and OData - Perfect Together

  • 1. jQuery and ODataPerfect Together David Hoerster Co-Founder, BrainCredits.com david@braincredits.com
  • 2. About Me C# MVP (April 2011) Co-Founder of BrainCredits (braincredits.com) Senior Technical Director for Resources Global Professionals President of Pittsburgh .NET Users Group Organizer of recent Pittsburgh Code Camps Twitter - @DavidHoerster Blog – http://geekswithblogs.net/DavidHoerster Email – david@braincredits.com
  • 3. Agenda Quick overview of WCF Data Services and OData Getting data from a WCF Data Service Fiddler, LINQPad, web apps Calling WCF Data Services and Custom Service Methods via jQuery Using datajs as a client library datajs as a caching client JSONP Optional: Other uses for your data context
  • 4. WCF Data Services – What? Allows you to expose or consume data over HTTP using REST Uses the Open Data Protocol (OData) Data exposed as resources addressable as URIs Data is an underlying model of some sort Entity Data Model (easiest) LINQ to SQL Custom entity classes (roll your own provider)
  • 5. WCF Data Services – Why? Consistency Accepted format for data transport (OData) Navigate relationships Simple configuration in code Growing support for OData format
  • 6. WCF Data Services – OData OData can be exposed in one of two formats Atom (XML) JSON (text) Data itself is exposed as one or more feeds Individual items in a feed are entries OData is published by Microsoft and is an open source specification Allows other parties to create consumers and producers of OData feeds
  • 7. WCF Data Services Demo – Getting Data from a WCF Data Service
  • 8. WCF Data Services Getting data from a service – WRAP-UP Understanding the URI’s XML vs. JSON size JSON structure Using jQuery to iterate through results Getting the next set of results
  • 9. WCF Data Services w/ Web Apps You can create custom service operations You can use GET or POSTs with custom service operations Security still holds true SetServiceOperationAccessRule Custom Service Operations support returning void primitive Entity IEnumerable IQueryable
  • 10. WCF Data Services w/ jQuery DEMO – Custom service methods and performing updates
  • 11. Connecting WCF DS w/ jQuery Simple web app – WRAP-UP Custom service methods Inserts, updates, deletes Custom Operations honor OData keywords
  • 12. DataJS Recently moved from Alpha to 1.0 Available via CodePlex Also, NuGet package (search ‘datajs’) Provides cross-browser support to connect to data sources Currently just supports OData services Provides helpers to caching data via remote services or local storage Supports JSON and Atom formats
  • 13. DataJS w/ JSON Reading data OData.read(…) “Data” returned is at that ‘d’ level Doesn’t exist with datajs – needs to be handled with raw wcf data service calls Writing data OData.request(…) Supports POST/PUT/MERGE/DELETE Data variables don’t have to be pure JSON – datajs will format Supports batching requests
  • 14. DataJS - Caching DataJS provides a simple caching mechanism createCache allows you to create named caches You can read from them You can clear them More advanced functionality See the Netflix example from datajs site
  • 15. JSONP WCF Data Services don’t support JSONP by default Need JSONPDefaultBehaviorAttribute Need also to set specific parameters in request $format $callback
  • 16. Using WCF Data ServicesWith jqGrid Probably easiest to set up either a WCF REST service or a MVC Action Method to retrieve the data. WCF Data Service Custom Operations expect the string arguments to be surrounded by single quotes (‘). jqGrid doesn’t send params like this. Service Operations expect either void, primitive, Entity, IEnumerable, IQueryable jqGrid requires special props to be returned row, total, etc.
  • 17. Resources BrainCredits Link:http://www.braincredits.com/Lesson/16854 datajs site: http://datajs.codeplex.com/ JSONPSupportBehavior Attribute: http://go.microsoft.com/fwlink/?LinkId=208228 jqGrid site: http://www.trirand.com/blog/ OData site: www.odata.org