7 Deadly Sins for Windows Phone Developers: Greed
Join the DZone community and get the full member experience.
Join For Free
this is the 5th post in the article series “
7 deadly sins for windows phone developers!
“.
what is greed?
from http://deadlysins.com:
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
application.”
-
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!
“.
adios!
Published at DZone with permission of Samidip Basu, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments