Adapt Your App Part I - Creating Adaptive Windows Mobile Applications

You Can Take it With You

Syndication

News

  • Don't miss the next Windows Mobile Webcast... Unit Testing for Mobile Devices: http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032382824&EventCategory=4&culture=en-US&CountryCode=US.
Thanks to every who attended today's webcast.  It's great to see that people are really seeing the importance of understanding the issues related to insuring that your application runs on the widest set of devices possible.
 
It's really incredible how much the new Pattern's and Practices DynamicResolutionControl improves on managing different screen orientations and resolutions. Even our little application, replacing our manual orientation/resolution management code with a DynamicResolutionControl-based implementation eliminated 132 lines of code - Most importantly, we now have no code (absolutely none) in our application related to display management.
 
Then we took to the next step of componentizing the device specialization code  - in our cost managing phone support (managed, native or none) we further reduced the application. The new application is now has less then 50% of the code the original implementation had. Most importantly, all of the code in the application specifically addresses the application's core behavior (property management). As a result the program is smaller, easier to follow and will likely have fewer developer-introduced bugs.
 
Here are the resources from today's webcast:
 
Note:One thing that is very important to note. The class we used today for the UI was the DynamicResolutionControl. Most of the documentation for the Mobile Client Software Factory refers to it as the OrientationAwareControl. Just be aware that the names are interchangeable.
 
Remember that today's webcast is just part 1 of a 3 part series. Please be sure to join me next week (21-June) for Adapt Your App: Working with Windows Mobile Security and the following week (28-June) for Adapt Your App: Installing and Distributing Windows Mobile Applications.
 
Thanks again to all who attended (or viewed later on-demand) - I hope to see you again next week

Posted Jun 14 2006, 04:27 PM by jim-wilson

Comments

Larry Behrendt wrote re: Adapt Your App Part I - Creating Adaptive Windows Mobile Applications
on 11-26-2006 7:15 AM
Jim -

I'm working my way through your web casts. Thank you very much for sharing all of this great information.

One question. In an earlier web cast (I think it was in March), you showed how to roll your own code (using the form resize event, the autoscale property, etc.) to handle portrait to landscape changes, high resolution screens, square screens, etc. In this web cast, you confidently threw out all of that great code and adopted the Orientation Aware Control instead. Does the Orientation Aware Control support the square screen, VGA screens, etc., etc.?
Larry Behrendt wrote re: Adapt Your App Part I - Creating Adaptive Windows Mobile Applications
on 12-26-2006 10:35 AM
Jim -

I come on your blog site periodically to see what's new, and I came across my own post from 11/26. Not sure why you didn't reply, and not sure you'll reply to this either!

In any event, I've figured out how to get the orientation-aware control (OAC) to recognize square screens and VGA. Not too difficult.

The problem with the OAC is that you've got all of your controls stuck inside a user control. So you have to add code to the OAC to expose all of the properties, methods and events for the controls within the OAC -- or at least those properties, methods and events that you want to be able to access in code outside of the OAC.

I've figured out the easy stuff. For example, if you add a text box to an OAC and you want to change the text in the box from outside of the OAC, then you need to add a string property to the OAC and tie the string property to the text property of the text box.

I haven't figured out the harder stuff yet. For example, I haven't figured out how to address the properties in a listView control included inside of an OAC. There should be a way to do it by setting up the right properties in the OAC, but I haven't gotten it to work yet. I'm getting null reference exceptions. Also, I haven't figured out how to expose methods and events associated with controls contained in an OAC. I understand that there's a way to do it ...

Part of the problem is that there's not a lot out there on writing User Controls in .net cf 2005.

If you're listening, Jim, I'd sure appreciate some follow-up on how to use the OAC that is aimed at people like me, who program for the compact framework but who do not have much experience writing their own user controls.

I'd also like you to address two questions:

1. Is the OAC going to survive into the .net 3.0 world? Or is Microsoft going to come up with a better solution, making me regret the time I've spent trying to master the OAC?

2. Before the OAC, I might include code within a Windows form to address events raised by the controls contained in the form. With the OAC, I can now include at least some of this code in the OAC itself. For example, if I want to create a classic "Hello World" program, I can place a button inside of the OAC and add click event code inside of the OAC for that button. Or, I could include that code withing the form that contains the OAC (as soon as I figure out how to do this!). Is there any "best practice" here?

Thanks, Jim.

Larry
Jim Wilson wrote re: Adapt Your App Part I - Creating Adaptive Windows Mobile Applications
on 01-02-2007 11:22 AM
Larry;

My apologies for not addressing your earlier post. I try to answer all posts but sometimes I get busy (especially around the holidays) and miss the fact that a new post has been added.

I'm heads-down on some heavy deadlines right now but I will come back and address your questions as soon as I can.

-Jim
Larry Behrendt wrote re: Adapt Your App Part I - Creating Adaptive Windows Mobile Applications
on 01-08-2007 2:38 PM
Understand completely. Looking forward to your webcast on 1/18.
Larry Behrendt wrote re: Adapt Your App Part I - Creating Adaptive Windows Mobile Applications
on 01-11-2007 5:27 PM
Jim -

When you come up for air and can discuss this issue, I'd like to know! I've been working on some of my own solutions, and talking with the patterns and practices people. This ends up being a lot more complicated than I would have imagined, at least if you want to follow their highly abstracted approach. In any event, my questions keep changing.

I'd love to see you do a follow-up presentation on the Orientation Aware Control, now that it's in final release. It turns out to be tricky to install. Also, it's not all that intuitive how to pass information in and out of the control. The patterns and practices people really want you to embrace their entire approach to programming, which is not easy, and goes way, way beyond the functionality I wanted to capture by adopting the Orientation Aware Control in the first place.

In any event ... my questions here keep changing, and I wouldn't want you to answer any of the questions I've posted, since I may no longer HAVE these questions by the time you post. Would still love to discuss some of this stuff with you, though.

Larry

Add a Comment

(required)  
(optional)
(required)  
Remember Me?