# Thursday, October 30, 2008

My favorite technologies to come out of Microsoft this year is ADO.NET Data Services aka Project Astoria. Astoria is a new technology that puts a REST based data-service on top of your data. Very easily you can expose your application’s data as a service allow other applications, including non-Microsoft ones, to consume your service via HTTP and REST. Astoria has a rich extensibility model where you can hook directly into the service and take direct control over a request. This enables you to build very secure, flexible, and robust services.

The one thing that is a limitation of Astoria is that for the client, you have to be online to consume the service. If your client is offline or occasionally connected, working with Astoria is not really possible. That will change real soon. Yesterday at PDC I went to the session TL08 Offline-Enabled Data Services and Desktop Applications delivered by Pablo Castro. For those of you who don’t know Pablo, he is a great guy and a straight shooter. He believes in “transparent design” where the team is 100% open and debates design and features on its blog for the whole world to watch and contribute feedback.

I have been writing “disconnected” applications that rely on synchronization for almost 15 years. I have been involved in some great applications relying on replication like the NFL Scouting application I showed at TechEd 2003 that  uses the Pocket PC (.NET Compact on Windows Mobile/CE) and laptops with SQL Express to connect to a back end SQL Server. The challenge of the disconnected user has been around ever since we have been able to do any form of replication of data. I know first hand. :)

Astoria Offline’s offering is very elegant. You can create an end to end solution very easily and the “piece of cake” scenario where you click on all the wizards provides a good solution out of the box where you only have to write a little bit of code to extend the application to fit your needs. There is also a robust API if you want to consume and do everything yourself or if you are not using the Microsoft tools on the client.

What I really like about Astoria is its conflict resolution. This has been a big challenge for some other replication systems. Astoria will sync all of the good records in the batch and do nothing to the conflicted records. You will then have an exception and an event to handle the conflicted records so you can write some code to handle it yourself. But Astoria will not change any data unless you tell it to, giving you full control. While this seems small, it is a very elegant design pattern.

There are also some great things in there to allow you to batch your sync and also do partial replication (allow only NY sales people to see NY data) with something called Scopes. There are nice hooks for Authentication and Authorization as well.

Look for a CTP by the end of the year. As Pablo said, it is not a CTP good enough to build applications on, but good enough to give the team feedback. More than most other teams at Microsoft, the Astoria team really listens. So look for the CTP and write some code and let them know what you think.

Comments are closed.