Learning to cook with WP 7.5 data (a book review)
Join the DZone community and get the full member experience.
Join For Freerecently i received a review copy of the “windows phone 7.5 data cookbook” by ramesh thalli from packt publishing (isbn 978-1-84969-122-2). this book, divided in 8 chapters, shows how simple it is to write data-driven programs wp7 applications.
what follows is an extensive review of this book.
the basic premises of the book is the same as the other packt ‘cookbooks’: each chapter consists of several step-by-step tutorials (dubbed “recipes”) , each time resulting in a mini-program with full functionality.
the main application that is rebuilt each time is a simple task manager. each chapter 3 or more recipes are shown, usually (re)building the main task application. after each chapter and recipe a short explanation and reference to online sources is given .
the book is aimed at developers who have little to no wp7 experience,
however a solid silverlight understanding is a must (for any wp7
developer that is) to get the most from this book. the 8 chapters are
logically ordered, each time increasing in complexity :
- chapter 1 is a basic refresher on how data binding works in a windows phone 7 app.
- chapter 2 describes how the local, isolated storage of the phone can be used to save data (to files) or settings. you can check out this chapter here .
-
chapter 3 explains how
xml data
(local and remote)
can be parsed using both linq-to-xml or an xmlreader. the final recipe
than explains how object (de)serialization to/from xml can be
accomplished.
the first 3 chapters explain topics of which an abundant amount of
online tutorials exist. they didn’t really add much additional value for
people already familiar with the basics of wp7. though it should be
pointed out that even the first recipes always did something ‘cool’ or
new in addition to the core topic: most tutorials stop once the basic
idea is explained. in chapter 2, for example, an image file is read and
subsequently the image is then used as a background image for the app.
it’s a small addition, but it lifts this (and other) recipe to a new,
more usable, real-world example instead of a basic tutorial.
-
chapter 4 is where the fun stuff starts. here, the open data or
odata
protocol is shown. the odata api of netflix is used to show movie
information on the phone; followed by a demonstration of crud operations
with odata (using the odata.org api as example).
-
in chapter 5 we meet the new goodie of the mango phone, being
on-device databases
.
before mango things like the sterling nosql oodb already existed.
however, mango now also provides out-of-the-box local databases which
is, in my opinion, a nifty add-on. in this chapter 3 types of local
databases are shown, namely: sql lite, sql ce and mcobject’s perst
(never heard of that one before and still not entirely sure why this one
was added to the book). again, this chapter goes further than most
tutorials and also shows how to actually create a database using the sql
management studio and also import the db in the actual phone project.
-
rest services
are up in chapter 6. the first recipe
shows the classic example of consuming an rss feed, which basically is a
repetition of the xml- chapter 2 with the addition of downloading the
xmlstring using the webclient class . after that, the twitter api is
briefly shown and how it can be used to consume any twitter –data you
wish. finally , a simple rest service server is setup using asp.net’s
webmatrix , with the results being streamed in the json format and
visualized on the phone.
-
the second to last chapter 7 is titled
wcf
. the
author quickly shows how to setup a wcf service, push some real (task)
data to the phone and visualize it. though these first 2 recipes are
again pretty much ‘standard tutorial stuff’, the last one goes a step
further and uses an actual sql server express database as the services’
datasource. the ado.net entity framework (ef) is then used as orm
between the db and the service (including linq-to-entities) to provide a
real-world example, which was pretty sweet to see.
-
the final chapter (8) is the, meager, icing on the cake: in a few recipes the very basics of building an
mvvm
application
is shown. i’m still looking for the ‘ultimate mvvm tutorial for
beginners’ and i’m afraid this one isn’t a candidate (truth be told: i
haven’t found any candidates so far except for pete browns chapter in
his silverlight 4 in action book). aside from not being very extensive,
the basics are laid out very clearly including how to use bugnion’s mvvm
light toolkit. unfortunately it would’ve been cool if the same ‘finale’
was given as in the previous chapter (i.e. retrieve the results from a
wcf+ef service) as this was the final chapter.
though the book covers a lot of stuff, it only counts a meager 207 pages: compared to gill cleeren’s silverlight 4 data services cookbook , the biggest ‘loss’ of pages is due to the lack of additional information being given. basically each recipes can be followed but once you want to find out why this or that step actually works the book can’t help anymore. it’s also a shame that only the first few pages of code have the most important parts highlighted in bold fonts. by highlighting this code, it easy to quickly see in a big pile of xaml what the essential part is (even more once the boiler-plate code starts becoming repetitive). for some reason, the author stopped doing that after chapter 1.
to conclude; the concept of independent recipes makes it ideal to pick any chapter (or recipe) and start building stuff, without any dependencies on previous chapters or recipes. the downside however is that this also results in lots of identical steps that need to be taken each recipe. for me, this book is ideal in a classroom environment: students can be given a weekly recipe to solve and expand without the need of having made previous recipes.
if the idea of this cookbook is to whet one’s appetite of what can be done with the new 7.5 mango phone, it certainly succeeds . if on the other hand you expect in-depth explanation of one or more related topics, skip this one.
more information on this book can be found on the publisher’s site: here
source: https://timdams.wordpress.com/2011/12/08/learning-to-cook-with-wp-7-5-data-a-book-review/
Opinions expressed by DZone contributors are their own.
Comments