Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

25
Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications NDC LONDON CHRIS WOODRUFF

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 of Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Page 1: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Learning How to Shape and Configure an OData Feed for High Performing Web Sites and ApplicationsNDC LONDON

CHRIS WOODRUFF

Page 2: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Hi, I’m Woody!Chris Woodruff

[email protected]

http://chriswoodruff.com

http://deepfriedbytes.com

twitter @cwoodruff

Page 3: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

VALIDATION CLIENT SIDEBEST PRACTICES

AGENDA

www.chriswoodruff.com Page Number 3

Page 4: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

What are the 2 Sides of OData?SERVER-SIDE (PRODUCER) CLIENT-SIDE (CONSUMER)

www.chriswoodruff.com Page Number 4

Page 5: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Server Side for OData

www.chriswoodruff.com Page Number 5

Page 6: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 7: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Get to know the OData Protocol!!!

www.chriswoodruff.com Page Number 7

Page 8: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Configuration Settings

www.chriswoodruff.com Page Number 8

Page 9: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Query Projection

www.chriswoodruff.com Page Number 9

Page 10: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Server Side Paging

www.chriswoodruff.com Page Number 10

Page 11: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

How to get DateTimeworking in WeB API OData

Page 12: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 13: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 14: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 15: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Demo

www.chriswoodruff.com Page Number 15

Page 16: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Client Side for OData

www.chriswoodruff.com Page Number 16

Page 17: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 18: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 19: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 20: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Demo

www.chriswoodruff.com Page Number 20

Page 21: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

Why are we excited!!

Page 22: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 23: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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

Page 24: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

THANK YOU

Find me around the conference and would enjoy chatting

www.chriswoodruff.com Page Number 24

Email: [email protected]

Twitter: @cwoodruff

Page 25: Learning How to Shape and Configure an OData Feed for High Performing Web Sites and Applications

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