Book Review: Mastering Xamarin.Forms

It may sound odd but from time to time I get approached to review a book which is either due to be or has just been published.

I say odd because I’m just a regular developer – not a podcasting rockstar (or even a blogging one). Why would my option be worth a free copy of a book?

Maybe it’s because I’m just a regular developer – just like most of us.

Some of these I let pass me by, especially if I have no real interest in the content, i.e. a technology that I am not using and have no plans to use – F# for example. I frequently say that ‘you have to pick your fights when it comes to technology – you can’t win them all’.

So, when Packt asked if I would review this book it made me wonder:

“How much of a master can I be after reading a book that’s ‘only’ 200 pages?”.

I’m certainly not belittling the authors efforts, but I have a Microsoft Press book ‘Creating Mobile Apps with Xamarin.Forms‘ which is more than twice that length and that doesn’t claim to be able to make me a ‘Master’.

I’ve developed a number of Xamarin.Forms applications and do so on a pragmatic basis, i.e. I do what I know works without necessarily knowing (or really needing to know) the ins and outs of why it works. I get the job done and (hopefully) produce robust applications for my clients that satisfy their requirements.

The thing is that time passes and, like most other technologies, Xamarin.Forms is being constantly updated. It’s very easy to get out of date. That said, trying to keep up with every iteration can be soul destroying resulting in development paralysis – not being able to move forward in case you make a ‘wrong’ decision that may cost you dear in the future.

Every now and then it’s a good idea to ‘take stock’ and sharpen that saw. We can never know it all and we don’t know what we don’t know.

So, what about the book?

By assuming that the reader has a working knowledge of Xamarin and Xamarin.Forms the book is able to build on this and not waste time going over the basics. That said, we do start by creating a new project, discussing MVVM and Data Binding. These are a building blocks of a Xamarin.Forms application and it’s always useful to reinforce our understanding. You never know, it may just fill in a grey area or it may introduce some syntactic sugar that will streamline your development.

For me, the early parts of the book demonstrated a pretty slick method the validation – using base classes and INotifyDataErrorInfo (a new one on me). I can’t say I’d struggled with validation but my solutions always seemed like I was using a bit more code that I’d like – creating a potential maintenance headache for the future.

When it comes to Navigation, as in moving between views rather than physically getting from A to B, most of us may well use the built in Navigation API or rely on something like MVVM Light. The author decides to create a custom Navigation Service (and explains why), based on the built-in API to create a ViewModel to ViewModel navigation (similar to MVVM Light) that streamlines the code moves it to a central location. I really liked the result and will definitely be using this in the future. Don’t get me wrong, MVVM Light is all well and good but the simplicity of the presented code was compelling.

The development of the Navigation Service leads onto the use of the built-in Dependency Service but then quickly demonstrates how to replace this with third-party Dependency Injection, the author used Ninject. I’d recently used Unity in a project so while I knew this was possible it was interesting to see a different approach.

Building up the architecture in stages, swapping out bits and pieces the whole thing came together pretty quickly.

Some books I’ve read contain code that won’t compile due to typos and missing quotes and/or parenthesis which makes you wonder about the quality of what you’re reading.

All the code in this book worked first time – bear in mind that I wasn’t copy/pasting the code, preferring to hand type it in so that it has half a chance of sticking in my aging brain in the process. The only minor glitch was a call to Device.OpenUrl which is now deprecated (although it will still compile) – but at the speed with which Xamarin.Forms is moving this is hardly surprising and easily fixed.

The book goes on to cover Custom Renderers and Platform-Specific functionality – topics which can sometimes be overlooked as ‘out of scope’.

It doesn’t stop there though – we get to create an Azure based API with a database back-end. Then we add authentication (albeit Facebook authentication), crash reporting and application monitoring.

The end result is a fully testable (did I mention the chapter on Unit Testing?) application, with ;

  • Mapping
  • Location
  • custom navigation
  • dependency injection
  • Azure API and data storage
  • Crash Reporting and Monitoring

