learning how to shape and configure an odata feed for high performing web sites and applications
DESCRIPTION
You have all sat through the simple WCF Data Service or ASP.NET Web API introductory sessions multiple times and they are valuable but it is time to learn how to really leverage that WCF knowledge and learn how to build and produce valuable OData feeds which will allow your applications usability to sizzle. At the same time you will learn how OData is built for high performance and security. Chris Woodruff will teach and give deep knowledge into the configuration and extensibility of the Web API/OData feed. It will also teach developers to secure their feeds through multiple user authentications such as OAuth, Windows and Forms Authentication.TRANSCRIPT
Learning How to Shape and Configure an OData Feed for High Performing Web Sites and ApplicationsNDC LONDON
CHRIS WOODRUFF
Hi, I’m Woody!Chris Woodruff
http://chriswoodruff.com
http://deepfriedbytes.com
twitter @cwoodruff
VALIDATION CLIENT SIDEBEST PRACTICES
AGENDA
www.chriswoodruff.com Page Number 3
What are the 2 Sides of OData?SERVER-SIDE (PRODUCER) CLIENT-SIDE (CONSUMER)
www.chriswoodruff.com Page Number 4
Server Side for OData
www.chriswoodruff.com Page Number 5
BEST PRACTICES
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
www.chriswoodruff.com Page Number 6
Get to know the OData Protocol!!!
www.chriswoodruff.com Page Number 7
Configuration Settings
www.chriswoodruff.com Page Number 8
Query Projection
www.chriswoodruff.com Page Number 9
Server Side Paging
www.chriswoodruff.com Page Number 10
How to get DateTimeworking in WeB API OData
VALIDATION AND FILTERING
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
www.chriswoodruff.com Page Number 12
ODATA ATTRIBUTES
NotExpandableRepresents an Attribute that can be placed on a property to specify be used in the $expand OData query option.
05
NotNavigableRepresents an Attribute that can be placed on a property to specify that the property cannot be navigated in OData query.
06
NotSortableRepresents an attribute that can be placed on a property to specify that the property cannot be used in the $orderby OData query option.
07
NonFilterableRepresents an Attribute that can be placed on a property to specify that the property cannot be used in the $filter OData query option.
01
UnSortableRepresents an Attribute that can be placed on a property to specify that the property cannot be used in the $orderby OData query option.
02
NotExpandableRepresents an Attribute that can be placed on a property to specify that the property cannot be used in the $expand OData query option.
03
NotCountableRepresents an Attribute that can be placed on a property to specify that the $count cannot be applied on the property.
04
[NonFilterable]
[Unsortable]
public string Name { get; set; }
www.chriswoodruff.com Page Number 13
VALIDATION PATHS
Filter QueryRepresents a validator used to validate a
FilterQueryOption based on the
ODataValidationSettings.
Order By QueryRepresents a validator used to validate an
OrderByQueryOption based on the
ODataValidationSettings.
OData QueryRepresents a validator used to validate OData queries
based on the ODataValidationSettings.
Select Expand QueryRepresents a validator used to validate a
SelectExpandQueryOption based on the
ODataValidationSettings.
Skip QueryRepresents a validator used to validate a
SkipQueryOption based on the
ODataValidationSettings.
Top QueryRepresents a validator used to validate a
TopQueryOption based on the
ODataValidationSettings.
www.chriswoodruff.com Page Number 14
Demo
www.chriswoodruff.com Page Number 15
Client Side for OData
www.chriswoodruff.com Page Number 16
DEBUGGING/TESTING
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
www.chriswoodruff.com Page Number 17
XODATAWeb-based OData Visualizer
FIDDLERFree web debugging tool which logs all HTTP(S) traffic between
your computer and the Internet.
LINQPADInteractively query SQL
databases (among other data sources such as OData or WCF Data Services) using LINQ, as
well as interactively writing C# code without the need for an
IDE.
ODATA VALIDATOR
Enable OData service authors to validate their
implementation against the OData specification to ensure the service interoperates well
with any OData client.
TESTING/DEBUGGING ODATA
www.websitename.comwww.chriswoodruff.com Page Number 18
CONSUMING ODATA
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
Lid est laborum dolo rumes fugats untras.
Etharums ser quidem rerum facilis dolores
nemis
www.chriswoodruff.com Page Number 19
Demo
www.chriswoodruff.com Page Number 20
Why are we excited!!
GITHUB
http://github.com/cwoodruffProject:
Configure-OData-High-Performing-Apps
Where can you find the source for this talk?
www.chriswoodruff.com Page Number 22
ODATA WORKSHOP
0102
0304
TESTING/DEBUGGING ODATA
DEVELPING CLIENT SIDE SOLUTIONS• Web Apps using Javascript to consume Odata• iOS Swift development for native iPhone and iPad
apps• Windows 8.1 and Windows Phone apps C# and WinJS• Android development using Java• Using Xamarin for consuming OData
LEARNING THE PROTOCOL• The Metadata and Service Model of OData
• URI Conventions of OData• Format Conventions of OData
• OData HTTP Conventions and Operations
DEVELPING SERVER SIDE SOLUTIONS• ASP.NET Web API
• Advanced Performance Tips and Best Practices
www.chriswoodruff.com Page Number 23
Go to http://ChrisWoodruff.com for more details and pricing
THANK YOU
Find me around the conference and would enjoy chatting
www.chriswoodruff.com Page Number 24
Email: [email protected]
Twitter: @cwoodruff
Credits• Security Icon designed by Thibault Geffroy from the Noun Project
• Check Mark Icon designed by Rafaël Massé from the Noun Project
• Test Icon designed by ChangHoon Baek from the Noun Project
• Question Icon designed by Stefano Vetere from the Noun Project
www.chriswoodruff.com Page Number 25