Galin Iliev's blog

Software Architecture & Development

Getting started with Astoria (screenshots story)

Today I will lead you through the process of creating Astoria service. It is pretty easy as you’ll see.  In my previous post I described the required packages to run Astoria.

There are mainly to stages:

  • Create and setup Entity Framework data Model
  • Create Astoria Service

Once you have them you can start Visual Studio 2008 Beta 2

Then select form the menu Project -> Add new Item… and select ADO.NET Entity Data Model

Then we follow the EF wizard to Generate Model from database

We select accordingly the connection to MS SQL Server which has AdventureWorks dabatase.

On next screen we select objects that will be added to EF Schema and click Finish button:

And we have the schema ready to use:

Now we are ready to setup Astoria Service:

Select form the menu Project -> Add new Item…

When we have class generated all we have to done is to set Context Object for EF Model. We enter AdventureWorksModel.AdventureWorksEntities and compile.

And this is all! We are ready to use it. It was pretty easy,  wasn’t it?

Now let’s test it. All we have to do is loading AdventureWorks.svc from the browser:

On this screen we see all entities in the schema. We could navigate further with just changing URL:

You could play with some other Astoria specific queries like those (change your host:port to match yours):

There is one very good tool that you can use . On order to use the page you must host it on same application as Astoria service otherwise browser single origin check will stop the requests. So Save the page and add it to your project

In next post I will show you how to consume the data from Javascript

Astoria CTP Refresh for EF Beta 2

Pablo Castro annonced there is CTP Refresh of Astoria bits. Astoria is very cool project based on .NET 3.0 (WFC), Entity Framework to provide pure HTTP access to SQL Server data. This means that we will be able to pull data using... Javascript 

In order to use you need:

I am preparing a (short) article that shows how to leverage data from Javascript and ASP.NET AJAX... Stay tuned and I will annonce it here

Project Astoria

I am on codenamed projects wave today and I would like to share with you another one - project Astoria (reposted from official blog):

Project Astoria Overview

The goal of the Astoria project is to enable applications to expose data as a data service that can be consumed by web clients within corporate networks and across the internet. Such data services are reachable over regular HTTP requests using standard HTTP verbs such as GET, POST, PUT and DELETE to represent the operations against the service.   The payload format for the data exchanged with the service can be controlled by the client and all options are simple, open formats such as plan XML and JSON. The use of web-friendly technologies make it ideal as a data back-end for AJAX-style applications, Rich Interactive Applications and other applications that need to operate against data that is across the web. 

                Further reading: Astoria Overview, Using Astoria        

By Mike Flasko

For those who are interested in architecture & design & process the team made another post Transparency in the design process which describes how the things happens inside MS (described for this particular project)