Skip to main content

Want to go to JSinSA for free?

I ♥ JSinSA – it is easily on the best conferences in South Africa and every year I learn a lot at the event! The importance of JavaScript development has never been so high – this is the time to attend this event! So to help you get to the event, I am giving away one free ticket to the event!

All you need to do to enter, is simply tweet about this:

Details:

  • The tweet must include my Twitter name (@rmaclean) and the hash tag #jsinsa – to be valid
  • The competition closes at midnight on 17th May 2013.
  • I will contact the winner after the competition closes to arrange the delivery of the ticket.
  • This is one free ticket – you have to get to the event yourself.
  • This is a standard ticket – so you get everything a normal attendee to the event gets.
  • I am using Beeliked to run this so any issues about draw or technical stuff, see their website.
  • If I completely get this tech wrong, then I will pick a winner at random.
  • Judges (aka me) decision is final.
  • If you are making your own tweet, make sure the hashtag (#jsinsa) & the mention do not have characters following them, like a comma or full stop or the system seems not pick them up correctly. Easier - just hit the button above.

Be good, or be good at it

Introduction

This is the second post in the behind the scenes look at what it is like to build and ship a product as an ALM Ranger. The product is the ALM treasure map & this video on channel 9 gives a good insight into what is going on.

It should also be noted that these posts are meant as a more brain dump than an actual learning reference.

What to do with a drunken sailor (with capacity)

In our last sprint, I got all my work done quickly (no walking the plank here) – but I still had capacity and since the crew all did their work quickly too I couldn’t steal work items to keep me out of trouble… so what to do?

  • Step one: create some work items for myself.
  • Step two: do said work items
  • Step three: ?
  • Step four: profit!

Hopefully these changes put us in a better starting position for v2 dev which really kicks off in the sprint starting today!

What did those work items contain?

To create some work items I started by just swabbing the deck, so to speak – just cleaning up the solution, removing old folders & code.

Tiles

Starting with the tiles, I went through the assets we have and removed icons we do not used & renamed the existing ones so the right tiles load at the right resolutions. This is much easier to get right thanks to the improved manifest designer in Update 1 of VS 2012. This also helped me find a bunch of missing resolutions which have been sent to Anisha to create the artwork for.

Async

Our DB load method used async but didn’t implement the conventions properly, so that has been changed to return a Task (I didn’t do that, but I am glad it was done) & renamed to have the async suffix on the name.

Category

For some reason we had an old category.cs file in our view models, so in v1 we named our view model categoryviewmodel.cs which bugged me. So removed old file, renamed & fixed class name. Hopefully makes it easier to navigate & also helps with another tasks I did below.

ViewModel Injection

One of the aspects in our MVVM implementation was that the view was responsible to load the correct view model it needed. So every view either had code in it’s OnNavigate event or in the XAML, which was not bad. The performance issue here was that if you moved from full to snapped views, for example, the view would change & thus we would recreate the view model too! So performance could be better there. We haven’t hit state issues yet, but it could’ve lead to that (think typing in text box, switch to snapped & the stuff you typed is gone since we have a new view model instance).

The solution here was to have the navigation system control this, so using conventions again, it looks for the matching view model for the view we want and if we already have that view model available we use that, if not we create a new instance. The navigation system then injects the view model into the views data context property automatically cleaning up the code in the views too!

This added about sixty lines of code to the navigation code, but means the views & view models are simpler to work with!

Code Analysis

imageVS has a great code analysis feature and it is part of our quality gate to ship the release so I took the time to bump it up to full rules (we normally use recommended) and see what that could find. It found a lot and I went through those and did cleanup to the parts that made sense such as removing unused code & cleaning up the AssemblyInfo.cs file.

I have also switched on code analysis (with recommended rules) as part of the VS debug build options so that while we are developing we are also thinking of our quality gates, so hopefully our final sprint is quickly done!

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.

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

File attachments

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!

Rangers Treasure Map v2: Transparency & my first design notes

Overview

I am a proud ALM Ranger and one of the projects I am in is the ALM Rangers Treasure map – we have just started work on version two of it and part of that is an effort to increase the transparency of the project. To facilitate this, each team member will be blogging about their experiences and thoughts on what they are doing for all to see. None of these should be seen as statement of fact or official Microsoft views – rather these are personal views of people working on a project. You can find a table of contents for ALL posts on Willy-Peter’s blog.

Lastly these notes are written with those involved in mind, so I am not going to explain everything – that said if you would like to know more about something, just post a comment and I will go into a lot more detail on it for you.

My first set of design notes

With the overview done, I’ll start off with my first set of design notes which look at how we could fulfil the following Epic: As Alex, the technology consultant, I would like to view my progress through the guidance on the live tile without launching the application.

This epic is broken into two features which I will break down further below.


Feature: Enable users to track their progress through the guidance, sync to the cloud, track on live tile.

The first thing I like to do with designs like this is get a simplified list of goals, really should be no more than three or four items that I can then dig into more detail. So for this feature understanding of the distilled list of goals on this would be:

  1. We need cloud sync
  2. We need live tile - I do not see this as cloud push live tile (for example sports app), rather app generated live tile (for example photo app)
  3. We need to do chart rendering to image for the live tile.
We need cloud sync

Windows RT already supports this and it is a fairly simple thing to do. I am proposing a small wrapper layer around the built in aspects to give us a consistent way to work with this data. There is some overlap here with the features of another Epic (As Alex, the technology consultant, I would like to be able to mark treasure items as complete within the ALM guidance, see the same progress on all my devices where the application is installed, and be able to show/hide completed items) so this may be a feature that is moved out of here and into the other one.

Technically the two API's for cloud sync in Windows RT are:

  • Windows.Storage.ApplicationData.Current.RoamingSettings : Gives a key/value store. Each key/value can be up to 8K with max of 64K
  • Windows.Storage.ApplicationData.Current.RoamingFolder : Gives a blob storage. Storage has a quota that can be obtained via code.

My idea around the wrapper is to give a simple API that allows us to say something like ToggleStatus(Status.Done, <item id>);

This would store it in either a small XML file in roaming folder or in roaming settings as a key/value. I propose this style so we could extend it to work for favourites too. From the discussion already, the key/value store may be the easiest way to do this.

This API also needs to be able to assist for the map pages where they can ask, how many of items of group X are done (maybe something like GetStatusCount(<group id>, Status.Done) [return int] and also GetItems(<group id>, Status.Done) [returns IEnumerable of the items].

Impact on code: All new code. A new API for our app and then sprinkling the ToggleStatus around the app in the right places.

We need live tile

Easy enough to do again – really what we need the design of what it should look like. We need both a design for small & wide. Live tiles can take image or text, so if we planning on chart - it will mean rendering an image (see below). My thinking here is on app start up & potentially every time ToggleStatus is called we update the tile in a separate Thread/Task. API here is simply the TileUpdateManager.CreateTileUpdaterForApplication().Update(??);

Impact on code: All new code. New bit to the app start and then integration to the above ToggleStatus

Note: We could push this via a service, however that means an external dependency and we are really trying to avoid that. So having it all in app makes me feel a lot happier.

We need to do chart rendering to image for the live tile

This is going to be tough - we have some drawing primitive support in the runtime, but really we will need to rely on third party code here most importantly http://writeablebitmapex.codeplex.com/ (MS-PL license). Once that is done we can look at trying to figure out a nice (intentional usage of a word that could mean different things to different people, since how nice it is will be a factor of how much work we put in) way to generate a chart.

While this is possible, maybe a chart should be a stretch goal on this because anytime we take on an external dependency, it also needs to meet the quality gates from Microsoft & also needs to meet legal requirements for Microsoft. This can add a load of additional time onto a project. So shifting the chart to a stretch goal (i.e. if all comes together we do it) or pushing it out to vNext maybe better.

This may not be the only option – so we need to check with internal contacts at MS for advice on this.

Impact on code: New dependency on Writeablebitmapex + all new code. No impact outside the above items.


Feature: Add ALM blog tracking / news to the app + live tile.

My understanding of a distilled list of goals on this:

  1. Grab Rangers RSS feed into app
  2. Show RSS feed in app
  3. Show RSS feed on live tile
Grab Rangers RSS feed into app

This is pretty simple, we have a pre-configured list of URL's (can be placed in the XML file) that we then parse on start up (in a separate thread/task) with the SyndicationClient API in Windows RT. My feeling is this is just temp data so we can just store in memory but I would love some feedback on that?

Impact on code: New API that wraps this. Changes to XML file & it's API. Some additional start up stuff.

Show RSS feed in app

This is really just a listview with items being shown. Minor impact.

Needs a design though.

Show RSS feed on live tile

This is easy, grab x items from feeds (above) and send to the live tile immediately. We need to plan this with the stats display since we only really have 5 tiles to rotate through. So maybe 1 or 2 for stats and rest for top news article from feeds? I am thinking simple text here will be best.

Question I have here, is what happens when I tap that item. We can detect what tile was shown so do we just go to the general feed view (easy & low impact) or do we try and find the exact item (more tricky since we need to persist some data to match it all together). This is more UX design issue than a dev feature.

Code impact (general feed) - none, it will just be part of the above.

Code impact (matching item) - to existing is none, but the scope for the first item is bigger since we should persist some info on the feed locally so we can quickly launch to the item and show something.

XAML (Windows Store apps) editing in Visual Studio broken with NVIDIA Optimus

I have a fancy laptop that seems to delight in giving me headaches, and the latest is to do with Windows Store app development. The problem is simple, you edit the XAML and nothing happens! You need to trigger a full redraw of the screen to get it to render the changes, the below video may explain it better:

The issue here is that my fancy laptop has two graphics cards, a low powered Intel one (great for battery – average for performance) & a high powered NVIDIA one (bad for battery – great for performance). Add to this, that it uses a new technology from NVIDIA called Optimus which allows individual parts of the screen to be rendered by each card – the best explanation of this can be found on SuperUser.

So what is the solution to this problem? Disable one of the graphics card – yeah, that is the work around at this point. I am doing this by using device manager to disable the NVIDIA one.

image

That fixes the rendering issue and allows Visual Studio to work properly. Not great by any stretch of the imagination.

MVP's @ TechEd Africa 2013

Microsoft_MVP_logoWith TechEd fast approaching, I have been asked a few times who are interesting presenters to see. That is always a tough problem to answer since it depends on what you like. One group of people who are always great are Microsoft MVPs, although I maybe biased, and there are a few presenting at TechEd.

(Click the names – they take you to their TechEd profiles which has, links to blogs etc… & a list of their talks)

There is also a couple of ex-MVP’s I spotted presenting too:

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 :)

TechEd Africa 2013: Levels

imageIn 2010, I wrote a post about how to find the best sessions at TechEd, which is as valid then as it is now… Except for one thing, the decoding sessions part:

Every session at Tech·Ed has a code, and this code has some key information that will mean you get to the right sessions easily. If I look at one of the sessions I am presenting, the code associated is APS309, but what does that mean?

  • APS – This is the track, or the high level concept that the session is part of. APS in this case refers to Application Server. Microsoft has a great guide to all these TLA (three letter acronyms) on the technical track page. The only item missing from there is WTB, which stands for Whiteboard which I will cover next.
  • 3 – This digit is key, it identifies the level of the session and is between 1 and 4.
    • 1 indicates a introduction session - where you can come in with zero knowledge on the topic. Expect it not to be deep, expect the pace to be slow and expect it to cover the concepts.
    • 2 indicates a beginner session - you should’ve seen something on it before arriving. Expect it to cover usage scenarios and the pace and depth to be increased.
    • 3 indicates a technical session – you should be working with the technology. These often go fast and deep or explore a new area in that space.
    • 4 indicates a deep dive – you should expect a session that is for the most advanced of people.
  • 09 – This is a unique identifier.

TechEd this year still has the little codes that help you identify what the talk is about. However you will NOT find any sessions of the level 100 type (that first digit). This doesn’t mean there are no introduction sessions, far from that. What happened is that someone at Microsoft has decided that all level 100 will be reclassified as level 200’s as well. So when you look at the codes, and you see a level 200 session: it could be a introduction or beginner level talk.

This means that the next piece of advice from that post is even more important this year in ensuring the talks you attend are the right talks for you!

The next thing about understanding is to read the abstract for the topic, this is the overall plan for the session. So if we take my session again, the title is: Intro to Workflow Services and Windows Server AppFabric however if you read the abstract you will note that it mentions Workflow Foundation (WF) first and talks about developers using it. Then it mentions WF and usage with Windows Communication Foundation (WCF) and how they integrate in .NET 4. Finally it mentions AppFabric and hosting.