7 Deadly Sins for Windows Phone Developers: Greed
This is the 5th post in the article series “7 Deadly Sins for Windows Phone Developers!“.
What is Greed?
Greed is the desire for material wealth or gain, ignoring the realm of the spiritual. It is also called Avarice or Covetousness.
Why: You live in possibly the most pampered, consumerist society since the Roman Empire.
How does Greed relate to Windows Phone development ?
– sin of excess, desire for quick riches ..
Our greed as Windows Phone developers often surfaces when we jump the gun, before knowing consequences. Allow me to elaborate on how we can avoid some greedy pitfalls:
- Patterns: So, you have made up your mind on a dream
Windows Phone app. What’s next .. File->New Project? Wait .. think
it through a little. I’m not saying you dwell forever before getting
started; but a little thinking ahead helps. May be you start with a
subset of what you eventually want to achieve in your app. Having some
vision about the future features of your killer app will help you better
architect the solution. We all hate codebases which are a hot mess,
right? Take a look at a few software patterns and see if any appeals to
you. The goal should be to keep your application code clean & have
separation of concerns, so it’s easy to test. Is your UI tied too
closely to some business logic, making it difficult to push out
updates/fixes? Turns out, patterns like MVVM work really well in
Silverlight/Windows Phone type development. You can roll in your own or
start with some awesome toolkits which help you along the way. Some
prominent ones are MVVM Light, UltraLight MVVM & Caliburn Micro.
- Localization & Globalization: Did you think you
could write once & reuse your app many times over to make money?
While there is nothing stopping you from releasing your English app
worldwide to all Markets, eventually the laziness will take a toll on
your fame/money. Have you considered that the fact that non-native
speakers may not have the best UX on your app unless it is
localized/globalized? Yes, it’s difficult; but bite the bullet & you
will see plentiful rewards. A great starting point is here.
Pick your favorite translation service & see how far you can get.
Seek localization help from friends or fellow Windows Phone developers
across the world, so that your App language feels natural.
- Performance: Understand Data Virtualization,
period. This helps in making sense of the price you pay for the choices
you made, both in your Listbox DataTemplate & the actual data list
it is bound to. Great articles here, here & here. Still in doubt about your App’s performance & rendering of XAML pages? Whip out the Windows Phone Profiler tool to identify performance problems in your app .. a great starting point is here.
- Background Agents: Using your single allowed
Background agent? Good. But do not take your Periodic Task to its
deathly limits. Remember, there are constraints
on such Periodic Tasks, meant to be small amounts of code run for a
small amount of time on a regular recurring interval. If you try doing
too much, you enter the realm of unknown where the OS will simply shut
down your background process. Result – bad UX since “Both periodic and
resource-intensive agents are unscheduled if they exit two consecutive
times due to exceeding the memory quota or any other unhandled
exception. The agents must be rescheduled by the foreground
- SQL CE: I know we all hankered for SQL CE support prior to Mango; and now we have it. Nice walkthrough here.
But unless you have truly relational data & a very very good reason
to use it, don’t. Because, it is a layer of orchestration on top of
Isolated Storage and you are taking a little performance hit.
- Design: Remember Metro – simple, elegant &
chromeless. There is a fair amount precision behind Metro though ..
spacing & placement matters. The MetroGridHelper
nuget should help. First rule of Metro – just because we can, doesn’t
mean we should. I have mentioned this before, but again the 31 week article series by Arturo Toledo explaining the crux of Metro is a fantastic read.
- Icons: In your zeal to get started & do everything yourself, do not forget to look around to see if the Metro AppBar or other icons you need are already available or not. There are great collection of Metro icons available here & here.
See? Little restraint & our Windows Phone app codebase can flourish systematically, without having to reinvent the wheel. Happy You & Happier Users. Hopefully, you come back for the 6th article in this series of “7 Deadly Sins for Windows Phone Developers!“.