[dba-VB] FYI: Microsoft embracing REST, ATOM and JSON by Open Data Protocol (OData)

Salakhetdinov Shamil mcp2004 at mail.ru
Thu May 3 13:20:57 CDT 2012

Hi Francisco,

Thank you for your reply.
I'm following (since yesterday) one of ObjectiveC-related project on CodePlex - http://odataobjc.codeplex.com/, which was moved to https://github.com/OData/OData4ObjC
Is it different from yours?

> I'll have time on saturday/sunday to put my demo together
I'll wait for it...

> again thanks for supplying a sample service :)
Don't mention it,  that's Chris Sells to thank :)

Thank you.

-- Shamil

Thu, 3 May 2012 10:59:43 -0700 от Francisco Tapia <fhtapia at gmail.com>:
  Thanks for the quick demo, I'm not moving along in ObjC this quick (yet) but I am working off of the userguide here, which is the opensource client from MS... it moved from their codeplex and is now hosted on github, but nonethe less the guide looks straightforward, I'll have time on saturday/sunday to put my demo together, again thanks for supplying a sample service :)


http://bit.ly/sqlthis   | Tsql and More...

On Thu, May 3, 2012 at 6:10 AM, Salakhetdinov Shamil <mcp2004 at mail.ru> wrote:
 Hi Gustav at all --

Just wanted to finish my first try of oData web services consumption on positive note and applied KISS-principle by writing a tiny oData client app - and I have got some progress here in consuming sample oData (?) service from Chris Sells article:


You can do the same - just:

1. Create VS2010 console application project - ConsoleApplication1
2. Add Service Reference to http://services.odata.org/Northwind/Northwind.svc and call it TestService
3. Copy & paste, compile, build, and run code from P.S. of this message - and you'll get the following test output:

5. Buchanan Steven - Sales Manager
1. Davolio Nancy - Sales Representative
9. Dodsworth Anne - Sales Representative
7. King Robert - Sales Representative
3. Leverling Janet - Sales Representative
4. Peacock Margaret - Sales Representative
6. Suyama Michael - Sales Representative

Easy? Yes, it's.

.NET 'magic' makes all the dirty work for you to parse web query ATOM result of

(try it in a web browser)

into the above test output.

Question to Francisco: does ObjectiveC have similar high level ATOM feeds consuming libraries and tools to generate strongly typed client APIs? (I should have I guess...)

Thank you.

-- Shamil


using System;
using System.Linq;
using System.Data.Services.Client;

namespace ConsoleApplication1
    public class DataModelProxy : DataServiceContext
        public DataModelProxy(Uri serviceRoot) : base(serviceRoot) {}

        public IQueryable<dynamic> EmployeesList
            get { return CreateQuery<dynamic>("Employees"); }

        public IQueryable<ConsoleApplication1.TestService.Employee> StronglyTypedEmployeesList
            get { return CreateQuery<ConsoleApplication1.TestService.Employee>("Employees"); }

    class Program
        static void Main(string[] args)
            var proxy = new DataModelProxy(new Uri(@"http://services.odata.org/Northwind/Northwind.svc/"));

            //var employees = from e in proxy.EmployeesList select e;
            var employees = from e in proxy.StronglyTypedEmployeesList where e.Title.StartsWith("Sales") orderby e.LastName select e;

            foreach (var e in employees)
                Console.WriteLine("{0}. {1} {2} - {3}", e.EmployeeID, e.LastName, e.FirstName, e.Title);

Thu, 03 May 2012 08:31:02 +0200 от "Gustav Brock" <Gustav at cactus.dk>:
> Hi Shamil
> Thanks! That looks like a good article - and using Northwind as example data, I noticed.
> I will have a closer look in the weekend.
> /gustav
> >>> Salakhetdinov Shamil <mcp2004 at mail.ru> 03-05-2012 00:03 >>>
> Hi Francisco and Gustav --
> Here is a link, which seems to have good information how to make and how to communicate with oData (web) services:
> "Open Data Protocol by Example" by Chris Sells:
> http://msdn.microsoft.com/en-us/library/ff478141.aspx
> Thank you.
> -- Shamil
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com

dba-VB mailing list
dba-VB at databaseadvisors.com


More information about the dba-VB mailing list