Welcome to EMC Consulting Blogs Sign in | Join | Help

Jon Sharratt's Blog

Jump Start : Silverlight Windows Phone 7 Template

I suddenly realised every time I started a new project for Windows Phone 7 Development for Silverlight I was repeating my initial setup of projects way to much.  Not only that it was hampering my creativity of “just getting on with coding, the fun part!” Since this eureka..ka.ka.ka.ka moment (should have come sooner) I decided to setup a clean implementation of the way I like to approach Silverlight / Windows Phone 7 development, based on my current knowledge. 

After the “clean template” was setup I decided to use a great tool that was recently released at http://opensource.endjin.com/templify/.  Templify would allow me to package the clean template together and simply allow me in the future to just right click in Windows Explorer and deploy my template.  Simple, easy and a much more effective way of working.  I would recommend taking a look at http://blog.endjin.com/2010/10/introducing-templify/ to read more on this awesome little tool.

The choices….

Of course there are many approaches and many tools at a developers disposal to implement MVVM.  My main goal was to create a simple template that was lightweight and as clean as possible.  I chose NInject for Dependency Injection and the MVVM Light framework to take care of my view models, commands and so forth.

Panorama or Pivot

The template itself is based on the default Visual Studio 2010 templates that comes out of the box with the Windows Phone 7 Developer Tools.  Once this was done I took this forward to turn it into a lean and mean MVVM template to develop from in the future.  The template also includes the default view for a Panorama application so you can easily get started whatever route you wish to take.

Basically if you wish to get going on a Panorama style application all you require to do is open the WMAppManifest.xml file and amend the the navigation page from PivotMainPage.xaml to PanoramaMainPage.xml then delete the PivotMainPage.xaml file located within the Views folder.

image 

Hopefully you may find this useful when starting to develop your own Windows Phone 7 Silverlight applications.  Next job is to get a testing framework into the project.  If you have any feedback, requirements or suggestions please do not hesitate to comment or drop me a tweet at @jsharratt

Download

Update please see this updated post: http://bit.ly/acvbNj 

Useful References:

NInject - http://ninject.org/
MVVM Light - http://www.galasoft.ch/mvvm/getstarted/ 
Templify - http://opensource.endjin.com/templify/

Published 09 November 2010 11:30 by jon.sharratt
Filed under: , , ,

Comments

 

Mark.Mann said:

Neat project structure and template.

This will save me the pain of getting started everytime I need to whack out another application/demo!

mark

November 9, 2010 14:03
Anonymous comments are disabled

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems