Monday, July 14, 2008

What I did on My Summer Vacation

So it's not so much did as still doing but here's just a little update on what I'm up to at the moment, it's quite a bit.

Moving

moving Many of you already know this but I am in the process of selling my house and moving out of Ohio.  It is with mixed feelings that I do this as I have really come to love the emerging sense of community in the Cleveland development arena and the help we've had in building it from the twitter tribe.  On the other hand I'm taking this opportunity to move to anywhere I want, anywhere at all. 

I've been searching for a specific type of company for the last several months and finally decided on one that I feel is a perfect for for me at the moment.  I'm not going to say who yet, I don't want to jinx it, but it's a great web firm out of Seattle and they are flying me out for an in-person interview in a week or two.  I've already had a couple phone conversations with them as well as did a "home work" coding assignment.  So far it would seem like they like what they see, I know I do.  This is a great chance to be a full time Silverlight developer, and I'm more than a little excited at the prospect.

As part of this process we're also selling our house.  If you've ever sold a house before you know how much work it is getting and keeping everything perfect.  It's not a great market to be selling a house but we're optimistic that we'll get an offer soon.  We hope so anyway.

Writing

campbell_cover150 The writing on Silverlight 2 in Action is still ongoing.  I now see how much effort goes into the writing of a book.  There is probably a hour of research and coding for every five minutes of actual writing.  We are waiting until the release candidate comes out to finalize everything but I still have a ton of work to do even before that.  It's all worth it though.

It is known among people that teach or present that committing to do one of those actions is a good way to learn a technology.  I would argue that writing a book is even better.  You have to ensure that you know the material good enough to stand up to the criticism of peers, and trust me, we can criticize quite well.

Speaking

microsoft_silverlight_c Remember a minute ago when I said that presenting is a good way to learn a new technology?  Well, watching a presentation can be a good introduction as well, so come watch me talk.  I'll be the speaker at the August 12th meeting of the Cleveland .NET SIG.

Here's my abstract for the talk: Now that most people know that Silverlight can do fancy animations and play videos, lets look at how to make it do some real work.  In this presentation we will demonstrate connecting to web services, using returned data, binding data to controls and discuss some limitations Silverlight currently has.  And of course, since it's Silverlight, we'll try to make it look good in the process.

Coding

stacked_small_slbc_08 Hopefully you have all heard about the Silverlight Control Builder Contest by now but if not, head over there and read up on it now.  Basically, you build a templateable custom control, submit it to the contest, and win prizes.  Well, you can try to win prizes anyway, a whole bunch of other people will be entering as well.  The prizes are getting better and better and include books, software, gift certificates and more.  Wait a second, the more people that enter the less my chances of winning.... Never mind, don't enter :).

How to Learn Silverlight

image001_low With a lot of people wanting to learn Silverlight today and not really knowing where to start, I thought I'd write something to help people get started.  This is not meant to be better than Jesse Liberty's version of the same thing, just a different take on it.

  1. Go read my post titled What Is Silverlight.  This should give you enough of an overview of Silverlight to make sure that it is what you think it is.
  2. Install the tools at http://silverlight.net/getstarted.  This will give you everything you need to begin building Silverlight applications.  Don't forget Expression Blend, even if you are not a designer some things are just a lot easier using Blend.
  3. Watch a couple "How Do I" videos on getting started and any other topics that interest you.
  4. Work through a QuickStart.  These expose you to programming numerous areas of Silverlight.  Feel free to just read the sections you need, when you need them.
  5. Build something.  It doesn't have to be original, fancy or even work well.  Don't even show it to anyone if it doesn't turn out looking quite right, but build something.  Pick an idea like a weather widget or an ad rotator or get adventurous and build a simple little space invaders style game, anything just BUILD something.  Using it is the best way to actually learn any technology.
  6. Don't be shy.  Use the forums at http://silverlight.net/forums whenever you run into a stumbling block.  I would encourage you to attempt a search of the forums first though since if you are having trouble with something, someone else probably has as well.
  7. Read a lot.  Everybody and their brother is blogging about Silverlight.  A simple Google search will turn up information on nearly anything you can think of.  A good place to start is to subscribe to the Community blog aggregation feed from Silverlight.net.  Also be sure to catch Silverlight Cream as Dave Campbell does a great job of aggregating all the Silverlight posts he can find into a nice, searchable site.
  8. Push yourself.  Commit to doing something that you don't know how to do yet but know is possible.  There are a lot of options in this arena:
    1. Build a prototype for a work project
    2. Give a Silverlight presentation to a local user group
    3. Write an in-depth technical blog post
    4. Enter a contest.  At the moment I know of the Control Builder contest, an article writing contest and INETA is supposed to be starting the Silverlight Challenge soon as well.

I know that everyone has their own individual style and pace of learning but hopefully this will point you towards the path of [Silver]enlightenment.

Friday, July 11, 2008

What Is Silverlight?

image002_low I've noticed lately that a lot of people seem to have misconceived notions of what exactly Silverlight is and does.  I will attempt to explain what Silverlight is and how it fits into the web spectrum in language that even your boss will understand.  What I won't do is try to tell you when you should or shouldn't use Silverlight or how to build specific applications using it, those are topics for other posts.

If you have built a little prototype app in Silverlight, and certainly if you have done more than that, this post is not for you.  This post is directed at those that have heard of Silverlight, think they might know what it is and would like to know if it fits their needs.  It is also a good post to read to get a good general understanding of the way web development works.

Terminology

IIS, Apache, etc.  These are web servers.  They accept the request from a client browser and return the appropriate response.

PHP, ASP.NET, PERL, JSP, Cold Fusion.  These are all server technologies.  They execute on the web server itself in response to requests from a client, typically a web browser.  They typically output HTML. 

MySQL, SQL Server.  These are the databases, they also are located on a server.  Typically the web server technology will have a method to connect to the database.

HTML, JavaScript, AJAX, Silverlight, Flash.  These are all client technologies.  They execute from the web browser itself.

SOAP, WCF, REST.  These are all types of web services.  Typically these are created on a web server to expose data and logic to outside applications.

XML, JSON.  These are data formats.

Where Silverlight Fits

As stated in the previous section, Silverlight executes in the client browser.  What does this mean? It means:

  • Silverlight applications need to be hosted on a web server
  • Silverlight does NOT need to be hosted in IIS, any web server will do
  • Silverlight does NOT need ASP.NET on the server
  • Silverlight applications cannot access databases without an intermediary (like a web service)
  • Silverlight applications cannot access server-side classes or variables without an intermediary (like a web service)

Silverlight also can run on any major browser (Internet Explorer, Firefox, Safari) on any major OS (XP SP2, Vista, OSX, Linux).

Programming Silverlight

Programming Silverlight applications can take many forms.  This is due to a number of items. 

First, the plugin contains a limited version of the .NET framework.  What this means is that you can write real, compiled and managed code that executes in the context of the client browser itself.  What it doesn't mean is that you have access to the full framework.  There are a lot of areas of the framework that are missing completely, like System.IO and others that are present but are missing features, like no ArrayList for instance.  It also doesn't mean that you can build reference an already existing class library from your Silverlight application.  You can still use class libraries but they must be compiled against the Silverlight version of the framework.

Silverlight also introduces what is known as the DLR, or Dynamic Language Runtime.  This allows you to write code in non-traditional .NET languages such as IronPython or IronRuby.

Silverlight Versions

The most current version of Silverlight that is in full release is Silverlight 1.  Silverlight 1 is very good at displaying Media (audio and video) but it's lack of controls and reliance on JavaScript as the only programming language, introduce numerous limitations.  For a first generation plugin though, it isn't bad at all.

Silverlight 2 is currently in it's second public beta and is due to be in full release this fall.  It also contains a full commercial "go live" license, which means that you are permitted to use it to build real production, money-making applications with the Beta version.  Silverlight 2 introduces the .NET framework to Silverlight along with the DLR and a rich control set.  The majority of applications being built today are using Silverlight 2.  With all of the advances in Silverlight 2 combined with the go-live license and the short timeframe until the full release, building anything in Silverlight 1 today seems wasteful to me.

Silverlight and WPF

Silverlight is a limited subset of WPF, both of which use XAML as their markup language.  This allows for several things, such as the shortening of the learning curve when moving from one to the other.  It also means that typically, if you develop an application using Silverlight, it can normally be ported to run as a WPF desktop application with minimal effort.  Moving the other direction however, from WPF to Silverlight, can be more troublesome due to the greatly increased .NET framework and control set in WPF.

Silverlight and ASP.NET

ASP.NET and Silverlight overlap in some of their capabilities, but Silverlight is not a straight replacement for ASP.NET.  Since code written for ASP.NET executes on the server it has access to the entire .NET framework, can use connection strings to access databases and can use any number of third-party or internally generated class libraries.

Even on the client, there are times when you may want to stick with ASP.NET over Silverlight.  If you have parts of your application that are nothing more than data-entry forms, the standard ASP.NET controls are very well suited to that kind of work.

Silverlight and Flash

Everyone has heard talk of Silverlight being Microsoft's "Flash Killer".  Personally, I do not think that is the intention or even goal of Microsoft when it comes to Silverlight.  I believe that they (MS) saw a way to add more interactive capabilities to web applications in a way that is friendly to .NET programmers.  I see the emerging RIA space as being plenty large enough for Flash/Flex, Silverlight and even a few others.  Yes, they both do many of the same things and yes, Flash may do some of them better currently.  But give Silverlight some time to mature and you will see much more feature parity between the two.

Silverlight and AJAX

Built into the Silverlight plugin and SDK are numerous features that perform the same functionality as that provided by AJAX, but with the need to write complex JavaScript.  Silverlight has very rich support for reading data of numerous types from web services to RSS feeds to static XML files.  It also has methods to facilitate the deserialization of XML or JSON into strongly types objects for simple manipulation and binding.

Finally

Hopefully this post has helped answer some of your questions as to what Silverlight is, what it isn't and where it fits into the web space.  If you have more questions or want to correct me on something I may have mistyped, please leave comments here or use the forums at http://silverlight.net.