What to do for Mobile apps?

Oct 11, 2011 at 4:51 PM

I started using Simple MVVM Toolkit a few months ago for my first MVVM project, all is going well and the project is growing and growing and pretty enjoyable to work on.  Then...

My project manager has come to me and said that my next step will be to make a mobile version of the app that doesn't use silverlight (for compatibility)

What technology should I use to create a mobile 'view' that doesn't use silverlight, but I can still use my existing ViewModels(less work)?  Or am I thinking wrong and should design a mobile site that mobile devices get redirected to (more work).

 

Thanks, 

Robert

Oct 11, 2011 at 10:24 PM

Hi Robert, 

A clear distinction is that MVVM is a pattern not  a technology. If you wanted to follow a similar pattern for the web you could use MVC. The issue you will have is when coding a silverlight project you are actually using unmanaged assemblies. The Silverlight .net library is scaled back from the full .net library. IF you decided to stick with ASP.NET and you followed a pure MVVM pattern you should be able to port a majority of your code over. Where you will come into issues is in the view and the re-write of the UI. (html vs xaml). There are also some fundamental differences in usability that you will have to account for.  However, the MVC pattern will get you very close and you should be able to reuse most of the code (classes methods written by you).  This of course excludes the MVVM toolkit as the toolkit was written for Silverlight and leverages the assemblies within SL. The helpers, databinding etc used within SL is not available ( within the same context) within ASP.NET or MVC and will require a re-write.

Oct 12, 2011 at 4:04 PM

Thanks rlcrews.  

  Pretty much what I suspected, but you put it much more clearly for me.  I was thinking MVC might be the answer, but didn't have a clear explanation why.

Thanks again

Robert

Coordinator
Oct 12, 2011 at 4:30 PM

Thanks guys,  ASP.NET MVC is a different beast than MVVM in a rich client such as Silverlight or WPF.  The key difference is data binding and reliance on INotifyPropertyChanged.  That said, I believe that there may be some toolkits that basically make the browser more of a rich client (maybe upper middle class) with jQuery.  Check out Backbone and Spine.

Cheers,

Tony

Oct 13, 2011 at 5:07 PM

Thanks Tony, I'll check them out.

 

Robert