Tuesday, September 14, 2010

Why I love Windows Phone 7 Development

It’s been about 5 months since I started playing with Windows Phone 7 development and so I decided to start a blog and share some of what I have learned. 

With such a new platform there is a lack of good detailed examples.  I had to learn the hard way and hope to help others, especially beginners, with very detailed blog posts.

I’m going to give a brief history on how I got started doing WP7 development and then show the first 3 apps I’ve written in this post.  I then plan to follow up with how to write a “real” twitter app.  I say “real” because I’ve seen several WP7 twitter example but most show how to bind to a single twitter search feed that doesn’t require authentication and one recently on oAuth.  They were helpful to me but I found them very limited in detail.  I plan to do this example in several parts over the next few days and show details including how to use Isolated Storage, oAuth, localization and a bit on the MVVM pattern that I’ve learned along the way.. 

I’m also aiming this at beginners so anyone just learning Windows Phone Development should be able to follow this example along and learn a few things.  Hopefully more experienced users could use some info here as well.

I first want to layout some history as to why I started doing WP7 development:

At the end of March I started watching videos from MIX 2010. Specifically, I watched Joe Belfiore and Scott Guthrie give the Mix keynote (Mix10 Keynote).  Joe did an awesome job introducing WP7 and Scott built the first WP7 Twitter app live.  Let’s just say I was hooked.  I downloaded the CTP tools and started playing around.  I had never written a Silverlight app (or WPF) so things like xaml and MVVM were completely new to me.  However I have done Win Form apps in the past as well as various Web apps and have been a .NET developer for about 8 years after several years of C++ and COM. 

I’m currently a developer lead at Microsoft working on the MSDN/Technet STO (Server & Tools Online) team.  My small team builds the MSDN/Technet sites (MSDN & Technet).  Most of the work we do is related to ASP.NET & MVC.

Up until a year ago, I was an avid Windows Mobile user, my last phone being a Samsung Blackjack.  In June 2009, I got my first iPhone 3GS for my birthday (well I bought it for myself).  It was great, especially the apps. Since then, I’ve been patiently waiting for Windows Phone 7.  Since I got hooked on WP7 from MIX, I wanted to watch everything I could.  I ended up downloading all the videos and throwing them on my iPhone to watch in pieces whenever I could. 

I then set about to create an “MSDN Online” WP7 app.  Our site has a huge amount of content including Videos, Blogs, Forums, Library, Magazine articles and Galleries to name a few.  Our team had recently migrated all of our “How Do I…” videos to MSN.  Since I enjoyed watching the Mix videos on my iPhone I decided to recreate watching MSDN/Mix videos on a Windows Phone 7. 

All our videos were tagged as they were uploaded to the MSN service so it was pretty simple to query for a technology and get back a list of videos in XML.  I was then able use a media control with the returned URI for the video and it just worked.   One requirement I set was to not have any new services, I just wanted to consume existing public data.

I kept adding more features:

  • Videos from Mix, PDC and Channel 9 since they exposed all their data via RSS feeds with attachments
  • RSS feed support to see the latest MSDN news and features
  • Twitter support (to tweet any content) and see what people are tweeting about MSDN
  • Email support to email a link to the article or video
  • Favorite support so you can favorite an item to read/view later
  • Forum support to read forum threads
  • Blog support to show our MSFT & MVP bloggers
  • MSDN Magazine support to view articles by technology/author/issue
  • Search support to search pretty much all of MSDN with search scoping options

Here are some screen shots of the app:

MSDN 1   MSDN 2  MSDN 3  MSDN 4   MSDN 5    MSDN 6   MSDN 7  MSDN 10   MSDN 9   MSDN 11

 

In summary of the MSDN app, I learned a lot about Silverlight and Windows Phone 7 development and got very excited about what I could do here. Many thanks to a fellow Microsoft employee Robertjan Tuit who gave me many Silverlight tips along the way!

Feed Reader

There were a few apps from my iPhone I couldn’t live without.  The main one was an RSS Reader as I use my phone many times a day to check in on news ard blogs I follow.  I use Google Reader service for my RSS Feeds, it does a nice job of managing my feeds and has many client apps on pretty much every platform out there.  Since no reader existed yet, I set out to build one.

