In this screencast, I build off of the concepts shown in my previous screencast and show you how to render a polygon on a Virtual Earth map using REST, Windows Communication Foundation (WCF), LINQ to SQL, and the new geography data type in SQL Server 2008.
To learn more about the GeoRSS utility library, visit:
A big thanks to Eugenio Pace for letting me use it as part of my sample!
In this screencast, I show you how to draw a polygon on a Virtual Earth map and save it using ASP.NET AJAX, Windows Communication Foundation (WCF), LINQ to SQL, and the new geography data type in SQL Server 2008.
I’ve been having some issues getting my VPC updated to SQL Server 2008 RC0 and Visual Studio 2008 SP1 Beta so I can record a couple screencasts on using Virtual Earth with SQL Server 2008. I swear I read through the readme docs:). However, I could not get Visual Studio 2008 SP1 to install. I’m in the process of building a new VPC. I probably should have done this in the first place since my original VPC had so much beta software installed (including the SQL Server 2008 Feb CTP). Before I tried to install either, I decided review the readme again and do some basic Internet searching before I started. Turns out I should have searched around the first time. There is a known issue related to the order in which you install the two. I found the following entry in the forums:
"SQL Server Compact installation fails when the products are installed in the following order:
1. Install SQL Server 2008 RC0
2. Then install Visual Studio 2008 SP1 Beta
The workaround for the issue is as given below:
1. Install SQL Server 2008 RC0
2. Go to the Add/Remove Programs
3. Uninstall SQL Server Compact 3.5 SP1 Query Tools Beta and SQL Server Compact 3.5 SP1 Beta
4. Install Visual Studio 2008 SP1 Beta
5. Install SQL Server Compact 3.5 SP1 Query Tools Beta (SSCESqlWbTools.msi) from the folder – ServersSetup on the SQL Server 2008 RC0 installation media (CD/DVD/Layout)
6. Go to the Add/remove programs and verify that the following are installed:
a. SQL Server Compact 3.5 SP1 Query Tools Beta;
b. SQL Server Compact 3.5 SP1 Beta;
c. SQL Server Compact 3.5 SP1 Design Tools Beta
The reason for the failure is that SQL Server 2008 RC0 and Visual Studio 2008 SP1 Beta install the same version of SQL Server Compact 3.5 SP1 Beta MSI’s. If SQL Server Compact is already installed on the machine SQL Server 2008 or Visual Studio 2008 SP1 Setup has to skip the installation. There was a bug in the Visual Studio Setup and it has been fixed. The fix will be available in the released version of Visual Studio 2008 SP1"
Hopefully this saves some headaches for anyone who is trying to install both on the same machine.
In this screencast, I show you how easy it is to expose RSS and Atom feeds using the new Web Programming Model (REST) features, classes in the new System.ServiceModel.Syndication namespace, and LINQ to SQL in the .NET Framework 3.5. Then, you will see how you can use classes from the System.ServiceModel.Syndication namespace to consume RSS and Atom feeds using Silverlight 2.
Screencast: Exposing/Consuming RSS/ATOM using WCF 3.5 & Silverlight 2
Source code: WcfSyndicationLinqToSqlSilverlight2.zip
I have received a few requests looking for the HOLs from the Windows Server 2008 / Visual Studio 2008 / SQL Server 2008 Launch events. I just found out they are now available at http://heroes.labmanuals.virtualwide.com/.
UPDATE: I have added a recording link for this webcast to My Recorded Webcasts list.
Thanks to everyone who attended. Sorry about the Live Meeting slide animation issue. Hopefully the webcast was still valuable even with the difficulties. Here are the links to the deck & demo code:
Sync Services 101 / Going N Tier Demo (first two demos)
Applying Additional Server Logic
Conflict Resolution (from synguru.com)
The demos require Visual Studio 2008 and depend on a SQL Server 2005 database. I made the database available for download as well. You’ll have to attach it to your SQL/SQL Express instance and make sure the connection strings in the project are correct.
The conflict handling demo is a direct link to the demo from http://syncguru.com. Remember there are some great advanced samples and demos there as well. There is also some good information about the next version too.
Lastly, I didn’t really call this out in the webcast, but Sync Services is a piece a much larger puzzle called the Microsoft Sync Framework. You can learn more about the future of sync at http://www.syncguru.com/projects/SyncServicesDemoConflictHandling.aspx.
Thanks to everyone who stuck around for my "Defy Occasionally-Connected Challenges With Smart Client Applications" session at the DC Launch. The deck and demo files are available here:
Workflow Services Demo
Sync Services for ADO.NET Demo
The demos require Visual Studio 2008 and depend on a SQL Server 2005 database. I made the database available for download as well. You’ll have to attach it to your SQL/SQL Express instance and make sure the connection strings in the project are correct. You’ll notice that I didn’t include a download for the WPF demo. That’s because the UI in the Sync demo is the exact same UI from the WPF demo.
I mentioned recorded/upcoming webcasts a few times during the presentation. You can find a list of all my recorded webcasts at http://devkeydet.com. Here are the recorded webcasts related to the topics I covered:
Introduction to Windows Communication Foundation ***
Introduction to Windows Workflow Foundation ***
Introduction to Windows Presentation Foundation ***
Smart Clients: What’s New in Visual Studio 2008?
Introduction to LINQ + LINQ to SQL
What’s New in the WCF and WF in Visual Studio 2008 & the .NET Framework 3.5
Building Workflow Services (WF+WCF) with Visual Studio 2008
Building WPF Applications in Visual Studio 2008 and Expression Blend
*** These webcasts are fairly old. They are based on .NET 3.0 / VS 2005. The core concepts obviously apply, but the developer experience for all of these technologies has greatly improved in Visual Studio 2008.
I also mentioned my webcast on Thursday. I’ll be presenting a deeper dive into the Microsoft Synchronization Services for ADO.NET. Details are here.
"I would like to know if you have a demo of how I could store the coordinates created by generating points or polylines from on the map into a database. You can save them as part of collections but I would like to know how they can be stored into a database."
I do not have such a sample. However, Johannes Kebeck, has a sweet series of posts around Virtual Earth & SQL Server 2008:
Virtual Earth & SQL Server 2008 – Part 1: Introduction (1/2)
Virtual Earth & SQL Server 2008 – Part 1: Introduction (2/2)
Virtual Earth & SQL Server 2008 – Part 2: Spatial Data Management in SQL Server 2008 (1/3)
Virtual Earth & SQL Server 2008 – Part 2: Spatial Data Management in SQL Server 2008 (2/3)
Virtual Earth & SQL Server 2008 – Part 2: Spatial Data Management in SQL Server 2008 (3/3)
Virtual Earth & SQL Server 2008 – Part 3: Getting Started with Virtual Earth
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (1/6)
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (2/6)
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (3/6)
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (4/6)
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (5/6)
Virtual Earth & SQL Server 2008 – Part 4: Integrating SQL Server 2008 and Virtual Earth (6/6)
Virtual Earth & SQL Server 2008 – Part 5: Conclusion
Part 4 (6/6) is titled Inserting Data into SQL Server 2008 and answers the question. However, Johannes takes a slightly different approach than the pattern I showed in my demo. I love the fact that he took a fairly platform agnostic approach in his examples because it means that anyone can use the approach regardless of their client & server libraries. However, I’m a .NET evangelist. It’s my job to highlight our great developer platform. We have some great libraries and APIs in the Microsoft AJAX Library / ASP.NET AJAX & the Windows Communication Foundation that could help make building out this scenario much easier. I plan on taking the same scenario and building it out using them. I’ll be working on it, along with my original example, in the next week or so. When I am done, I will make the source code available and have 2 screencasts walking showing how to build them step by step.
Microsoft Synchronization Services for ADO.NET makes building applications for occasionally connected environments a logical extension of building applications where you can count on a consistent network. Rather than simply replicating a database and its schema, the Synchronization Services application programming interface (API) provides a set of components to synchronize data between data services and a local store. Applications are increasingly used on mobile clients, such as laptops and devices, that do not have a consistent or reliable network connection to a central server. It is crucial for these applications to work against a local copy of data on the client. Equally important is the need to synchronize the local copy of the data with a central server when a network connection is available. The Synchronization Services API, which is modeled after the ADO.NET data access APIs, gives you an intuitive way to synchronize data. Join us for this session as we introduce Synchronization Services and how you can build applications that use the services.
Thursday, March 27, 2008
2:30P-4:00P EST (11:30A-1:00P PST)
Register at this link: