Learning to program Windows Phone 7

Scribe

The Windows Phone 7 platform is so new, there is still a dearth of material for learning to program on it.  Pete Brown and Jesse Liberty have opined that if you know Silverlight then you are already a WP7 developer.  This is true up to a point.  If you already know how to program Silverlight or XNA you definitely have a leg up.  But as everyone knows, it’s that last mile that counts.

I’ve previously recommended Charles Petzold’s preview for his upcoming book Programming Windows Phone 7 Series.

It provides a pretty thorough overview of the technology and gives equal air-time to both Silverlight as well as XNA.  Plus Charles Petzold is a pleasure to read.

I would also highly recommend the WP7 Training Kit provided by Channel 9.

The WP7 Training Kit provides code and tutorials that walk you through the basic (and a little bit of advanced) skills you’ll need to start building Silverlight-based WP7 apps.  Mercifully, it goes beyond the Hello World level of Windows Phone 7 tutorial that is currently prevalent on the web.

You should also, of course, hit the Windows Phone forums to see what other people are discovering.  Mark Chamberlain posted a great list of WP7 links on the forum for code samples and code walkthroughs.

If you randomly browse the web for Windows Phone help, I want to warn you in advance of Windows Phone tutorials that turn out to be Silverlight tutorials simply transposed for the phone.  If you see one of these, run.  Run fast.

Your First Windows Phone Development Book

WinPhone_v3_18432D37

Shortly after the announcement at MIX that the Windows Phone Developer Tools were available for download, a free e-book by Charles Petzold on developing for Windows Phone showed up on the Internet.  You can download it from his site here.  It includes six chapters from the book and, from what I’ve read so far, is great.  The XPS I downloaded is 156 pages – so it is quite a bit more than a tease.

The book begins in Petzold’s characteristically off-center and brilliant style:

“This is a short draft preview of a much longer ebook that will be completed and published later this year. That later edition will be brilliantly conceived, exquisitely structured, elegantly written, delightfully witty, and refreshingly free of bugs, but this draft preview is none of that. It is very obviously a work-in-progress that was created under an impossible timeframe while targeting quickly evolving software.”

Windows Phone Developer Tools and Silverlight 4 Released

jackpot

Scott Guthrie announced at the MIX10 keynote this morning that the Developer Tools for Wndows Phone Series 7 are now available for download.  You can get the tools here at http://developer.windowsphone.com/windows-phone-7-series/.

Silverlight 4 for the Visual Studio 2010 RC and the Expression Blend Beta are also now available here on www.silverlight.net.

Mr. Guthrie (AKA ‘The Gu’) also announced that Blend 4 will be a free upgrade for licensed owners of Blend 3, which is fantastic news.

The final release for all of these will occur in a month – one assumes it will coincide with the Visual Studio 2010 release on April 12.

Bridging the Silverlight Code – Design Gap

rainbow-bridge

Several friends and associates have been sending me links to Blend resources since my last post on the Silverlight Code – Design Gap.  I would like to thank a few in particular: Corey Schuman, Adam Kinney and Amos Kabaki.

ShineDraw: Amos told me about a site called ShineDraw that has a Flash vs Silverlight Gallery demonstrating how the same effect can be accomplished in Flash and in Silverlight.  Best of all, the examples are downloadable.

Project Rosetta: Both Corey and Adam clued me in to the recent reboot of Project Rosetta.  Project Rosetta is quickly adding content to be the first stop for designers to learn to work with Blend and Silverlight.  There is a rich getting started guide, a guide that helps designers map Flash concepts to Silverlight concepts, and many, many tutorials including an essential introduction on importing Photoshop files into Blend.

Expression Community: Not everyone knows about the forum for Expression Blend developers. It is set up along the same lines as the ASP.NET and Silverlight.NET forums with – clearly – a Blend bent.  There is also an associated gallery for those looking for a bit of inspiration.

If you are aware of additional Blend and Silverlight resources for designers, dear reader, please add them to the comments.

The Silverlight Code – Design Gap

.NET developers tend to love Silverlight because it gives them the ability to write cool applications using programming idioms they are familiar with.  Everything about it screams out cool.  Furthermore, .NET developers do not need to learn Flash to get Flash-like effects.  They can drop into the XAML (good ol’ XML) in Visual Studio and start typing away with Intellisense standing by to help.

Expression Blend is a little trickier.  It is a different idiom and .NET coders have a hard time using it.  All the same, it is not completely alien.  A .NET developer can still drop into the XAML if he wants to, and it is possible to mentally translate between the drag-and-drop designer and the XAML that is produced to the objects one assumes are being generated at runtime.  The bits that are foreign are assumed to be there for designers.

Yet designers have not embraced Expression Blend and finding out why is essential to building an effective Silverlight development story.

Allison Richter recently joined the Silverlight Atlanta User Group.  In her introduction to the group she mentioned that she is a designer who is mastering Silverlight but finding the experience frustrating.  When I asked her about this she did more than simply offer a quick reply.  She wrote an enlightening essay on her website 2foldesign explaining the gap between designers and Silverlight coders.  You can read the entire essay here (the speaker she refers to near the bottom is Roger Peters, a lead Silverlight developer for IQ Interactive):

Reasons why designers may not be seeking a change to Silverlight could be that code is not necessarily their passion. Code is what allows them to place their design into a workable format. Kind of like when I paint, I may need to know how to stretch a canvas onto a frame so I can paint, but I do not love doing so. So code is a necessity, but not a passion. Most developers I know love to code. They love new code, new solutions. They would just as easily go home and work on the computer all night after coding all day for enjoyment. Designers want to pursue what they enjoy: design. Painting, drawing, logos, ID, branding. I know personally I’ll lay out $20 per mag for things like a new Image FX without a second thought to see what other people are doing. Yet I may not go out and research a new code language with as much zeal.

On the question of frustration, there are many many areas so I will name a few.

Blend/Silverlight creates a dependency. True, most applications will need a developer to work in concert with the designer to create a dynamic amazing product. I also recognize that Flash does not have the capabilities that Silverlight has. However first off when using Blend and Silverlight I had to be set up. This is off-putting to many designers. We want something we can do ourselves. Adobe has it’s products packaged up nicely and all we have to do is load. My developer had to help sift through the right files, work with dlls, set up my environment etc. I have all of my Expression software loaded, my Visual Studio hooked up, the toolkit downloaded etc. If I had started out on my own as a designer I would have already been lost. When I create with Flash, it’s one product in which I already know how to create everything I need to create, then drop what is published into my HTML and CSS …

My expectations before I started with Blend and XAML was that Silverlight would be like Flash. The Blend software itself is very unlike Flash in many ways. I would relate it more to ASP.NET than I would to Flash. The toolkit, the way you code in the XAML, the types of containers that you apply. These seem to be very much like ASP.NET …

The toolkit controls are difficult to edit. I will go and watch as many videos as I can before trying to create what I want. For example, I need to create an accordion. Yes, there is a tool for that. Yes, you can learn how to edit it. Most of the videos don’t explain all the parts of the XAML, they assume that you will just use the properties area in Blend. Then they jump to the code behind and start doing things that I would need my developer to do. So then I come to a grinding halt …

[Terminology] is misleading. From a designer standpoint things like border mean a tiny thin line. You learn to put colored borders on all your divs/spans … to see what you are doing in CSS. So now I’m created entire blocks of items within a border? A border has a background? It’s not familiar to a designer. This makes the comparison between what we know already and what the new code is maddening …

There is no one to ask. Most of the places I have worked after college, I am the only designer. Other designers do not want to work with new technologies. The old ones cater to the right side of the brain, so to speak. They know how to use these programs, and time is money. The forums, information, videos seem mostly to be for developers. As the speaker from last night said, there is no elusive Blend designer with a background in Flash – good luck finding one. You guys [coders] can pool your resources together and talk about what to do and how you got there, but there is not a large resource of people for me to ask.

Technological Similes (e.g., Silverlight is like . . .)

tunnel

A few years ago I posted a list of technological similes on this blog involving the term “Ajax” which I aggregated from a Google Search.  You can read about it here.

It occurred to me that a similar search of similes involving the term “Silverlight” might be equally fruitful, much like throwing a fishing net into a sewer and seeing what comes back.  Voila the results:

Silverlight is like a little baby.”

“Silverlight is like Flash.”

“Silverlight is like Flash … only different.”

“Comparing Flex to Silverlight is like comparing apples and oranges.”

Silverlight is like all choppy and slow which slow down my browser like hell.”

“Silverlight is like ajax and Flex.”

“Silverlight is like a lightweight version of WPF…”

“Silverlight is like a browser add-on that can understand XMAL code.”

"Silverlight is like OS X.”

“At a time like this, finding an article written as recently as Feb 2009, and listing the strengths of Silverlight, is like finding lots and lots of drinking water when thirsty in a desert.”

"Silverlight is like activex all over again – arghhhhh!"

“In the experience world WPF is the Ferrari, Silverlight is like a Lexus, and Ajax is that Nissan Stanza that your sisters boyfriend bought…”

