Thursday, May 31, 2007

Data Binding Silverlight? Step 1 - Get the data

 Of course, step 1 assumes there is a database somewhere containing the data you need, and that we can bind data with Silverlight, or at least display some data-driven XAML controls.  Let's keep going and see if this is possible with Orcas & dLinq.

Here is a blog article for step-by-step how to get data with dLinq.

In this second blog post in the series I'm going to go into more detail on how to create the above LINQ to SQL data model.

LINQ to SQL, the LINQ to SQL Designer, and all of the features that I'm covering in this blog post series will ship as part of the .NET 3.5 and Visual Studio "Orcas" release.�

You can follow all of the steps below by downloading either Visual Studio "Orcas" Beta 1 or Visual Web Developer Express "Orcas" Beta1.� Both can be installed and used side-by-side with VS 2005.

Source: BlogoWogo - The Blog Network | LINQ to SQL (Part 2 - Defining our Data Model Classes)

Wednesday, May 30, 2007

Visual Studio 9 Orcas first thoughts

1. What a big download.
2. When do I get to use Popfly?
3. How come Crystal Reports 2007 is in there?

I just created my first Silverlight Project & Silverlight Class library.  Next I'll try and link those to a Web Project, and figure out what the heck to do next, and how to get Silverlight data-aware with SQL Server 2005 & maybe even Analysis Services.

In the meantime, there's a Silverlight Showcase on Michael Gannotti's site.

Link to silverlight - SilverlightContent

Is WPF/E really named after David Silverlight?


Reporting the release to the public of MS Silverlight (codename WPF/E) I was wondering if that product has been named after David Silverlight, creator of many community websites like Community Credit.

I heard that Microsoft has just started an extremely high reward system for very active community leaders, and that WPF/E is the first reward issued with that system.

David is reporting a conversation he had with Bill Gates: To be honest, I didn't really believe him when told me about actually meeting Bill Gates a few months back to discuss some really high honor, but anyway it's a awesome honor for a community developer to have a real product named after him.

Congratulations David!!!

Source: Is WPF/E really named after David Silverlight?

The conversation with Bill is really cool.

I think Microsoft David would have been cooler.  How about a big yellow happy face logo too?  Or maybe a paperclip mascot?  Yeah... a sarcastic paperclip mascot called Clippy. (shuddering...)

I installed Office 2007 and Orcas this week.  Have not seen Clippy yet.  Getting used to the placement of buttons (print, preferences) and that big Pearl/Marble icon is messing me up a bit...

Plus OneNote shrank all my tabs.

Let's see what Orcas brings to Silverlight.

Tuesday, May 29, 2007

dougturn's WebLog : Silverlight Resources


Silverlight Resources

Many thanks to Asli Bilgin, DE extraordinaire, for pulling almost all of this list together.

· silverlight

· Telerik RadControls – 3d virtual rooms using control based framework

· DLR & IronPython

· Silverlight developer reference “poster”

· Forums – installation, troubleshooting

· Electric rain harmony (coming summer 2007) – flash to silverlight converter

· Silverlight 1.0 Beta QuickStarts

· Silverlight 1.1 Alpha QuickStarts


· Main Microsoft site

· Community site

· Mix conference

experiences & demos

· Getting started with silverlight - Scott Guthrie demos how to build an app from scratch

· "How Do I?" with Silverlight 1.0

· "How Do I?" with Silverlight 1.1

· Using Blend with Silverlight 1.0

· Community gallery

· Top 3 samples in community gallery

o Silverlight Pad

o Page Turn

o Video Library

· Beijing Olympics Use Silverlight

· Channel 9 screencasts

· Watch movie trailers & videos via Silverlight

· How to do Rich media advertising - example using eyeblaster


· Scott Guthrie – no intro needed

· Jim Hugunin - chief architect of the DLR

· Mike Harsh – Silverlight team

· Lutz Roeder – Expression Blend team

Shawn Wildermuth - Silverlight guru

· Delay  of silverlight airlines demo

· Ironpython

tech talks

· All recorded mix07 sessions

· ScottGu’s mix keynote and great overview

· ScottGu’s Channel9 interview

· Building Rich Web Experiences using Silverlight and Javascript for Developers

· Deep Dive on Silverlight Media Integration

· Developing ASP.NET AJAX Controls with Silverlight

· Creating and Delivering Rich Media and Video on the Web with Silverlight, Expression Studio, and Windows Server

· Building Silverlight Applications using .NET (Part 1)

· Building Silverlight Applications using .NET (Part 2)

· Extending the Browser Programming Model with Silverlight

· Just Glue It! Ruby and the DLR in Silverlight


· Getting started whitepaper

· Silverlight Architecture Overview

Source: dougturn's WebLog : Silverlight Resources

Monday, May 28, 2007

Silverlight Logo

As one of my graphics design buddies knows, I am king of all the cheesy animated banner ads. I used to work on the technical aspects of web sites for a property management company that owned a few malls in Canada. Rarely did I get to dabble in graphics, since we had our own designers. When the mall manager requested an animated banner for the home page, I got to show off my stuff.

Unfortunately the Wayback Machine isn't working for me, or I would show you my skating Santa banner ad, or perhaps the girl jumping rope. Those two didn't win any awards, and my new logo at the top of this page probably won't either...

To get the logo into Blogger, I created a 400px by 40px image in Microsoft Expression Designer. I exported the image as a jpeg and brought it into Microsoft Blend. After playing around trying to get some animation going, I managed to create a new timeline, dragged the timeline bar to the right a bit, and started moving things around, just enough to get me into trouble.

Then I did the usual build, created a zip file, and created a manifest file, pointing to page.xaml.