All in less than 200 pages! That’s no mean feat. The pace didn’t feel rushed or labored – I took a couple of days to work my way through the chapters and enter the code.

Summary

So, am I now a Master of Xamarin.Forms?

Well, I have to say – probably not.

What I can absolutely say is that I have leveled up and feel much, much better equipped to develop my next Xamarin.Forms application.

I gave this book a 5 star rating on Amazon and it could be said that it should only have been 4 – because I’m not a Master as the book ‘promised’.

But I feel that I learnt a great deal – while strengthening the foundation skills and knowledge that I had already.

Book Review (of sorts): The Complete Software Developer’s Career Guide – John Sonmez

I’ve been following John Sonmez via his Simple Programmer site for a few years now and have found his approach to be very refreshing. He doesn’t go down the ‘warm and fuzzy – it will all be fine’ road, oh no!

John has a no BS approach which leaves you in no doubt that if you want to succeed in your career as a Software Developer (or anything come to think of it) then it will take hard work and dedication on your part – it won’t just happen.

Now, we all read technical books (or blogs) on a pretty regular basis in an effort to keep up with the ever changing world of technology, but what about those softer skills? Would you really buy a general ‘self help’ book? I mean, Software Developers are special right!?

I have previously read John’s first book, Soft Skills, which I found very enlightening, so when I received an email from John asking if I wanted to read a preview of his new book, The Complete Software Developer’s Career Guide, I hit the reply button straight away. [John contacted a number of his subscribers with the same request – I’m not special in that regard 😉 ].

The Book

Now this is a big book – some 800+ pages – so it was going to take a while to read. However, this all coincided with my planned two week holiday so being able to lay in the sun and just read a book for a few days was not going to be a problem.

The book is aimed at Developers at any point in their career – even if they haven’t actually started yet. I’ve been developing for over 15 years at the time of writing this but I resisted the urge to skip the early sections thinking they would be irrelevant and found some of the advise in them very informative.

In our industry it is very difficult to keep up with the tidal wave of technology; what should you learn and what should you ignore. Entering the realm of Software Development must be extremely daunting these days and John helps to distil it down to what you need to know when starting out. Remembering that it is not all about writing code – far from it.

Once you have an idea about what you need to know – how on earth do you learn all this stuff? Well, John has you covered again with his technique for learning things quickly. Obviously you won’t be a guru on the subject but John’s technique is all about identifying what you need to know to be productive and knowing when you have gained that knowledge.

The book covers areas including Source Control, Continuous Integration and Debugging – but not at a technical level. There is no explanation of why you would ‘rebase’ a git branch or how to configure Jenkins. Instead John highlights the needs for expertise in these areas.

For me Sections 4 & 5, Working as a Developer & Advancing your Career, were the most interesting. Being able to code like a ninja is great, but if you can’t function in the workplace then you are not going to realise your full potential as a Software Developer. Soft Skills are important in all walks of life but in careers like ours, i.e. heavily technical, I think that they are vital.

From how to deal with your boss and co-workers, communicating your ideas and how you should dress (regardless of whether others are wearing t-shirts and flip-flops) there’s a chapter for that. There are also chapters to make sure you come out of your annual review walking tall instead of looking at the ground, on negotiating a pay rise and dealing with prejudice and discrimination.

My Final Thoughts

As I’ve already mentioned, I’ve been following John for a while now and have already read the Soft Skills book so I know his style. With that in mind there was a lot of content in the book that I’ve either read before (on his blog or his previous Book) or watched on his YouTube channel.

So, I think that the book is a waste of time – yes?

Not at all. There was so much content in this book that I think every developer should have a copy (and John is not paying me to say that).

Throughout the book there were times when I found myself thinking “am I doing that and if not why not”. Other times I found it reinforcing what I already do in my professional life – from the way I dress at work to the way I interact within a team. This was valuable insight and empowering to me – knowing that I was not just being eccentric.