“Microsoft Silverlight is like the proverbial elephant…”

“After playing with the beta for a few weeks, developing a control in Silverlight is like walking through mud.”

“Using Silverturd instead of Silverlight is like using M$ instead of Microsoft and people who do that are looked down upon.”

“Someone memtioned Silverlight is like Java plugin?”

“I read on one blog that programming with Silverlight is like going camping with .NET.”

“Silverlight is like the wild wild west. Everyone code however they want, Every new discovery is like virgin territory…”

“The easy developing tool provided by Silverlight is like candy to lure developers in and cage them…”

“SilverLight is like Flash on Crack.”

Silverlight is like the force. It has a light side and a … uh…… silver side.”

“Silverlight is like an add on. Almost after the fact. I haven’t thought it through…”

A Silverlight CSI Challenge

caruso

One of the peculiar things about Silverlight applications is that, while SL provides the tools to create new and interesting user interface paradigms, most Silverlight apps currently being written look like revamped winforms or web form UIs.

This smells like a missed opportunity.  The problem, of course, is that it is difficult to come up with new ways for people to interface with their computers.  Developers and designers tend to fall back on the metaphors they are familiar with.

If you want to find interesting UIs, you need to look at your TV or the movie theater.  Movies like The Minority Report, while even more confusing than the Philip Dick story it is based on, succeeded mostly on its ability to show us what the future would look like.  Shows like the various CSI franchises succeed in making that future look like it is available today.

At the office, we get a big kick out of recounting the latest weird, impossible software being used on last night’s procedural drama to catch the bad guy.  What we rarely examine, however, is the fact that we can use Silverlight to build apps to look like – if not actually function like – those fictional software programs.  So why don’t we?

If we want to find new metaphors for the UI experience, it makes sense to go to the experts – television designers.  They have already done the hard creative work.  All we, as software developers, need to do is copy them and see what actually succeeds. 

So put on your Horatio sun glasses and build something from CSI, or Bones, or Criminal Minds, or The Minority Report, or any other technologically fictional world and see if you can make it real.  And when you are done, you can peer over your shades and drop a cheesy line like “Looks like his XAML finally got rendered.”

Last Night’s Atlanta Silverlight Meetup

Silverlight Meetup

http://www.meetup.com/The-Atlanta-Silverlight-Meetup-Group/

http://www.silverlightatlanta.net

Following the morning release of a Silverlight 4 beta, Shawn Wildermuth switched gears and spoke for 70 minutes about the new Silverlight 4 features at last night’s Atlanta Silverlight Meetup. He was originally scheduled to speak on Line of Business applications, but based on a show-of-hands decided to give this much more timely presentation.

The cellar of 5 Seasons Brewery was packed for the event and there was standing room only in the back. Because of the NDA, it appears that the Atlanta Silverlight Meetup got to see the first full presentation on Silverlight 4 outside of Redmond and Los Angeles, thanks to Shawn.

 

What can one do with Silverlight: Part deux

Corey Schuman, Roger Peters and Mason Brown – whom many of you met at the Atlanta Silverlight Firestarter – have been under wraps for several months working on a project for IQ Interactive they repeatedly insisted they couldn’t tell me about.

Now that the beta of My Health Info on MSN has been published, not only do I finally get to see what they have been working on but I also get to share it with you.

My Health Info is an aggregator of sorts for personal medical information – a tool to help the user keep track of her personal medical history.  Unlike other portals that support widgets, however, this one is built using Silverlight.

My Health Info is an interesting alternative to the Ajax-based web portal solutions we typically see and serves as a good starting point for anyone looking to combine the “portal” concept with Silverlight technology.  The Silverlight animations as one navigates through the application are especially nice; they strike the appropriate balance between the attractive and the distracting – between cool and cloying.

What can one do with Silverlight?

rubens

The ComponentArt Summer Silverlight Coding competition is about to wrap up in a few hours.  It has managed to garner approximately 80 entries – all with publicly accessible Silverlight sites.

In the process of hosting this contest, Miljan Braticevic has achieved a wonderful thing – almost as a side-effect.  He has gathered a fantastic gallery of Silverlight applications which answer the often unvoiced question: What can one actually do with Silverlight?

If you are simply looking for ideas or, more to the point, trying to find a way to explain to your boss what Silverlight is, go here: http://www.componentart.com/community/competition2009/contestants.aspx .

The contest entries run the full gamut of mapping tools, social networking, dashboards, standard web site alternatives and games.

I do not envy the judges the task of bequeathing their golden apples.