SlideShare une entreprise Scribd logo
1  sur  44
Vagif Abilov
Miles AS
vagif.abilov@gmail.com
@ooobject
github: object
http://bloggingabout.net/blogs/vagif/
 OData  and REST
 WCF Data Services
 OData feed in 5 minutes: EF + MS SQL
 The power of ObjectContext
 Using reflection provider
 Using custom providers and NoSQL
 Extending OData services
 Performance and diagnostics
 A song about OData
Are you familiar with OData?

 Have you used OData in your projects?

Do you have components on your machine
     that use OData communication?
 The Open Data Protocol (OData) is a Web
  protocol for querying and updating data
 Consumers query a datasource over HTTP
  and get results back in formats like
  AtomPub, JSON or plain XML
 OData follows many of the principles of
  REST
Querying NuGet feed with LINQPad

Importing data from OData feed into
 Microsoft Excel using PowerPivot
 Command   content specified in URIs
 Use of HTTP verbs (GET, POST, PUT,
  DELETE)
 Use of HTTP status codes
 Response sent as XML (AtomPub) or
  JSON
 Related content specified using link
  elements
Hypermedia


  HTTP


   URI
Method   Safe   Idempotent
GET      Yes       Yes
POST     No        No
PUT      No        Yes
DELETE   No        Yes
http://localhost:50555/InMemory.svc/
Customers('ALFKI')

http://localhost:50555/InMemory.svc/
Customers()?$filter=CompanyName eq
'Alfreds Futterkiste„

http://localhost:50555/InMemory.svc/
Customers()?$expand=Orders
http://localhost.:50555/InMemory.svc/
Customers
<entry term="Northwind.InMemory.Customers" />
 <content type="application/xml">
  <m:properties>
    <d:CompanyName>My
Company</d:CompanyName>
    <d:CustomerID>TEMP</d:CustomerID>
  </m:properties>
 </content>
</entry>
http://localhost.:50555/InMemory.svc/
Customers(„TEMP')
<entry term="Northwind.InMemory.Customers" />
 <content type="application/xml">
  <m:properties>
    <d:CompanyName>My New
Company</d:CompanyName>
    <d:CustomerID>TEMP</d:CustomerID>
  </m:properties>
 </content>
</entry>
http://localhost.:50555/InMemory.svc/
Customers(„TEMP')
Request: a company with non-existing
CompanyName

Response: an empty collection

Request: a company with non-existing
CompanyID

Response: 404 Not Found
var ctx = new NorthwindContext("http://localhost.:50555/InMemory.svc");
ctx.IgnoreResourceNotFoundException = true;
var customers =
         from c in ctx.Customers
         where c.CustomerID == "XYZ"
         select c;
 Formerly ADO.NET    Data Services
 Codename “Astoria”
 OData provider library for .NET
 Not to be confused with WCF RIA Services
  designed specifically for end-to-end
  Silverlight and ASP.NET applications
 Using Entity Framework provider
  • EF model first+ MS SQL – trivial
  • EF code first, different DB vendors – easy
 Using reflection provider
  • Any context exposing a set of IQueryable
    properties – easy
  • Implementing IUpdatable for updatable OData
    feeds – easy
 Using custom provider
  • OData provider toolkit usually helps – still complex
public class EntityFrameworkModelFirstMsSql :
DataService<NorthwindMsSqlContext>
{
  public static void InitializeService(DataServiceConfiguration config)
  {
     config.SetEntitySetAccessRule("*", EntitySetRights.All);
     config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
     config.DataServiceBehavior.MaxProtocolVersion =
DataServiceProtocolVersion.V2;
  }

    protected override NorthwindMsSqlContext CreateDataSource()
    {
      return new NorthwindMsSqlContext(/* connection string */);
    }
}
 As simple as with MS SQL assuming EF
  provider for the respective vendor is
  available
 Proven choice: Devart dotConnect product
  family:
  • Oracle
  • MySQL
  • PostgreSQL
  • SQLite
 Not supported by tools
 EDMX is just an XML file with 3 main
  sections:
  • Conceptual model (CSDL)
  • Storage model (SSDL)
  • Mapping (MSL)
 You   can author your own EF model:
  • Support for n database vendors
  • 2n + 1 XML sections (1 CSDL + n SSDL + n MSL)
 DbContext   class, wraps ObjectContext
 Model is generated from entities
 Database can be generated from the
  model
 Convention over configuration reduces
  configuration code to bare minimum
 No more trick to share conceptual model
  between databases from different vendors
public class NorthwindContextBase : DbContext
{
  public ObjectContext ObjectContext
  {
     get { return (this as IObjectContextAdapter).ObjectContext; }
  }
}

public class EntityFrameworkCodeFirstMsSql : DataService<ObjectContext>
{
  protected override ObjectContext CreateDataSource()
  {
     var ctx = new NorthwindContext("NorthwindContext.EF.CF.MsSql");
     return ctx.ObjectContext;
  }
}
 Suitable for most of scenarios with static
  resource set information (schema known
  at compile time)
 Resource sets exposed as IQueryable<T>
  properties of the context class
 DataServiceKey attribute specifies entity
  key
 Optional support for IUpdatable
OData feed exposing
in-memory data collection

  OData feed using
 NHibernate to access
  MS SQL database
 Entity Framework provider is the quickest
  way to add OData feed on the top of a
  popular SQL database
 Reflection provider covers most of other
  scenarios when the data schema is known
  up-front
 Custom provider is needed when the
  schema is discovered at runtime or data
  don‟t have fixed types
 If the content of NoSQL database is known
  at compile time, reflection provider can be
  used
 If the content of NoSQL database is
  divided into collections of fixed types, the
  resource sets can be built at runtime
 If the content is untyped, OData feed can
  still be built using open types
Creating OData feed for MongoDB
    using WCF Data Services
   and OData Provider Toolkit
 OData   data model supports open types for
  Entries. An entry of an open type may
  have extra properties (dynamic properties)
  in addition to those statically declared in
  metadata
 WCF Data Services framework takes care
  of transforming the incoming requests into
  an expression tree. Custom code is
  responsible for evaluation expression tree
  against the data store
 Custom   service operations can only use
  HTTP GET and POST
 Generated client context code does not
  include custom service operations – it has
  to be added manually
 Default webHttpBinding settings may not
  be sufficient for large payload
  (send/receiveTimeout, maxBufferSize and
  maxStringContentLength often need to be
  increased)
[WebInvoke(Method = "POST")]
public void DeleteProductsByNamePattern(string namePattern)
{
  this.CurrentDataSource.ExecuteStoreCommand(
         string.Format("DELETE FROM Products WHERE
         ProductName LIKE '{0}%'", namePattern));
}
public void DeleteProductsByNamePattern(string namePattern)
{
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(
     string.Format("{0}/DeleteProductsByNamePattern?namePattern={1}",
               this.BaseUri, namePattern));
  request.Method = "POST";
  request.Accept = "application/atom+xml,application/xml";
  request.ContentType = "application/atom+xml";
  request.ContentLength = 0;
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
}
 OData  design goal is to provide data
  publishing protocol for services, not for
  low-level components
 Don‟t use OData to implement cascaded
  updates and deletes of large number of
  dependent entities
 Understand the difference between client-
  side and server-side operations
 LINQPad   (LINQ to OData)
 Fiddler
 RedGate   .NET Reflector Pro (to step-in to
  WCF Data Services code)
 Oren Eini‟s profilers (EF Profiler,
  NHibernate Profiler)
 Elmah logging framework (install it using
  NuGet, it will update your web.config)
 Don‟t reinvent the wheel, don‟t come with
  your own standards
 Consider OData to expose data sources
  on the Web
 Don‟t treat OData as a SQL database
  publisher
 Writing OData feeds is easy
 Code   examples for this presentation:
  https://github.com/object/
  NorthwindOData
 Open Data Protocol:
  http://www.odata.org/
  http://www.odata.org/mailing-list
 WCF Data Services forum:
  http://social.msdn.microsoft.com/Forums/e
  n/adodotnetdataservices/
 WCF    Data Services Toolkit:
  http://wcfdstoolkit.codeplex.com/
 Microsoft WCF Data Services March 2011
  CTP 2 for .NET Framework 4 and
  Silverlight 4:
  http://www.microsoft.com/downloads/en/de
  tails.aspx?FamilyID=60fb0117-8cea-4359-
  b392-6b04cdc821be
OData!
(Lennon – McCartney)
OData! Please relieve me
AtomPub is what I‟m gonna need
Believe me when I tell you:
AtomPub is what I‟m gonna need
OData! Please relieve me
JSON‟s what I want in JavaScript
Believe me when I tell you:
JSON‟s what I want in JavaScript
When you told me:
“Internal error 500”
Oh well you know,
I nearly broke down and cried

When you told me:
“Internal error 501”
Oh well you know,
I nearly broke down and died
OData! Please relieve me
I want to live a RESTful life
Believe me when I tell you:
I want to live a RESTful life
 Vagif  Abilov
 Miles AS
 vagif.abilov@gmail.com
 @ooobject
 github: object
 http://bloggingabout.net/blogs/vagif/

Contenu connexe

Tendances

OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePointSanjay Patel
 
SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesAshish Saxena
 
UI5Con presentation on UI5 OData V4 Model
UI5Con presentation on UI5 OData V4 ModelUI5Con presentation on UI5 OData V4 Model
UI5Con presentation on UI5 OData V4 ModelPatric Ksinsik
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Alok Chhabria
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST APINishanth Kadiyala
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with ODataTodd Anglin
 
Open Data Protocol (OData)
Open Data Protocol (OData)Open Data Protocol (OData)
Open Data Protocol (OData)Pistoia Alliance
 
Modern REST APIs for Enterprise Databases - OData
Modern REST APIs for Enterprise Databases - ODataModern REST APIs for Enterprise Databases - OData
Modern REST APIs for Enterprise Databases - ODataNishanth Kadiyala
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning ConnectPrasanna Deshpande ☁
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developersGlen Gordon
 
Introduction to External Objects and the OData Connector
Introduction to External Objects and the OData ConnectorIntroduction to External Objects and the OData Connector
Introduction to External Objects and the OData ConnectorSalesforce Developers
 
Deploying RDF Linked Data via Virtuoso Universal Server
Deploying RDF Linked Data via Virtuoso Universal ServerDeploying RDF Linked Data via Virtuoso Universal Server
Deploying RDF Linked Data via Virtuoso Universal Serverrumito
 
Odata - Open Data Protocol
Odata - Open Data ProtocolOdata - Open Data Protocol
Odata - Open Data ProtocolKhaled Musaied
 
OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionEugenio Lentini
 
JSON and the Oracle Database
JSON and the Oracle DatabaseJSON and the Oracle Database
JSON and the Oracle DatabaseMaria Colgan
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
APEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveAPEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveJohnSnyders
 
Solving Real Problems Using Linked Data
Solving Real Problems Using Linked DataSolving Real Problems Using Linked Data
Solving Real Problems Using Linked Datarumito
 

Tendances (20)

OData and SharePoint
OData and SharePointOData and SharePoint
OData and SharePoint
 
SAP ODATA Overview & Guidelines
SAP ODATA Overview & GuidelinesSAP ODATA Overview & Guidelines
SAP ODATA Overview & Guidelines
 
UI5Con presentation on UI5 OData V4 Model
UI5Con presentation on UI5 OData V4 ModelUI5Con presentation on UI5 OData V4 Model
UI5Con presentation on UI5 OData V4 Model
 
Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications Odata V4 : The New way to REST for Your Applications
Odata V4 : The New way to REST for Your Applications
 
OData - The Universal REST API
OData - The Universal REST APIOData - The Universal REST API
OData - The Universal REST API
 
OData Fundamental
OData FundamentalOData Fundamental
OData Fundamental
 
Building RESTful Applications with OData
Building RESTful Applications with ODataBuilding RESTful Applications with OData
Building RESTful Applications with OData
 
Open Data Protocol (OData)
Open Data Protocol (OData)Open Data Protocol (OData)
Open Data Protocol (OData)
 
Modern REST APIs for Enterprise Databases - OData
Modern REST APIs for Enterprise Databases - ODataModern REST APIs for Enterprise Databases - OData
Modern REST APIs for Enterprise Databases - OData
 
OData, External objects & Lightning Connect
OData, External objects & Lightning ConnectOData, External objects & Lightning Connect
OData, External objects & Lightning Connect
 
OData Services
OData ServicesOData Services
OData Services
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Introduction to External Objects and the OData Connector
Introduction to External Objects and the OData ConnectorIntroduction to External Objects and the OData Connector
Introduction to External Objects and the OData Connector
 
Deploying RDF Linked Data via Virtuoso Universal Server
Deploying RDF Linked Data via Virtuoso Universal ServerDeploying RDF Linked Data via Virtuoso Universal Server
Deploying RDF Linked Data via Virtuoso Universal Server
 
Odata - Open Data Protocol
Odata - Open Data ProtocolOdata - Open Data Protocol
Odata - Open Data Protocol
 
OData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introductionOData, Open Data Protocol. A brief introduction
OData, Open Data Protocol. A brief introduction
 
JSON and the Oracle Database
JSON and the Oracle DatabaseJSON and the Oracle Database
JSON and the Oracle Database
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
APEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep DiveAPEX Office Hours Interactive Grid Deep Dive
APEX Office Hours Interactive Grid Deep Dive
 
Solving Real Problems Using Linked Data
Solving Real Problems Using Linked DataSolving Real Problems Using Linked Data
Solving Real Problems Using Linked Data
 

En vedette

Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataChris Whealy
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universesSumit Sarkar
 
Odata introduction-slides
Odata introduction-slidesOdata introduction-slides
Odata introduction-slidesMasterCode.vn
 
OData Hackathon Challenge
OData Hackathon ChallengeOData Hackathon Challenge
OData Hackathon ChallengeSumit Sarkar
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With ODataBruce Johnson
 
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
 
Moni jaiswal resume
Moni jaiswal resumeMoni jaiswal resume
Moni jaiswal resumeJaiswal Moni
 
jQuery and OData - Perfect Together
jQuery and OData - Perfect TogetherjQuery and OData - Perfect Together
jQuery and OData - Perfect TogetherDavid Hoerster
 
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Doris Chen
 
20120306 meetup scrum
20120306 meetup scrum20120306 meetup scrum
20120306 meetup scrumczras
 
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 backendDaniel Ridder
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 

En vedette (16)

Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
 
Odata
OdataOdata
Odata
 
OData and the future of business objects universes
OData and the future of business objects universesOData and the future of business objects universes
OData and the future of business objects universes
 
Odata introduction-slides
Odata introduction-slidesOdata introduction-slides
Odata introduction-slides
 
OData Hackathon Challenge
OData Hackathon ChallengeOData Hackathon Challenge
OData Hackathon Challenge
 
Setting Your Data Free With OData
Setting Your Data Free With ODataSetting Your Data Free With OData
Setting Your Data Free With OData
 
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 ...
 
Moni jaiswal resume
Moni jaiswal resumeMoni jaiswal resume
Moni jaiswal resume
 
OData
ODataOData
OData
 
jQuery and OData - Perfect Together
jQuery and OData - Perfect TogetherjQuery and OData - Perfect Together
jQuery and OData - Perfect Together
 
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
Develop Netflix Movie Search App using jQuery, OData, JSONP and Netflix Techn...
 
20120306 meetup scrum
20120306 meetup scrum20120306 meetup scrum
20120306 meetup scrum
 
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
 
Breaking down data silos with OData
Breaking down data silos with ODataBreaking down data silos with OData
Breaking down data silos with OData
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Sap abap on hana
Sap abap on hanaSap abap on hana
Sap abap on hana
 

Similaire à Practical OData

ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Servicesukdpe
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
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 Servicesukdpe
 
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
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actionsAren Zomorodian
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIGert Drapers
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataPace Integration
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
Wcf data services
Wcf data servicesWcf data services
Wcf data servicesEyal Vardi
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaSonu Vishwakarma
 
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 Servicessumedha.r
 
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 Servicesukdpe
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 

Similaire à Practical OData (20)

ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
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
 
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)
 
Web Technologies - forms and actions
Web Technologies -  forms and actionsWeb Technologies -  forms and actions
Web Technologies - forms and actions
 
Data access
Data accessData access
Data access
 
Building RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPIBuilding RESTfull Data Services with WebAPI
Building RESTfull Data Services with WebAPI
 
MuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and ODataMuleSoft London Community February 2020 - MuleSoft and OData
MuleSoft London Community February 2020 - MuleSoft and OData
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Wcf data services
Wcf data servicesWcf data services
Wcf data services
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
 
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
 
PPT
PPTPPT
PPT
 
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
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
 
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
 
Olap
OlapOlap
Olap
 

Plus de Vagif Abilov

А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?Vagif Abilov
 
Cross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesCross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesVagif Abilov
 
Staying Close to Experts with Executable Specifications
Staying Close to Experts with Executable SpecificationsStaying Close to Experts with Executable Specifications
Staying Close to Experts with Executable SpecificationsVagif Abilov
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesVagif Abilov
 
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Vagif Abilov
 
Путь к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийПуть к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийVagif Abilov
 
F# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeF# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeVagif Abilov
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in ActionVagif Abilov
 

Plus de Vagif Abilov (8)

А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?А нам-то зачем функциональное программирование?
А нам-то зачем функциональное программирование?
 
Cross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class LibrariesCross-platform Mobile Development using Portable Class Libraries
Cross-platform Mobile Development using Portable Class Libraries
 
Staying Close to Experts with Executable Specifications
Staying Close to Experts with Executable SpecificationsStaying Close to Experts with Executable Specifications
Staying Close to Experts with Executable Specifications
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#Typed? Dynamic? Both! Cross-platform DSLs in C#
Typed? Dynamic? Both! Cross-platform DSLs in C#
 
Путь к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификацийПуть к чистому и компактному коду исполняемых спецификаций
Путь к чистому и компактному коду исполняемых спецификаций
 
F# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of LifeF# in Action: Playing Functional Conway's Game of Life
F# in Action: Playing Functional Conway's Game of Life
 
Executable Specifications in Action
Executable Specifications in ActionExecutable Specifications in Action
Executable Specifications in Action
 

Dernier

Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxStephen Palm
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...baharayali
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Bassem Matta
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
Amil baba in uk amil baba in Australia amil baba in canada
Amil baba in uk amil baba in Australia amil baba in canadaAmil baba in uk amil baba in Australia amil baba in canada
Amil baba in uk amil baba in Australia amil baba in canadaamil baba kala jadu
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Naveed Bangali
 
Tremble song lyrics Powerpoint church music
Tremble song lyrics Powerpoint church musicTremble song lyrics Powerpoint church music
Tremble song lyrics Powerpoint church musicmaynjc
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiAmil Baba Mangal Maseeh
 
Do You Think it is a Small Matter- David’s Men.pptx
Do You Think it is a Small Matter- David’s Men.pptxDo You Think it is a Small Matter- David’s Men.pptx
Do You Think it is a Small Matter- David’s Men.pptxRick Peterson
 
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Study of the Psalms Chapter 1 verse 1 by wanderean
Study of the Psalms Chapter 1 verse 1 by wandereanStudy of the Psalms Chapter 1 verse 1 by wanderean
Study of the Psalms Chapter 1 verse 1 by wandereanmaricelcanoynuay
 
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证jdkhjh
 
black magic specialist amil baba pakistan no 1 Black magic contact number rea...
black magic specialist amil baba pakistan no 1 Black magic contact number rea...black magic specialist amil baba pakistan no 1 Black magic contact number rea...
black magic specialist amil baba pakistan no 1 Black magic contact number rea...Amil Baba Mangal Maseeh
 
Unity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfUnity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfRebeccaSealfon
 
Understanding Jainism Beliefs and Information.pptx
Understanding Jainism Beliefs and Information.pptxUnderstanding Jainism Beliefs and Information.pptx
Understanding Jainism Beliefs and Information.pptxjainismworldseo
 

Dernier (20)

🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar🔝9953056974 🔝young Delhi Escort service Vinay Nagar
🔝9953056974 🔝young Delhi Escort service Vinay Nagar
 
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptxCulture Clash_Bioethical Concerns_Slideshare Version.pptx
Culture Clash_Bioethical Concerns_Slideshare Version.pptx
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...Topmost Black magic specialist in Saudi Arabia  Or Bangali Amil baba in UK Or...
Topmost Black magic specialist in Saudi Arabia Or Bangali Amil baba in UK Or...
 
Sawwaf Calendar, 2024
Sawwaf Calendar, 2024Sawwaf Calendar, 2024
Sawwaf Calendar, 2024
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
young Call girls in Dwarka sector 3🔝 9953056974 🔝 Delhi escort Service
young Call girls in Dwarka sector 3🔝 9953056974 🔝 Delhi escort Serviceyoung Call girls in Dwarka sector 3🔝 9953056974 🔝 Delhi escort Service
young Call girls in Dwarka sector 3🔝 9953056974 🔝 Delhi escort Service
 
Amil baba in uk amil baba in Australia amil baba in canada
Amil baba in uk amil baba in Australia amil baba in canadaAmil baba in uk amil baba in Australia amil baba in canada
Amil baba in uk amil baba in Australia amil baba in canada
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Tremble song lyrics Powerpoint church music
Tremble song lyrics Powerpoint church musicTremble song lyrics Powerpoint church music
Tremble song lyrics Powerpoint church music
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in KarachiNo.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
No.1 Amil baba in Pakistan amil baba in Lahore amil baba in Karachi
 
Do You Think it is a Small Matter- David’s Men.pptx
Do You Think it is a Small Matter- David’s Men.pptxDo You Think it is a Small Matter- David’s Men.pptx
Do You Think it is a Small Matter- David’s Men.pptx
 
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Greater Kailash Delhi 💯Call Us 🔝8264348440🔝
 
Study of the Psalms Chapter 1 verse 1 by wanderean
Study of the Psalms Chapter 1 verse 1 by wandereanStudy of the Psalms Chapter 1 verse 1 by wanderean
Study of the Psalms Chapter 1 verse 1 by wanderean
 
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
原版1:1复刻莫纳什大学毕业证Monash毕业证留信学历认证
 
black magic specialist amil baba pakistan no 1 Black magic contact number rea...
black magic specialist amil baba pakistan no 1 Black magic contact number rea...black magic specialist amil baba pakistan no 1 Black magic contact number rea...
black magic specialist amil baba pakistan no 1 Black magic contact number rea...
 
Unity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdfUnity is Strength 2024 Peace Haggadah + Song List.pdf
Unity is Strength 2024 Peace Haggadah + Song List.pdf
 
Understanding Jainism Beliefs and Information.pptx
Understanding Jainism Beliefs and Information.pptxUnderstanding Jainism Beliefs and Information.pptx
Understanding Jainism Beliefs and Information.pptx
 

Practical OData

  • 1. Vagif Abilov Miles AS vagif.abilov@gmail.com @ooobject github: object http://bloggingabout.net/blogs/vagif/
  • 2.  OData and REST  WCF Data Services  OData feed in 5 minutes: EF + MS SQL  The power of ObjectContext  Using reflection provider  Using custom providers and NoSQL  Extending OData services  Performance and diagnostics  A song about OData
  • 3. Are you familiar with OData? Have you used OData in your projects? Do you have components on your machine that use OData communication?
  • 4.  The Open Data Protocol (OData) is a Web protocol for querying and updating data  Consumers query a datasource over HTTP and get results back in formats like AtomPub, JSON or plain XML  OData follows many of the principles of REST
  • 5.
  • 6.
  • 7.
  • 8. Querying NuGet feed with LINQPad Importing data from OData feed into Microsoft Excel using PowerPivot
  • 9.  Command content specified in URIs  Use of HTTP verbs (GET, POST, PUT, DELETE)  Use of HTTP status codes  Response sent as XML (AtomPub) or JSON  Related content specified using link elements
  • 11. Method Safe Idempotent GET Yes Yes POST No No PUT No Yes DELETE No Yes
  • 13. http://localhost.:50555/InMemory.svc/ Customers <entry term="Northwind.InMemory.Customers" /> <content type="application/xml"> <m:properties> <d:CompanyName>My Company</d:CompanyName> <d:CustomerID>TEMP</d:CustomerID> </m:properties> </content> </entry>
  • 14. http://localhost.:50555/InMemory.svc/ Customers(„TEMP') <entry term="Northwind.InMemory.Customers" /> <content type="application/xml"> <m:properties> <d:CompanyName>My New Company</d:CompanyName> <d:CustomerID>TEMP</d:CustomerID> </m:properties> </content> </entry>
  • 16. Request: a company with non-existing CompanyName Response: an empty collection Request: a company with non-existing CompanyID Response: 404 Not Found
  • 17. var ctx = new NorthwindContext("http://localhost.:50555/InMemory.svc"); ctx.IgnoreResourceNotFoundException = true; var customers = from c in ctx.Customers where c.CustomerID == "XYZ" select c;
  • 18.  Formerly ADO.NET Data Services  Codename “Astoria”  OData provider library for .NET  Not to be confused with WCF RIA Services designed specifically for end-to-end Silverlight and ASP.NET applications
  • 19.  Using Entity Framework provider • EF model first+ MS SQL – trivial • EF code first, different DB vendors – easy  Using reflection provider • Any context exposing a set of IQueryable properties – easy • Implementing IUpdatable for updatable OData feeds – easy  Using custom provider • OData provider toolkit usually helps – still complex
  • 20. public class EntityFrameworkModelFirstMsSql : DataService<NorthwindMsSqlContext> { public static void InitializeService(DataServiceConfiguration config) { config.SetEntitySetAccessRule("*", EntitySetRights.All); config.SetServiceOperationAccessRule("*", ServiceOperationRights.All); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2; } protected override NorthwindMsSqlContext CreateDataSource() { return new NorthwindMsSqlContext(/* connection string */); } }
  • 21.  As simple as with MS SQL assuming EF provider for the respective vendor is available  Proven choice: Devart dotConnect product family: • Oracle • MySQL • PostgreSQL • SQLite
  • 22.  Not supported by tools  EDMX is just an XML file with 3 main sections: • Conceptual model (CSDL) • Storage model (SSDL) • Mapping (MSL)  You can author your own EF model: • Support for n database vendors • 2n + 1 XML sections (1 CSDL + n SSDL + n MSL)
  • 23.  DbContext class, wraps ObjectContext  Model is generated from entities  Database can be generated from the model  Convention over configuration reduces configuration code to bare minimum  No more trick to share conceptual model between databases from different vendors
  • 24. public class NorthwindContextBase : DbContext { public ObjectContext ObjectContext { get { return (this as IObjectContextAdapter).ObjectContext; } } } public class EntityFrameworkCodeFirstMsSql : DataService<ObjectContext> { protected override ObjectContext CreateDataSource() { var ctx = new NorthwindContext("NorthwindContext.EF.CF.MsSql"); return ctx.ObjectContext; } }
  • 25.  Suitable for most of scenarios with static resource set information (schema known at compile time)  Resource sets exposed as IQueryable<T> properties of the context class  DataServiceKey attribute specifies entity key  Optional support for IUpdatable
  • 26. OData feed exposing in-memory data collection OData feed using NHibernate to access MS SQL database
  • 27.  Entity Framework provider is the quickest way to add OData feed on the top of a popular SQL database  Reflection provider covers most of other scenarios when the data schema is known up-front  Custom provider is needed when the schema is discovered at runtime or data don‟t have fixed types
  • 28.  If the content of NoSQL database is known at compile time, reflection provider can be used  If the content of NoSQL database is divided into collections of fixed types, the resource sets can be built at runtime  If the content is untyped, OData feed can still be built using open types
  • 29. Creating OData feed for MongoDB using WCF Data Services and OData Provider Toolkit
  • 30.  OData data model supports open types for Entries. An entry of an open type may have extra properties (dynamic properties) in addition to those statically declared in metadata  WCF Data Services framework takes care of transforming the incoming requests into an expression tree. Custom code is responsible for evaluation expression tree against the data store
  • 31.  Custom service operations can only use HTTP GET and POST  Generated client context code does not include custom service operations – it has to be added manually  Default webHttpBinding settings may not be sufficient for large payload (send/receiveTimeout, maxBufferSize and maxStringContentLength often need to be increased)
  • 32. [WebInvoke(Method = "POST")] public void DeleteProductsByNamePattern(string namePattern) { this.CurrentDataSource.ExecuteStoreCommand( string.Format("DELETE FROM Products WHERE ProductName LIKE '{0}%'", namePattern)); }
  • 33. public void DeleteProductsByNamePattern(string namePattern) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create( string.Format("{0}/DeleteProductsByNamePattern?namePattern={1}", this.BaseUri, namePattern)); request.Method = "POST"; request.Accept = "application/atom+xml,application/xml"; request.ContentType = "application/atom+xml"; request.ContentLength = 0; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); }
  • 34.  OData design goal is to provide data publishing protocol for services, not for low-level components  Don‟t use OData to implement cascaded updates and deletes of large number of dependent entities  Understand the difference between client- side and server-side operations
  • 35.  LINQPad (LINQ to OData)  Fiddler  RedGate .NET Reflector Pro (to step-in to WCF Data Services code)  Oren Eini‟s profilers (EF Profiler, NHibernate Profiler)  Elmah logging framework (install it using NuGet, it will update your web.config)
  • 36.  Don‟t reinvent the wheel, don‟t come with your own standards  Consider OData to expose data sources on the Web  Don‟t treat OData as a SQL database publisher  Writing OData feeds is easy
  • 37.  Code examples for this presentation: https://github.com/object/ NorthwindOData  Open Data Protocol: http://www.odata.org/ http://www.odata.org/mailing-list  WCF Data Services forum: http://social.msdn.microsoft.com/Forums/e n/adodotnetdataservices/
  • 38.  WCF Data Services Toolkit: http://wcfdstoolkit.codeplex.com/  Microsoft WCF Data Services March 2011 CTP 2 for .NET Framework 4 and Silverlight 4: http://www.microsoft.com/downloads/en/de tails.aspx?FamilyID=60fb0117-8cea-4359- b392-6b04cdc821be
  • 40. OData! Please relieve me AtomPub is what I‟m gonna need Believe me when I tell you: AtomPub is what I‟m gonna need
  • 41. OData! Please relieve me JSON‟s what I want in JavaScript Believe me when I tell you: JSON‟s what I want in JavaScript
  • 42. When you told me: “Internal error 500” Oh well you know, I nearly broke down and cried When you told me: “Internal error 501” Oh well you know, I nearly broke down and died
  • 43. OData! Please relieve me I want to live a RESTful life Believe me when I tell you: I want to live a RESTful life
  • 44.  Vagif Abilov  Miles AS  vagif.abilov@gmail.com  @ooobject  github: object  http://bloggingabout.net/blogs/vagif/