rulururu

post Don’t share the presentation?

August 2nd, 2007

Filed under: UI, coding, pocket pc — mike hall @ 6:55 pm

Back in my younger days when I used to write a lot of little tools, I would try to the same code build on both the desktop and the pocket pc. Two project files: one for visual studio and one for eMbedded Visual C++ (what’s with the big ‘M’ anyway?). So today I picked up the July issue of MSDN magazine and saw this article on sharing code between a mobile and desktop version of the same app in .NET. I’ve been doing more and more .NET so I was intrigued.

It talked about the controls and namespaces that aren’t shared between the two platforms, common pitfalls when coders try to port a desktop app to a mobile app and so on. Then it came around with this:

It is best not to share the UI layer of an application - just share the business logic.

That immediately struck a nerve with me, because my bread n butter app (soon to be released!) that I’ve been developing for a few years now, did just that: shared all the code between both platforms. That includes the business logic and the UI:

I controlled all of my platform dependent code on #define’s and subsequently built two executable. C# has some support for #define’s (although not as complete), so it could be done similarly. Checking Environment.OSVersion.Platform would be problematic because of JIT compiling and the assembly-loading-crashy-goodness that can ensue. So there’s one problem.

And for rich desktop apps like visual studio or outlook, this just simply isn’t an option:

The desktop version needs to be more UI intensive and provide a richer experience.

…Although I don’t think this is always true. For some apps, sharing the front end is completely ok. I’m not quite sure where to draw the line at where it’s not acceptable to share the UI though. It could be if the number of panels in your application becomes too cumbersome to control in a mobile app, then you need to split the UI. Or maybe simply if the size or scope of the app becomes too great that need to split the UI.

Or maybe it just comes down to the more advanced and more UI driven your application is, the less likely you are to successfully present a consistent interface on both platforms and not sacrifice some functionality that the desktop interface could provide.

…but what do you think?

1 Comment »

  1. […] I started using the news reader I wrote Vein News. With a proprietary folder structure and some XML, multiple computers could share a data store […]

    Pingback by i like ellipses… » Why I use Google Reader
    December 27, 2007 @ 12:16 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

ruldrurd

Powered by WordPress, Theme based off the "I'm Okay" theme by Laurentiu Piron

Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 United States License.


Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.