28 May 2013

Windows Store app Development snack: XAMLSPY

For more posts in this series, see the series index.

xamlspuThe above video shows the great XAMLSPY tool which is a massively helpful tool when working with any XAML based application, like a Windows Store app. XAMLSpy allows you to get insights such as performance & memory usage but for me the real value is when you add it to the application you get a set of small tools to use in the app to help identify and navigate the XAML.

xamlspyOnce you have found the piece of XAML that is causing issues, you can test out your ideas in real time using the real time editor functions which really speeds up development. This is a must have tool for those who really have pride in their craft!

08 May 2013

Windows Store app Development snack: Compress your images!

For more posts in this series, see the series index.

This post is both a development snack, i.e. something I think you should know to build better Windows Store apps, as well as being part of the Treasure Map transparency, which are meant to show you how we built a real Windows Store app.

Size Matters

Lab Rat

Clipboard01In web development, there is often a concern to get the download size of the page down & there are plenty of tools to help with this (Visual Studio has a lot for CSS & JavaScript) but when we get to app development, size isn’t always as big a concern.

Windows Phone development made 20Mb an important limit, since that meant the download could go over 3G rather than requiring WiFi – this is why my Lab Rat comic book for Windows Phone is 17Mb in size. I made a very conscience choice to ensure it would fit under 20Mb.

Windows Store apps don’t have a similar limit to Windows Phone – so when I was recreating Lab Rat for Windows 8, I just went with the highest resolution images I could so it would look great. This resulted in the download being 225Mb!

Treasure Map

Clipboard02With version 1 of the treasure map, no one really thought of file size either rather focusing on making it look and feel great. Which resulted in it containing a lot of high resolution images and many of them in the JPEG format. When we shipped version 1, we shipped a 57Mb install!

Small is better

For version 2 of the treasure map, one piece of feedback we got (I believe the awesome Mike Fourie raised it) was that it was a big download. So I spent some time looking through our assets and doing some sneaky clean-up and in the process learnt a bit.

JPEG

It’s crap – use PNG. PNG is better quality and for most scenarios is smaller in file size. So in both Lab Rat & Treasure Map the first step was to replace all the JPEG images (including assets like store logo) with PNG.

If you want more info on the differences between JPEG and PNG see this amazing StackOverflow answer.

PNG 32, 24, 16, 8… oh my

Clipboard03A PNG isn’t PNG – in fact PNG’s can specify the bit depth of each of the channels they support which directly impacts how distinct colours they support. They can also allocate a specific bit in the colours to indicate transparency. However if you do not need transparency, which in the case for the bulk of Lab Rat & Treasure Map is true, you can save bit for a colour.

Very few images will have all 16 million colours that are needed, so if you identify how many unique colours there are, then you can shrink the bit depth which results in a smaller file. I did some work on this and found two pretty interesting tools:

  • TinyPNG – a free website to do this. Only downside, one file at a time.
  • PNGoo – a free Windows tool that can do bulk changes. Not as easy as the website to use though.

So I ran both Lab Rat & Treasure Map through that and we got a MASSIVE saving in disk.

  • Treasure Map went from 57Mb to (approx.) 11Mb – so a saving of 80%. The 11Mb is just a test on my machine and also includes a lot of new resources, so it may change by release.
  • Lab Rat went from 225Mb to 89Mb! So a saving of 60%!

Summary

So in summary, use PNG not JPG & make sure you compress your images before you release!

21 Apr 2013

TechEd Africa 2013: Windows Store Apps - Tips & Tricks

On Thursday I presented at TechEd Africa 2013 the third & final of my talks which was very personal in nature as I spent a lot of time talking about what I did wrong & what I wish I knew when I started building Windows Store apps. The title of the talk was Windows Store Apps – Tips & Tricks! If you click more (below) you will be able to grab the slides, demos & my demo script if you are wanting to see what I was doing.

18 Apr 2013

TechEd Africa 2013: What's new in LightSwitch 2013?

Today I presented at TechEd Africa 2013 the second of my talks which is my personal favourite What’s new in LightSwitch 2013! If you click more (below) you will be able to grab the slides, demos & my demo script if you are wanting to see what I was doing.

