From internal collaboration to supplier and customer interactions, enterprises are discovering new ways of increasing productivity, process accountability, and connecting those challenging "white spaces" that exist betwe...| By Kevin Hoffman | Article Rating: |
|
| September 25, 2007 08:00 PM EDT | Reads: |
27,341 |
Kevin Hoffman's BlogAs you know, Silverlight is a new RIA enabling technology from Microsoft. Slightly less publicized but no less impactful is another technology from Microsoft - Astoria. Astoria is a tool that combines the power of the ADO.NET Entity Framework with the new enhanced power of RESTful POX services using WCF. In short, an Astoria service is a WCF service that sits on top of an Entity Model that allows you to hit services with URLs that look something like this:
http://server/service.svc/Customers/Orders[TotalAmount>25.50]
This will return a bunch of XML corresponding to all of the customer orders that have a total amount greater than $25.50. The syntax / query format of the URL itself is one of the things that makes the Astoria service so unbelievably powerful. You can sort, filter, limit, and paginate all from the URL itself, making client implementations incredibly easy, and incredibly well-suited to lightweight GUI frameworks like AJAX or Silverlight.
To keep it short and simple, here's what I did (using the "Orcas" beta 1 w/Silverlight toolkit installed AND Astoria toolkit installed):
- Create a new ASP.NET Web Application. Warning!! - I couldn't get this to work unless I created this using File -> New -> Project -> ASP.NET Web Application. For some reason, the current beta of Silverlight/Astoria have compatibility issues with File -> New -> Website.
- Right-click the ASP.NET Web Application and choose "Add new item", then pick "ADO.NET Entity Data Model". In my case, I generated it from an existing database that had a couple of sample tables, including a Ledger table containing transactions.
- Right-click the ASP.NET project and choose "Add new item". Pick "Web Data Service". Make sure it has the word data in it, otherwise you're going to get a vanilla Web Service and not an Astoria Web Service. There's a huge difference.
- Double-click your .svc.cs file and change the TODO item from a TODO comment to the actual classname of the object context created in step 2. In my case, this was FinanceManager.FinanceModel.
- Right-click the solution and choose "Add new Project", select "Silverlight Project".
- At this point, you should have a solution with a Silverlight project (make sure this builds), and a file-based ASP.NET web application that contains an entity data model. You should also have an Astoria service sitting on top of your EDM. To test things out before integrating Silverlight, build and run your app and hit the Astoria service, e.g. http://server/service.svc/tablename. You should get some XML showing you the contents of the table. If not, something went horribly wrong :) :)
- Now right-click the ASP.NET file-based web application and choose "Add Silverlight link". This will set your solution up so that your Silverlight app's DLL and any dependent DLLs will be copied to the client binary output directory of the ASP.NET application. You are not done!
- Drag a copy of silverlight.js from your Silverlight app to the ASP.NET app (you'll see why this is crucial shortly)
- Drag your TestPage.html file from the Silverlight app to your ASP.NET app. The reason you need to do this is because you will now be launching your Silverlight app from the ASP.NET app, not from the original Silverlight app location. This is because Silverlight cannot currently make cross-domain networking calls and you need to communicate using the BrowserWebHttpRequest object with the Astoria service.
- Now add some GUI to your Silverlight app, make a button responder, do some asynchronous stuff - all goodies you can find quick and dirty samples for elsewhere. Use the XmlReader object to consume the raw (no envelopes!! Down with WSDL!!) XML produced by the Astoria service.
In the end, I ended up with some "smoke test" (read: not yet pretty-fied) GUI that grabs Ledger entities from the Astoria service and uses the "ListBox" sample control from the SDK to do the rendering.

The transaction ID numbers and transactions actually came from my financial ledger service, which is an Astoria service sitting on top of an Entity Data Model.
More to come!!
tags: silverlight astoria
links: digg this del.icio.us technorati reddit
Published September 25, 2007 Reads 27,341
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Kevin Hoffman
Kevin Hoffman, editor-in-chief of SYS-CON's iPhone Developer's Journal, has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise web applications in VB, C++, Delphi, and C. Hoffman is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. He authors The .NET Addict's Blog at .NET Developer's Journal.
![]() |
.NET News 06/04/07 01:00:29 PM EDT | |||
As you know, Silverlight is a new RIA enabling technology from Microsoft. Slightly less publicized but no less impactful is another technology from Microsoft - Astoria. Astoria is a tool that combines the power of the ADO.NET Entity Framework with the new enhanced power of RESTful POX services using WCF. In short, an Astoria service is a WCF service that sits on top of an Entity Model that allows you to hit services with URLs that look something like this: |
||||
- Whatever the Apple iPad Is, It Apparently Leaks Like a Sieve
- Reflections on Java Command Line Options
- Six Enterprise Megatrends to Watch in 2010
- Microsoft WebsiteSpark: Get New Business Leads to Grow Your Business
- Jobs Has a Few Words for Google & Adobe & They Ain’t Pretty: Reports
- Stealth Cloud Computing Startup To Launch at Cloud Expo
- Apple iPad Reminds Us How Brands Succeed by Transforming Experiences
- Apple iPad in 3rd Place Behind iPhone and Android For Application Developers
- PivotLink Named Cool Cloud Computing Vendor
- iPad on Ulitzer - I’ll Buy iPad. But What For?
- Adobe Flash on the Road to Nowhere
- SAP Wants CA To Give It More Toys
- Whatever the Apple iPad Is, It Apparently Leaks Like a Sieve
- Reflections on Java Command Line Options
- Six Enterprise Megatrends to Watch in 2010
- Microsoft’s First Step Toward Cloud Computing
- Microsoft WebsiteSpark: Get New Business Leads to Grow Your Business
- Jobs Has a Few Words for Google & Adobe & They Ain’t Pretty: Reports
- Stealth Cloud Computing Startup To Launch at Cloud Expo
- Apple iPad Reminds Us How Brands Succeed by Transforming Experiences
- Apple iPad in 3rd Place Behind iPhone and Android For Application Developers
- PivotLink Named Cool Cloud Computing Vendor
- How to Secure REST and JSON
- iPad on Ulitzer - I’ll Buy iPad. But What For?
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1
- Where Are RIA Technologies Headed in 2008?
- Struts Validations Framework Using AJAX
From internal collaboration to supplier and customer interactions, enterprises are discovering new ways of increasing productivity, process accountability, and connecting those challenging "white spaces" that exist betwe...Mar. 21, 2010 08:23 AM EDT Reads: 101 |
By Roger Strukhoff 3rd Generation outsourcing is here! 1st Generation was “your mess for less”; 2nd Generation is strategic or selective sourcing, including hosting. 3rd Generation Outsourcing, as a result of the emergence of Cloud Computi...Mar. 21, 2010 05:53 AM EDT |
By Pat Romanski NaviCloud is a next-generation platform that combines the economic efficiencies of cloud computing with true enterprise-class reliability and security. With built-in high-availability, a state of the art operations cente...Mar. 20, 2010 08:45 AM EDT Reads: 535 |
By Pat Romanski SYS-CON Events announced today that VirtuDataCenter, a cloud computing network infrastructure company, will offer a complete turnkey alternative to today’s cloud computing solutions. They will exhibit at SYS-CON's 5th In...Mar. 20, 2010 07:00 AM EDT Reads: 335 |
By Liz McMillan You are interested in cloud computing, but where do you start? How are vendors defining Cloud Computing? What do you need to know to figure out which applications make sense in the cloud? And is any of this real today?
...Mar. 20, 2010 05:45 AM EDT Reads: 387 |









3rd Generation outsourcing is here! 1st Generation was “your mess for less”; 2nd Generation is strategic or selective sourcing, including hosting. 3rd Generation Outsourcing, as a result of the emergence of Cloud Computi...
NaviCloud is a next-generation platform that combines the economic efficiencies of cloud computing with true enterprise-class reliability and security. With built-in high-availability, a state of the art operations cente...
SYS-CON Events announced today that VirtuDataCenter, a cloud computing network infrastructure company, will offer a complete turnkey alternative to today’s cloud computing solutions. They will exhibit at SYS-CON's 5th In...
You are interested in cloud computing, but where do you start? How are vendors defining Cloud Computing? What do you need to know to figure out which applications make sense in the cloud? And is any of this real today?
...
Cloud Computing Journal caught up with the CEO of a major new player in the fast-emerging Cloud ecosystem - a CEO who has taken an interesting and unusual decision. While signing up as the Platinum Plus Sponsor of the 5th International Cloud Expo, he and his company have decided to remain completely...
Enterprises continue to expand the use of cloud computing, and particularly software-as-a-service applications (SaaS), to achieve operational performance enhancements and efficiencies. Implementation of these technologies introduces several challenges related to identity management, such as administ...
But, as much as I like developing nations and the potential of cloud for them, the Big Kahuna is still found in the Big Apple, with Cloud Expo, opening April 19 at the Javits Center in New York. This is not an event with a single track, or a few tracks. There are, in fact, eight of them, as follows:...
Is your website available to end users 99.8% or more of the time? If not, then count yourself in the “laggard” category, according to standards set by The Aberdeen Group, in its 2008 report “The Performance of Web Applications: Customers are Won or Lost in One Second.” In that study, laggards had we...
























