Skip to main content

Posts

Showing posts with the label WP7Dev

WP7: Thinking about performance implicitly

It's inevitable as the moon going around the earth - the performance of your Windows Phone 7 app will become an issue during your application development life cycle, hopefully you're using agile practices and therefore this won't happen to late in the process. There is one technique I believe you should always apply to the process and that is ' thinking about performance implicitly '. So I have 3 tips which help me achieve thinking about performance implicitly. The emulator is not your friend - You should as others have pointed out always be testing on a device and not the emulator - the emulator is great for spiking and unit testing but not as environment for building an application, it runs at the speed of the host and I haven't yet managed to find a WP7 phone to match the perf of my 4 * Quad Core machine :) Get the worst device possible -  Okay any device running WP7 will have been certified by MS as acceptable, but there are still great differen...

WP7Contrib: Location Push Model

Anyone who's tried to get your current location of a WP7 device will know this is not as simple as it first appears, the problems really revolve around the frequency at which the location information can be generated by the device (GeoCoordinateWatcher class) and the fact it is generated on the UI thread. Jaime Rodriguez has a very insightful post on the issues, you should read this first if you're not familiar with the issues. For the WP7Contrib we wanted to abstract away the issues and simplify the interface for any developer wanting to get location information. Following the pattern we used for Network Connectivity we use a push model using the MS Reactive Extensions for .Net. We use an observable sequence which returns the current location (latitude & longitude) in one of three ways - the current location, the location by time threshold (seconds or TimeSpan) and the location by distance threshold (metre). The interface for the location service is shown below: pub...

WP7: Know your data

If you've been developing Windows Phone 7 apps you'll be aware of the '90 MB' memory limit guideline detailed in the application certification requirements , if not it says: 5.2.5 Memory Consumption An application must not exceed 90 MB of RAM usage, except on devices that have more than 256 MB of memory. You can use the DeviceExtendedProperties class to query the amount of memory that is available on the device and modify the application behavior at runtime to take advantage of additional memory. For more information, see the DeviceExtendedProperties class in MSDN . I've heard of apps exceeding this limit and still being approved for the app store, but that is not the point of this post , the point is as a developer working on a device you should have a cursory knowledge of the size of your data. The reason is simple because when you exceed the 90 Mb limit (and in all probability you will) you'll be able to identify where your memory problems are quicker an...