The one item I gave the LEAST amount of coverage to was the SharePoint story, which is really amazing and deserved more. So if you would like to know more about it have a look at Brian Moores blog post on this. Of course, no LightSwitch talk is complete with a mention to Michael Washington (who is Mr. LightSwitch – if he was born in the UK, he would Sir. LightSwitch already) but I never showed his website URL, so here it is: www.lightswitchhelpwebsite.com

Download the completed demo

AttachmentSize
File LightSwitch Demo Script62.96 KB
17 Apr 2013

TechEd Africa 2013: What's new in .NET 4.5 & Visual Studio 2012!

Today I presented at TechEd Africa 2013 the first of my talks which is a massive two hour overview of what is new in .NET 4.5 & VS 2012! If you click more (below) you will be able to grab the slides, demos & my demo script if you are wanting to see what I was doing.

For those who could not attend, part one is very similar to this presentation what I did last year!

02 Apr 2013

Haven't I seen these presentations before?

imageIn a few short weeks I will be speaking at TechEd Africa 2013 and if you have come to my talks before (previous TechEd’s, TechDays, Hogshead when I have had one too many) you may see that I am giving similar sounding content – so why should you come to these TechEd talks? What will be new and awesome? I am going to give you an honest review of what you can expect from the three talks below.

Windows Store Apps, Tips & Tricks from the field

This is a brand new talk, filled with awesome new content for people developing apps for Windows 8 today & going forward to the Windows ‘Blue’ world. Some of this is from Windows Store app Development Snack series but not all of it, especially in the architecture & tooling sections of the talk.

Note: This is not an introduction to Windows Store apps talk – I will assume the audience has some of the concepts of apps already. So for example, I will talk about background tasks but not explain what they are or where they used in any depth.

What’s new in .NET 4.5 & VS 2012

Same title as my TechDays talk and really this is the version 2 of that talk. So what can you expect different from TechDays?

  • Part 1 is very similar, in fact you could probably just watch the YouTube video of that part & get 95% of the content. I will have some new tricks, especially since we have two updates to VS available now & I have adjusted the emphasis in some places – but that is the only changes in part 1.
  • Part 2 is very different, both the WCF & LightSwitch sections are gone! LightSwitch was dropped because I have an hour long talk just on that :) WCF was dropped since the demo’s were not great and despite it being an amazing tool, the focus for the talk needs to be what’s new – and the new way for API’s is WebAPI. Do not read that as WCF is dead – hardly, just it doesn’t meet this talks requirements. This means I freed up a lot of time, so I am filling it with A LOT of new ASP.NET content. I will show you tricks & tips in ASP.NET land that will blow your mind away!

What’s new in LightSwitch

This session is vastly different my previous LightSwitch talks – we will start in roughly the same way and look at what it does however rather than 1 hour on that, we do a higher level treatment of that in 20min.  So if you never have seen LightSwitch – I am ensuring you are catered for. That is followed by a quick view of the new stuff and then finally we look to the future and the amazing new items coming down the line.

This talk is aimed at those who have never seen LightSwitch, those who have & those we are using it and want to see where it is headed – so basically everyone :)

28 Mar 2013

Visual Studio: Auto-load changes, if saved

Visual Studio is great, but if you are using external tools like Git or Blend at the same time, the constant prompting to update/reload files can be annoying. In this short video I show a great option, that you can enable in Visual Studio that will make the experience a lot more pleasurable.

If you want this option to work with project & solution files in future, please vote on it at User Voice.

27 Mar 2013

Visual Studio: PRESENTON!

It sounds a bit like something Inspector Gadget may say: PRESENT ON! but this is a command in Visual Studio that makes VS shine for presentations. I spoke about it in my video on presenter tricks but love this so much, it needs it’s own blog post too! Simply put, it makes the entire of VS look better:

image

To show this I took a photo (with camera phone) when off & when on during a talk I recently gave. Just looking at the difference – the second is easier to see what is going on.

While it does lots of things, let me highlight some of the critical differences:

image

image

So how do you use this?

First you must download the productivity power tools extension from Microsoft. This is a free extension & not only gives you this, but also gives you a lot more AWESOME functionality. Next you need to go to the Quick Launch box in Visual Studio 2012.

image 

Now type: PRESENTON and hit enter (or click the item in the list when it appears). BOOM! Done! Happy Audiences!

image

When you are finished, just type PRESENTOFF in Quick Launch and you are back to normal.

Pages