schema-free microsoft azure development

10
SCHEMA-FREE AZURE DEVELOPMENT By Example. C# code available from http://ingehenriksen.wordpress.com

Upload: inge-henriksen

Post on 19-Jul-2015

30 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Schema-free Microsoft Azure development

SCHEMA-FREE AZURE

DEVELOPMENTBy Example.

C# code available from

http://ingehenriksen.wordpress.com

Page 2: Schema-free Microsoft Azure development

AZURE SCHEMA-FREE DATABASES

Windows Azure Storage:

Table storage NoSQL database.

Massively scalable and Big Data capable (500 TB/Storage account).

REST API (OData).

Strongly typed .NET storage client object model.

http://azure.microsoft.com/en-us/documentation/services/storage/

NuGet: Install-Package WindowsAzure.Storage -Version 4.3.0

C# code available from http://ingehenriksen.wordpress.com

Page 3: Schema-free Microsoft Azure development

AZURE SCHEMA-FREE DATABASES

Windows DocumentDB(released April ‘15):

JSON document NoSQL database.

1 TB/database.

REST API.

Strongly typed .NET storage client object model.

«SQL-like» declerative query syntax.

Supports dynamically typed declerative queries.

http://azure.microsoft.com/en-us/services/documentdb/

NuGet: Install-Package Microsoft.Azure.DocumentDB

C# code available from http://ingehenriksen.wordpress.com

Page 4: Schema-free Microsoft Azure development

SCHEMA-FREE ADVANTAGES

Boost developer performance:

No need for database schema defintions.

No need for Object-relational mappings (ORMs).

No need for manual entity definitions in code.

C# code available from http://ingehenriksen.wordpress.com

Page 5: Schema-free Microsoft Azure development

THE OPTIMAL SOLUTION

Create tables on the fly.

Create table rows on the fly.

Create entity properties on the fly.

Support all data types.

…Solved using Dynamic Typing.

C# code available from http://ingehenriksen.wordpress.com

Page 6: Schema-free Microsoft Azure development

IMPLEMENTING DYNAMIC TYPING

Inherit DynStorage from System.Dynamic.DynamicObject.

Implement TryGetMember().

Create a table object by table name.

C# code available from http://ingehenriksen.wordpress.com

Page 7: Schema-free Microsoft Azure development

IMPLEMENTING DYNAMIC TYPING

Inherit DynTable from System.Dynamic.DynamicObject.

Implement TryGetMember().

Create an entity object by partition key

(primary key) and rowkey.

C# code available from http://ingehenriksen.wordpress.com

Page 8: Schema-free Microsoft Azure development

IMPLEMENTING DYNAMIC TYPING

Inherit DynTableEntity from System.Dynamic.DynamicObject, ITableEntity, and

Idictionary<string, EntityProperty>.

Implement TryGetMember().

Fetch entity property from dictionary.

Implement Save() method.

C# code available from http://ingehenriksen.wordpress.com

Page 9: Schema-free Microsoft Azure development

IMPLEMENTING DYNAMIC TYPING

Implement dictionary EntityProperty().

Write TableQuery() using partitionkey and

rowkey.

Implement TryGetMember().

Create an entity object by partition key

(primary key) and rowkey.

C# code available from http://ingehenriksen.wordpress.com

Page 10: Schema-free Microsoft Azure development

THANK YOU FOR YOUR TIME!

Get started at

http://azure.microsoft.com/en-us/downloads/

Inge Henriksen

http://ingehenriksen.wordpress.com