Show 7 Transcript: Getting Started with Silverlight 2 Beta 1
Here’s the transcript for show 7
We’re here. At the beginning of this massive thing that’s going to reshape the web. Take a look around. Notice who else is here. It’s good to be in on the beginning.
Today we present a show in three sections, all about the connection of Silverlight to development. Section 1, The China Connection. Events half a world today could have substantial impact on the start of Silverlight development. But it doesn’t have to do with Chinese developers or even local adoption of Silverlight. Instead it’s much more subtle.
Section two, The Steps. It’s true for Hobbits and it’s true for us. Getting going is the hardest part. In this section we’ll show you the easy step by step instructions for writing your first Silverlight application. If you haven’t done it, it’s easier than you might think.
Section three, Softening up the Beach. It’s possibly the most important getting started step for Silverlight. If you get it wrong it’s likely you won’t be programming for Silverlight. And strangely, this step is covered by almost no one. Coming up on the Sparkling Client podcast.
Erik. Hello I’m Erik Mork.
Monica. And I’m Monica Mork. Welcome to the Sparkling Client podcast, recorded March 25, 2008. Sparkling Client is a podcast about Silverlight and other web client technologies. It’s meant for developers and designers who are interested in making the next generation of great looking web applications.
Here’s how it works. You give us 15 minutes of your time, and we give you the tools to build amazing web clients. For more information and show notes, see Sparklingclient.com. Also please consider leaving us feedback at the site. We’re always looking for ways to make the show better.
Warning, we’re talking about beta software. Some details may change by the time this software is released.
Section 1, The China Connection. So Erik, how do you see events in China affecting the adoption of Silverlight.
The Olympics will be hosted in Silverlight on NBC
Monica. Well it goes to the Olympics. Now the Olympics are going to be hosted in Beijing in August. Now I’m not normally a big fan of the Olympics am I?
Erik. No I don’t think you’ve watched them in years.
Monica. Yeah I don’t think so either but I’m going to be watching them this year.
Erik. And why is that?
Monica. The Olympics are going to be hosted in Silverlight on the NBC site. Well they’re going to be hosted on TV or whatever too, but they’re going to be on the NBC site to the tune of 2200 hours worth of sports. HD quality, you’re going to be able to do all these things like picture in picture, watching multiple views of the same sport, being able to watch a basketball game and then rewind to specific plays because you can click on links to those plays, so those sorts of cool things.
Now if you want to see what that looks like go to Shrinkster.com/w1x. Adam Kinney has a very interesting post on that, and we’ve talked about it on previous episodes too. I think it’s going to be huge. Now to the connection. The Olympics are going to be in China, and there’s this explosive political situation, and I don’t feel qualified to really have an opinion about its nature or its merits or anything except to say that people are talking about how it might negatively affect the Olympics. It might negatively affect them in terms of countries boycotting and there might be a fizzle, or countries pulling out.
It’s possible that the political situation could affect the Olympics, which then could affect ultimately the adoption of Silverlight. I think it’s interesting to think about those sorts of connections. It’s sort of this idea that I got from the Connections video series, which was very interesting and was hosted by what was his name, James Burk?
Monica. Yeah.
Erik. And if you want to see information about those videos go to Shrinkster.com/w8s, it’s the Wikipedia page for the connections videos. Very interesting stuff, a very fascinating way at looking at history or even what’s happening now. We’re keeping our fingers crossed. I mean I think this Olympics thing, if everything goes right, if the bandwidth goes right, if the political situation goes right, if all these things go right it could be huge. This, the picture in picture and all that stuff, that’s the sort of things that could get my friends who are not Silverlight or geeks in any sense to download and use Silverlight. I think it’s a real potential for adoption, to drive adoption, and we’ll see how it plays out.
Section two, The Steps. Monica how would we write a Hello, world in Silverlight?
Getting Started steps with Silverlight
Monica. Well to get started you need Visual Studio 2008. If you don’t have Visual Studio 2008 there are a couple of options for you. Microsoft offers a free trial, you can find that at Shrinkster.com/w8r, or you can attend one of Microsoft’s nationwide Heroes Happen Here launch events. The events are free, they’re happening all across the United States, so for the next few months, and you get to bring home versions of Windows Server 2008, Sequel Server 2008, and Visual Studio 2008.
Erik. This always confuses me. They give away free copies of their product at these things? But they do. When I first went to one of these and they were giving away their products, I thought is this a joke or something? But no they just give them away so it seems like a good deal to me.
Monica. The launch events are filling up quickly though, especially the developer tracks. For more information or to see if they’re in your city visit Shrinkster.com/w8u. Moving on, assuming everyone has Visual Studio 2008 installed, now you need to have the Silverlight 2 Runtime End Tools. You can find these at Shrinkster.com/w9b. This takes you directly to the Microsoft download page. If you want to navigate there you can start at the Silverlight.net site, the second tab at the top says “Get Started” and that’s where you want to go. You just want to make sure you install the Silverlight 2 Tools Beta 1, because the Silverlight 1 and Silverlight 2 tools are both available from that page. This does install both the runtime as well as the tools you need. As you know installing the runtime is really fast, but this download does take a little while so it includes all of your tools as well.
Okay so now you have your IDE, your runtime, and your tools. We’ll open up Visual Studio 2008 and we’ll go to File > New Project. And you’ll notice now that in your Project Type column you now have a Silverlight type project. Likewise in your template files you also have a Silverlight application template. So we’ll choose that and we’ll give it a name, I’m just going to call mine Silverlight Application 1, and hit Okay.
Now you’ll get a popup window asking you how you want to host this Silverlight application. For our purpose we’re choosing the second option, Generate an HTML Test Page to Host Silverlight within this Project. Hit Okay.
Now when your project window opens up you’ll have both the design view and the XAML view. In the beta 1, the design surface is read only. It will reflect what you put in your XAML, but you can’t drag controls onto it yet. So everything you do will be in the XAML window.
I like buttons, so in our application we are going to create a button that says “Hello World.” All it requires is a single line. Ready? Here it is. Within your grid element you’re going to create a button element, and then Content, Height, and Width are all attributes of your button. So you’re going to have buttoncontent=”hello world” Height, you can make it however high you want, I put 100. Width, again however wide you want, I’m just putting 100, and then you close your element.
You’ll notice as you type this in that Intellisense is active, and as soon as you close your bracket your design surface reflects your XAML and window.
I like buttons, so in our application we are going to create a button that says “Hello World.” All it requires is a single line. Ready? Here it is. Within your grid element you’re going to create a button element, and then Content, Height, and Width are all attributes of your button. So you’re going to have buttoncontent=”hello world” Height, you can make it however high you want, I put 100. Width, again however wide you want, I’m just putting 100, and then you close your element.
You’ll notice as you type this in that Intellisense is active, and as soon as you close your bracket your design surface reflects your XAML and your button appears. When you debut your project a test page will be generated, and you can see your handiwork. And you’re done, that’s it. Right now our button doesn’t do anything, but you can seen how easy it is to get started and start working with Silverlight.
Section three, Softening Up the Beaches. Erik, what do getting started guides neglect to tell us?
Getting your boss to let you use Silverlight
Erik. Well the guides are great at telling you how to do code. Go to Silverlight.net, look for the hands on labs, getting started, those sorts of things. Great for telling you how to do the code. But there’s one key step that you’ll need before you can program Silverlight, and that is convincing your boss in the first place to let you program Silverlight. So critical and I don’t think it’s covered very often. If you don’t do this, you’re probably not going to be programming Silverlight at work.
Monica. So how do you approach your boss?
Erik. I think you have to take sort of this sliding scale depending on how technical they are. You’re going to be able to take some of these steps and you’re going to have to leave some of these steps, and of course tailor it to your boss’s personality and technical abilities. But fundamentally here’s what you need to do, you need to let them know that it’s in their interests. One key thing to talk about is that the data presentation is so important. I mean this is what separates applications. This is how the weak get separated from the chaff, the good applications from the absolutely great applications. So you can talk to him about that, you can see if they agree with that, and if they do provide several ideas, sort of an option for enabling great applications.
There are some specific steps you can take for specific kinds of shops. If you’re in a DHTML shop, you’re in a programming environment where the management has already bought into this idea that the client layer is critical, I think you can use that to your advantage. So what you would do is first of all get them to agree that the client layer is critical, that’s key, then present Silverlight as this way to solve problems that can’t be solved with DHTML AJAX. You can talk about the presentation part of Silverlight, media, you can talk about animations. You can talk about performance. Right these are three really big advantages that Silverlight has over traditional DHTML labs. And then you can also of course highlight the runtime. In DHTML apps you’re stuck in JavaScript, but in Silverlight you can have C#, you can write in all these different languages in this world class runtime, and that’s certainly worth pointing out.
You can also point out bugs that you’ve had in JavaScript, if you’ve been working in JavaScript, had bugs. Maybe because different browsers operate differently. Point out how long those bugs took to fix, and point out that those bugs, if this is true, would likely not exist in Silverlight. And that can give your boss this sort of direct ammunition, this is how much time would have been saved had we been using Silverlight.
Now if you’re a Flash shop there are some other things you can bring to bear. If you’re in a Flash shop one good thing is they’ve already agreed that the client layer is critical, that the user perceptions are critical. Use that. Highlight the runtime in this case though. Highlight any Dev skills that you already have in the area, so if you’re a .NET shop on the server, point out that hey, we could be using the .NET runtime on the client machine, that’s important.
Talk about the world-class tools like the Runtime Visual Studio 2008, and maybe give demos. I think that those could be important.
Ultimately take a collection of these points, whatever you think is going to be most impactful to your engineering manager/boss, and condense it down to a few minutes and think about what’s important to them. The next piece you need is a tour. Show them some great looking Silverlight applications. The Silverlight gallery is at Shrinkster.com/w8w, lot of good sites there. One thing, just for some visual eye candy, go to the Hard Rock memorabilia site.
Now practice these things. Make sure you have the Silverlight 2 Beta 1 bits actually installed. But then go to Hard Rock Memorabilia, which is at Shrinkster.com/w8w Go to Fluxify, the file resizing and then uploading site to give it a demonstration of how Silverlight can handle file uploading I think is impressive. Shrinkster.com/w8y. Image Snipper, this is a Photoshop or maybe more like Paint application, but it runs on the client in Silverlight. Shrinkster.com/w8z.
Or if you have a very technical minded manager who understands controls and such, maybe show them the control sample page if you think they’ll get it and that is at Shrinkster.com/w8x so you can show them the data grid which is pretty impressive, the scroll viewer, sliders. And you can point out how the items are data bound in that grid for instance.
And then of course you can choose your own. You might also talk about companies who are making the leap to Silverlight, so that would include things like NBC, Aston Martin, etc.
Probably you’re going to want to choose the order you want to do this very carefully. Probably you’re going to want to have the visuals first, so maybe the Hard Rock memorabilia followed by the other ones, show that stuff first to give some eye candy, and then talk about the reasons it’s important and then the companies who are adopting Silverlight.
I think that’s the tack you should take is plan it out ahead of time, cut it down to a few minutes, have some good visuals, have some solid reasons, and if possible have some arguments based on how much money and time Silverlight would have saved in previous endeavors, and I think you might have some success that way.
And if all that fails you could raise the point that a lot of the best and brightest web developers in the Microsoft sphere, they’re actually looking to move to companies that do Silverlight development because they’re so interested. Now you don’t want to turn this into a veiled threat to your employer, but at the same time it’s maybe important that they know that people really are looking to work on Silverlight, and in fact I look at a couple of cases where people are going to change or looking to change jobs to specifically work on Silverlight which I think really says something. Good luck.
Monica. Getting started. It’s often the hardest thing to do. With the right tools it’s easy. If you missed any of the links presented in today’s show, go to Sparklingclient.com to see the show notes. We’ll see you next week on the Sparkling Client podcast.
Erik and I work for Silver Bay Labs, the company Erik founded. If you want to know more about what we do, see Silverbaylabs.org. The music for today’s show is used with permission and is from Teamyacht.com and Magnatune.com. See our show notes for more information.