I originally called this app “My RSS Reader” but recently renamed it to Windows Phone “Feed Reader”.  I hope to have this in the marketplace for sale as soon as it opens up.  Many thanks to a few folks at Microsoft who provided valuable feedback:  Charlie Kindel and Andrew Kass.

Here are some screen shots of Feed Reader:

Feed Reader 1   Feed Reader 2   Feed Reader 3 Feed Reader 4   Feed Reader 5   Feed Reader 6 Feed Reader 7   Feed Reader 8   Feed Reader 9 Feed Reader 10   Feed Reader 11   Feed Reader 12

 

Finally here are some shots of my Twitter App.  It only took me about 5-6 hours to do this work.  Since I re-used some of the components I used for the first two apps (specifically the Twitter oAuth and Tweet pages).  This was also my first try at a “Panoramic” control based application..

Twitt 1   Twitt 2   Twitt 3   Twitt 4   Twitt 5   Twitt 6   Twitt 7   Twitt 8

So why do I love Windows phone development?  Well, I think the fact that this new phone has pretty much no applications right now (which I’m sure will be a big complaint when it launches next month) has really energized me into a new area of development.   Also, apps can be written in an afternoon with the tools. There’s something almost magical about getting your first app to run on a real phone. 

I’m using the Twitter and Feed Reader daily now and they’ve been working well.

Special thanks to the Windows Phone team for making all this happen.  I think Microsoft has the best development environment around for phone developers.  I hope you can have as much fun as I’ve had.

Sam

13 comments:

  1. Hey Now Sam,

    Looks Great!

    Thx 4 the info,
    Catto

    ReplyDelete
  2. The one thing I like about developing for the Windows is that I can use the same skills to do that I use in my day job (Silverlight/WCF/.Net).

    Indeed this is why I will be getting a Windows Phone next rather than an Android one - even though currently the Android market is looking bigger.

    That, and as you say, it is a greenfield market.

    ReplyDelete
  3. Very cool! I'm in a similar place as you (well, except for the "working at MS" part haha). I'm new to WP7, done winforms and asp.net dev and decided to blog about my WP7 experiences. You on Twitter?

    My blog: www.pchenry.com (in case you were interested LOL)

    ReplyDelete
  4. Great work. I am assuming the same SamJar I worked with ages back in TFS :) I used to be in Team Build at that time. I work in .NET Compact Framework right now and you are a customer (given that it runs the feed reader :)

    ReplyDelete
  5. Hi Abhinada, yep I'm the same Sam :-)

    ReplyDelete
  6. eagerly awaiting the code samples.. if you dont mind could you just upload the code files so people like me could fool around a bit with the code..

    ReplyDelete
  7. Thanks for the prompt posting ;)

    ReplyDelete
  8. hey Sam,
    I was trying to implement the Facebook Logout operation but I am havig problems clearing the cookies .
    Can you please help me out...?

    ReplyDelete
  9. Hey Sam, is something wrong with Feed Reader (paid) on the Market? I can't find it in search, and when I use a direct link to install it on my phone it tells me it's not available?

    ReplyDelete
  10. yep Marketplace has some bug that caused my app to disappear from many of the markets. I've had to push a new update and re-enable each market and have been waiting several days for it to be approved. It really sucks :-(

    ReplyDelete
  11. Windows Phone Development may be the latest smart phone platform, but it has already taken significant market share and poses a big aggressive threat to iPhone, Android, and BlackBerry.

    ReplyDelete
  12. Regardless I have one other inquiry for you (surely my keep going!): on several my sustains, when I click into a full post, the perspective zooms in immediately and I can't zoom pull out to see a full line of content. It reliably happens on Triplepundit.com and I think a few others. When I then endeavor to open the post in IE (or Metrobrowser), it does the same thing - not giving me a chance to peruse the post without continually scrolling over. Have you became aware of this event in the recent past? Any hints?mobile app development // mobile app developers // iPhone app maker

    ReplyDelete
  13. Microsoft provides you best development environment around for phone developers. Mobile application development in .NET framework is more smooth and easy integrated between all devices.

    ReplyDelete