I added the manifest file to the zip file, and then tried to upload the application to the Silverlight Streaming Server. It complained about the usual .sln, .csproj, .pdb, and .cs files, which I deleted and then got the zip file uploaded.

After that, I went into Blogger, edited the template, and changed some of the code, pooching it in the process. If you're going to try this out on an existing blog, be sure to backup your template, and your whole site if possible. I use HTTrack to backup my blogs.

I put this in the head tag, adding Logo to the end of CreateSilverlight function name (it would be nice if the upload application added the app name to the end of the sample function to make it distinct)

I modified the blogger template's header widget to allow adding items, and set max number of items to 2. Then I added an html control and added the sample code to the control (changing the function name by adding logo to it).

The sample code doesn't seem to pull the actual size from the manifest.xml, which could be another feature to add, eh?

After scratching my head for a bit I figured out I needed to change the width and height to 400px and 40px respectively.

Voila. See logo above.

If Dreamworks is hiring tell them I'm busy...

Sunday, May 27, 2007

Silverlight-enabled Blogger Template

Under the Edit Template option of the blog, there is a button to Edit HTML. Browsing that I could find the <head> tag and could insert the following snippet.

<script src=' type='text/javascript'/>
<script type='text/javascript'>
function CreateSilverlight(){Sys.Silverlight.createHostedObjectEx({source: &quot;streaming:/12905/SilverlightsOut&quot;,parentElement: SilverlightsOutWrapper});}

Note that I modified the sample code provided to include the body of the CreateSilverlight.js file because Blogger won't host js files.

Browsing the blog didn't throw any errors, so are we almost there?

Yay - I can see the application. Div size is a bit messed, and Blogger's Edit Html likes to add
tags to my javascript code ala Microsoft Frontpage but it's embedded here in Blogger, streamed.

Windows Live Quantum Mechanics : Hello World with Silverlight and Silverlight Streaming

 Here is the manifest.xml file modified for Silverlightsout.


Source: Windows Live Quantum Mechanics : Hello World with Silverlight and Silverlight Streaming

After I added this to the zip file, and tried to upload, I got this error.

The following file names have file types not allowed in hosted applications: SilverlightsOut/ClientBin/LightsOut.pdb, SilverlightsOut/obj/Debug/LightsOut.pdb, SilverlightsOut/obj/Debug/Page.g.cs, SilverlightsOut/obj/Debug/ResolveAssemblyReference.cache, SilverlightsOut/Page.xaml.cs, SilverlightsOut/Properties/AssemblyInfo.cs, SilverlightsOut/SilverlightsOut.csproj, SilverlightsOut/SilverlightsOut.csproj.user, SilverlightsOut/SilverlightsOut.html, SilverlightsOut/SilverlightsOut.sln, SilverlightsOut/SilverlightsOut.suo, SilverlightsOut/Thumbs.db

Why doesn't it ask me to remove these files?  That would be a good feature to have to simplify deployments.  Another feature could be just the ability to right-click & deploy from Visual Studio to Silverlight Streaming server... will look into an add-in for that one!  I have already seen some code to upload an application, should not be too hard to roll that into a menu option.

Uploading the app worked, sort of.  It recognized a valid application and gave me some options to Upload an Updated  application, Launch the test page, and delete the app.  It also provided some sample code which I will probably need to add to the page template of Blogger, if it's possible.

<script type="text/javascript" src=""></script>
<script type="text/javascript" src="CreateSilverlight.js"></script>

Launching the Application Test Page brought me to a grey Silverlight-enabled box.  Something tells me something isn't set up right.... :)

Next up, adding to the page template.

Microsoft Silverlight Streaming - Upload your apps here

Here's one way I can setup my Silverlight apps on Google Blogger... of course I'm hosting it on Windows Live but hey... :)

Microsoft® Silverlight™ Streaming by Windows Live™ is a companion service for Silverlight that makes it easier for developers and designers to deliver and scale rich media as part of their Silverlight applications. The service offers web designers and developers a free and convenient solution for hosting and streaming cross-platform, cross-browser media experiences and rich interactive applications that run on Windows™ and Mac. Combined with the ability to create content with Microsoft® Expression Studio and other 3rd party tools, Web designers and content publishers wishing to integrate Silverlight applications into their online properties can enjoy complete control of the end user experience.

Get your free 4 GB hosting space now!

Source: Microsoft Silverlight Streaming - Admin Home

After no reading of TFM whatsoever, I was able to download the Alpha 1.1 code (any Silverlight app will prompt you for the Beta... get the Alpha - it's better) and install it in 15 seconds.

I then went to the Silverlight Streaming service and setup an account (in less than 1 minute).

After that, I needed an application.  Eventually pieces of this blog will be the application, but for now I'll settle with some samples.  I tried to upload the demo... and it asked me for a manifest.xml file.

I extracted and my AVG Anti-Virus detected a hidden extension in a .html.js file.  So much for codebehind naming conventions for javascript.

Next step, RTFM enough to get the structure of the manifest.xml and post this app!

What no Silverlight?

This is a blog on Silverlight, after all.

The first thing I need to do here is to get some Silverlight going... which will be interesting since Blogger doesn't host .js files.

Let's see how I can get Silverlight into this blog. Of course, there is a bit of irony in letting Google host this for me. I could post this blog on my MSN Spaces account, but I have not used that one in awhile.

I have already figured out a couple of business ideas I'll be trying to implement using Silverlight as the facilitating technology. Web 3.0, here we go. (or is it 3.5 now?)

For now, check out Scott Guthrie's blog, if for nothing more than that cool picture of the underside of the Space Needle. I'll be taking pictures of the base of the CN Tower next week to see if I can work on the title image for this blog, or maybe just borrow a picture from Nike333.