Tag Archive | Windows Phone

Micro-talks Review

The Crowd

As promised I ran the Micro-talks event at the University of Hull Department of Computer Science Christmas Bash (try saying that 10 times quickly) last week. We had a surprisingly high turn out and a lot of familiar faces got involved! In fact, the room had nearly twice as many people in by the time it filled out as are in the photo above — I counted around 45 in total.

I started us off by managing to throw together a few slides, and talk for a few minutes, about entering the world of open source for the first time. If you found yourself inspired by that you should check out my blog post on the same subject here.

The assortment of prizes I bought along for speakers and listeners alike!

The assortment of prizes I bought along for speakers and listeners alike!

Once I’d finished my bit and introduced the prizes, generously provided by Microsoft, fellow MSP Merrick Sapsford, took the floor to talk about why developing for charities can be a worthwhile endeavour. Merrick develops applications to support a charity which maintains and flies the last XH558 Vulcan Bomber.

Merrick Talking about his Vulcan Bomber App for the iPhone

Merrick Talking about his Vulcan Bomber App for the iPhone

Through this work he has managed to make connections with other aviation companies that are giving him paid work, has managed to get into a list of some of the top grossing apps on the iPhone Store and has even managed to get a few free iPhones in the process. You can check out his app here.

Rob Miles and his "Connected Fun"

Rob Miles and his “Connected Fun”

Lecturer Rob Miles had a presentation of his own, which included some cool lights which he could change the colour of using the Bluetooth connection from his Windows Phone. You can check out Robs round-up — and considerably better quality photos — on his blog.

Dr. David Grey on "FoodCloud"

Dr. David Grey on “FoodCloud”

Dr. David Grey — who you may remember from such introductory lectures as… — had the unenviable task of following Rob. Dr. Grey spoke about FoodCloud — a multi-platform augmented reality application the university is developing as part of its research into teaching people about how their food is grown and produced. The app seemed like a really cool idea and the implementation was obviously really smooth! It’s a shame we don’t hear more about research within the department (until recently I was under the impression the department did very little)

Simon Grey inviting people to Global Game Jam '14

Simon Grey inviting people to Global Game Jam ’14

To finish things up Simon Grey, without the use of even the 4 slides he was allowed, invited everyone to sign up for Global Game Jam 2014. GGJ is a games development competition over 48 hours, like a double length Three Thing Game, which takes place all across the world, starting at 5pm in each time zone. This year Hull will be hosting the biggest individual event in the UK, in a collaboration between The University of Hull, Hull College and the Grimsby Institute. Simons put a lot of work in so if you’re interested you should sign up here.

Overall the event was a success, a lot of people heard and learnt about a lot of cool stuff. Hopefully people were inspired to do something new, and if not at least there was pizza afterwards… 😉 I hope anyone who nabbed a prize enjoyed what they got. The Microsoft-branded lip balm seemed to be a crowd pleaser at any rate. Hopefully we will take what we learnt from this event and try something similar again next semester!

Danny

Campus Party : Europe in London

Last week I was fortunate enough to be with some of my fellow Microsoft Student Partners, some Windows Ambassadors, some Microsoft Interns and some Microsoft Employees at Campus Party Europe, an event which was described by the BBC as ‘Glastonbury for geeks’.

I would say this was fairly accurate, except there was less mud! Like Glastonbury there were several stages, a whole host of interesting people to meet, and tents!

Working on the Microsoft Stand

Tuesday through to Friday I worked for 6 hours a day on the Microsoft Stand. It was really good fun! Our job was to talk to people about Windows 8.1, Windows Phone 8, Microsoft Surface and the Xbox One and endeavour to answer any questions they had about either the software or hardware. As well as that we tried to get as many people as possible to take our surveys, in return each participant got a surprisingly stylish pair of Windows 8 Branded Sunglasses and a glow stick!

I was also fortunate enough to have Academic Audience Lead Phil Cross, point a few developers who had questions about Visual Studio and developing for Windows platforms my way.

The TeamworkPM App for Windows 8 I developed on the 2 big displays and the Surface Pro I wrote it on

The TeamworkPM App for Windows 8 I developed on the 2 big displays and the Surface Pro I wrote it on

Throughout Wednesday and Thursday I spent much of my shifts writing a Windows 8 app for the project management website TeamworkPM. It was especially interesting to do this because my display was being projected on two 42inch monitors above my head, this meant everyone could see what I was doing and I attracted quite a few developers to come and talk about developing for the platform.

In the evenings when the stand got a bit quiet we would try to entice people to come and see our wares in a variety of ways, one of which was through the medium of dance :P. My highlight was the Macarana, or the Microsoft Macarena as I called it.  Below you can see us all dancing and waving our glowsticks to the ever-entertaining Harlem Shake.

Talks

The main thing that first attracted me to the offer of working for Microsoft at Campus Party Europe was the fact that we could spend our down time watching some of the many speakers that came to talk about their respective fields.

I was fortunate enough to catch 2 or 3 lectures a day, from people as well respected and diverse as Jon “Maddog” Hall — chairman of Linux International — and Ian Livingstone — President of Eidos and founder of Games Workshop.

The O2 arena hosted 8 stages, of all of which had talks from 10am – 10pm each night, so there was certainly a lot to take in — too much to write about here.

My favourite talks were actually that about free and open source software (sorry, Microsoft), and the relatively new phenomenon of open data.

Swag

At the end of the week my fellow MSP’s and I were super happy with being able to have witnessed one of the coolest, and largest tech conferences in the world, but even on top of that Microsoft were generous enough to allow us to keep the devices we had been using throughout the week to showcase both Windows 8.1 and Windows Phone 8 to customers, this meant a Nokia Lumia 920 and a Microsoft Surface RT each!

I was over the moon with the Surface RT because I had been looking to get an RT device for a while to test the performance of a few of my apps on the lower powered ARM CPU’s — but I was especially happy with the Nokia Lumia 920. My phone contract ends in a few days, and because now I have an awesome new phone I’m gonna go on a SIM only plan and save myself some money 🙂

Thanks

I would like to say a massive thank-you to everyone involved at the O2, the people behind Campus Party, and of course Microsoft for making everything work like clock work and giving me a fantastic opportunity to learn from some of the best minds in our industry, a lot of laughs, some great knowledge and some cool electronics! I hope to see you all again soon!

Danny.

MSP UK Summit 2013

Gordon Walker, MSP Lead talking about the history of Mobile Phones -- No bonus points for spotting me with my blue hair...

Gordon Walker, MSP Lead, talking about the history of Mobile Phones — No bonus points for spotting me with my blue hair…

A few weekends back was the Microsoft Student Partner UK Summit for 2013. As I’m a first year MSP it was my first experience of such an event and I must say I thoroughly enjoyed it. It was hosted at Modern Jago in the heart of Central London, which is always a nice place to be!

There were lots of inspiring talks from several softies including Andy Wigley talking about porting between Windows Phone 7/8 and Windows 8, Ben Nunney talking about developing a great user experience and marketing your apps, but most interesting to me was a talk presented by Mike Taulty about Windows Azure, particularly Windows Azure Mobile Services — a service which can be used to easily set up database driven RESTful services which integrate easily with Android, iOS and of course Windows Phone 7/8 Applications.

A Nokia Lumia 820 - Image from https://www.t-mobile.co.uk/common/img/products/phones/nokia/lumia-820-lte/lumia_820_lte_SC_large_first.jpg

A Nokia Lumia 820 – Image from T-Mobile

I spent much of the Saturday of the two day event working with Kevin Lewis, the designer I have been working with on the App Builder Rewards website, implementing additional features to the site. I also met up with Paul Lo, the guy in charge of the program who thanked me for my work and gave me a Lumia 820 Windows Phone 8 Device as a thank-you for completing so much work at short notice — which I will review soon. It was really nice to finally meet, in person, the people I had been collaborating with on the project and speaking to constantly through VoIP, Instant Messaging and Email for the previous two weeks — almost like re-meeting people I already knew.

In the evening I made the short train journey to Milton Keynes to meet up with my family and my close friend from back home Sam Marr to see the comedian Harry Hill at the Milton Keynes Theatre and grab some dinner. A great evening was had by all!

Once back in London I joined the aforementioned Ben Nunney and Co. for a few drinks in the hotel Champagne bar before retiring to bed, ready for an early start.

Regtransfer for Windows 8 Main Page

Regtransfers for Windows 8 Main Page

At 9:30 sharp on Sunday Morning we started again, and I spent much of the day working on my Regtransfers Application for Windows 8. Between working on that and networking with my fellow MSPs, in the social sense — not the HTTP sense 😉 — I also continued writing a presentation I intend to present at university called “Developing Windows 8: Live Tiles, Snap View, Search and Share”.

Developing For Windows 8 Presentation Title Slide

Developing For Windows 8 Presentation Title Slide

After mentioning it to Dean Meehan, he suggested I ask Phil Cross if I could present it to the rest of my fellow MSPs. So I did. The presentation went quite well, and I hope that everyone took something away from it. I was particularly pleased because after I’d finished presenting a Mechanical Engineering student came and asked for a copy of the presentation and said it included the best instructions on how to implement the “Live Tiles” feature he’d seen! Always nice to hear! You can view the presentation for yourself here.

Overall I had a fantastic weekend full of catching up with old friends from Dublin, Programming and Comedy, what more could you want? A big thank you to Phil Cross, Ben Nunney and the rest of the Microsoft Staff and presenters involved!

Danny

Hull CS Blogs for Windows Phone v1.1

A few days ago an update which I’d written for the Hull CS blogs windows phone app went live.

Here are the release notes:

  • Updated splash screen to match upcoming Windows 8 MX Style App Splash Screen
  • Fixed a bug which meant that the last blog posts “abstract” could be covered up by the app bar
  • Various Minor Bug Fixes

🙂

I hope you all enjoy the latest version of the app

Danny

Hull CS Blogs for Windows 8 and the Windows 8 | Elite

Hull CS Blogs for Windows 8 - Main Page

I’m very happy to be able to tell you all that on Monday morning I submitted Hull CS Blogs for Windows 8 to the Windows 8 Store. The app supports most of the features that the Windows Phone and Android apps do, including caching of blog posts and tweets. The information source used for all the contributors will also be updated this evening, adding a plethora of new contributors that we picked up in our recent marketing drive. This will add people to all 3 apps.

Below you can see some screenshots of the app, and above you can see a screenshot of the main page.

Hull CS Blogs for Windows 8 - Blog Viewer

Hull CS Blogs for Windows 8 – Blog Viewer

Rather than throw you out to internet explorer every time you want to view a blog you can actually read blogs embedded within the application. This is also supported in Windows 8 Split view – which allows you to use two apps at once by making one smaller and pinned to the side – as you can see in the image below.

Hull CS Blogs for Windows 8 - Split View

Hull CS Blogs for Windows 8 – Split View

Each contributor also has their own page within the application which shows their twitter stream as well as all of their latest blog posts.

Hull CS Blogs for Windows 8 - Contributor Viewer

Hull CS Blogs for Windows 8 – Contributor Viewer

Overall developing for Windows 8 has been a positive experience , especially porting from windows phone. I was able to retain a lot of the structure of the program as well as many of the objects from that project.

Another big bonus for making the app was the ability to join the Windows 8 | Elite program which, according to the website allows you to:

Elevate your app with the Windows 8 | Elite Programme. As an Elite member, you will be invited to exclusive networking and training events as well as opportunities to enhance the discoverability, quality and business value of your Windows 8 app.

To get into the Elite program you have to have written and submitted a Windows 8 Modern Experience app by October 26th 2012 — the day windows 8 becomes generally available. Due to the fact that I have already done that I’m now in and apparently a Welcome Pack full of goodies is on its way to me. I shall update this blog when I find out what it contains! I’ve also been invited to a Windows 8 Launch party in London on the 26th, which is also quite exciting.

As the program progresses I’ll also receive access to extra training, help and resources from Microsoft including things not dissimilar from the Windows 8 camp I went to a few months ago.

Exciting times.

Danny

Introducing Hull CS Blogs for Windows 8

This week I’ve been working on porting my Hull CS Blogs app for Windows Phone 7 to Windows 8 (The PC &  Tablet Operating System).

I’ve been able to use a lot of my code from the WP7 app, but making some changes. For example saving and writing files is now done through Local Storage using StorageFolder, StorageFile and Stream objects rather than through Isolated Storage on Windows Phone. It took me a while to get used to the new API’s but now I understand them I actually prefer them and think they make more sense. For example my code to load an XML file on Windows Phone 7 Looked like this:

public static void LoadXML(string Location, out XDocument XMLFile)
        {
            // Get the local storage directory for this application
            using (IsolatedStorageFile IsoFile = IsolatedStorageFile.GetUserStoreForApplication())
            {
                //Open the file and make it into a stream
                using (IsolatedStorageFileStream IsoSteam = new IsolatedStorageFileStream(Location, FileMode.Open, IsoFile))
                {
                    XMLFile = XDocument.Load(IsoSteam);
                }
            }
        }

And in Windows 8 it now looks like this:

        public async static Task LoadXMLAsync(string Location)
        {
            // Get the local storage directory for this application
            StorageFolder storageArea = Windows.Storage.ApplicationData.Current.LocalFolder;

            // Get the file itself
            StorageFile storageFile = await storageArea.GetFileAsync(Location);

            // Read the file in as a stream
            IRandomAccessStream randomAccessFileStream = await storageFile.OpenReadAsync();
            Stream fileStream = randomAccessFileStream.AsStreamForRead((int)randomAccessFileStream.Size);

            return XDocument.Load(fileStream);
        }

Whilst the Windows 8 code appears to be longer, to me it makes more sense, and that can be more important in projects such as ours in which the code is going to be handed over to other software developers. First you find the directory, then you find the file, then you use it. It’s the exact same way of accessing data as people do in real life, or through windows explorer.

At the moment I’m still working on the user interface. An interesting challenge of Windows 8 development, which I haven’t had to deal with before in Windows Phone development, is the large amount of different screen sizes and resolutions that devices can have. In Windows Phone 7 there was one size,  800 x 480px.

The Windows 8 version of Hull CS Blogs should be available on the Windows Store before Windows 8 is available to the general public on the 26th October.

Danny

Introducing The Hull Computer Science Blogs Workgroup

I’ve found that for projects like this is useful to have a Facebook group as most people at uni check Facebook more often than their Email Inbox

You may recall that earlier this year I started work on a Windows Phone 7 application for HullCompSciBlogs.com, this quickly progressed into a full scale project to make sure that the 3 smartphone operating systems with the highest market share had an application available. So far we already have a Windows Phone 7 app available on the Windows Phone Marketplace and an Android App available on Google Play.

Cameron is still working hard on the iOS application and expects that it will be available through iTunes in the very near future! When we were discussing this we both agreed that the back end system needed a complete revamp.

When I was designing the Windows Phone 7 application I decided on using XML as the data interchange format, mainly because I was getting used to using LINQ which means that an XML based solution is very easy to implement in C# for Windows Phone. I never expected that it would turn into a full scale project and instead expected that it would remain my own personal project. Probably a silly idea in hindsight considering that the Hull CS Blogs very fundamental idea is that of a community. Not only is XML not as well supported out-of-the-box on certain other fruity platforms, its not the best format for the job. In my opinion JSON is much better because it provides the same data in a much smaller file due to its simpler syntax.

The Data Interchange Format is just one niggle with the system, the other is that it is at the moment a bit of a pain to update. I have to manually edit an XML file to create, edit or update information on featured applications and contributors — which is based on my portion of Freeside, so no one else has access rights in order to update it themselves. There’s also currently no system for someone to submit their blog to our system and have it reviewed before becoming publically viewable. So the addition, removal and editing of contributor profiles and blog feeds isn’t exactly the perfect solution at the moment.

The final big issue with the system is that we simply don’t keep enough data on our contributors. The system we are currently proposing will keep the following details for contributors:

  • A display picture
  • Their full name
  • URL’s for both their website and blog RSS feed
  • Twitter Username
  • LinkedIn Username
  • Reddit Username
  • Date they joined HCSB
  • Study Year
  • Study Programme

Whereas at the moment we only keep their Name, Twitter username and Blog RSS url. We’ll also keep information on applications developed by students and lecturers who attend the university including:

  • Platform
  • Release date
  • Name
  • Version
  • Price
  • License type
  • Description

At this point we need to think about security because we carry a lot of information. It then becomes a bit more of a project that needs to be handled by more than one person, and instead handled by a team of competent computer scientists, and wheres better to source them than from the list of contributors itself? Therefore yesterday I put together the Hull CS Blogs Workgroup consisting of the current mobile application developers, John Van Rij — who set HCSB up initially — and a few people I thought would be helpful in producing a back end.

The basic aims of The HCSBW is to create a community based around Computer Science at the University of Hull based on an open JSON api that can be expanded on and improved by University students for years to come (one of the reasons why the whole system will only be written in language formally taught within the university itself) allowing students to improve their career prospects by getting their story out there for employers to see.

It will all begin properly in freshers week where the team and I will be presenting to the new first year computer scientists in an attempt to get them interested in Hull Comp Sci Blogs and indeed blogging itself. I’ll be sure to write about how our software project and social project of getting people on board works.

Danny.

Microsoft Tech Center Day

A while ago I posted about how I had won the Windows Phone 7 Student Incentive Competition which allowed me to “spend a day honing (my) skills and (my) apps with (Microsoft’s) deep technical experts”. In a fantastic turn of events my housemate and great friend Rob Crocombe also won the competition meaning we could meet up in London, travel into Reading together and have a catch up after the long Summer Holidays at the same time as learning some really cool stuff at the Microsoft HQ.

When we eventually got to reading around 10:30 — I’d set off from home around 7:30 — we were given a security card to allow us to go around the building and shown to the demo room in the Microsoft Technology Center.

The demo room had seats along the back and a stage like area with several different sections, showing an office scenario, to a home scenario, to a living room scenario with various computers, display technologies and communications tech. Slap bang in the middle of the room was a “Samsung SUR40 with Microsoft Pixel Sense”. Even the softies laugh at how bad the product name is since a certain other piece of Microsoft Technology cannibalized its original name, Microsoft Surface, to retain its secrecy!

The Student App Winners, Including Rob and I join Dr. David Brown round the SUR40 running NUIverse for a group photo

The Student App Winners, Including Rob and I join Dr. David Brown round the SUR40 running NUIverse for a group photo

The first talk we had was about NUI – Natural User Interfaces – and how they are changing the way computing works. We were very lucky to have this talk delivered to us by Dr. David Brown, the man who single handedly created NUIverse — an application which allows you to explore the universe using a natural user interface on the Samsung SUR40. We wound back all the way to Command Line Interfaces and how GUI greatly improved on the usability of computer systems for the average person, but still required some training to use, whereas Natural User Interface attempts to require no, or as little as possible, training to use.

NUIverse by Dr. David Brown - which was demo'd to us - Image credit: Mobilemag.com

NUIverse by Dr. David Brown – which was demo’d to us – Image credit: Mobilemag.com

We spoke in depth about how some parts of NUI, such as touch screens are already mainstream whilst some others, such as object identification isn’t.

After this fascinating talk we went on a break for lunch (Tip: Go to as many Microsoft events as you can, the free food is always great ;)) in which we spoke to other competition winners. After the break we were shown into a conference room where Ben Nunney — the same man who did the Windows Phone 7 Camp at Hull University at the beginning of the year —  was getting ready to do a talk on preparing for Windows 8 application development.

The talk was on the same day as Windows 8 was released to manufacturing (also known as “going gold”) meaning that the code was finalized and sent off to the device manufacturers. In other words Windows 8 version 1 was finished. There was a clear excitement around the campus, especially with Ben — for whom it was his second RTM day having joined the company just after “that operating system between XP and Windows 7 that didn’t exist” was released (Also known as Windows Vista :P)

Ben’s talk focused on introducing people to Windows 8 from a complete novice stand point and built up to showing off the development tools and telling us where and how we could get more help to port our Windows Phone apps or create entirely new apps for the system. A highlight of the talk was trying to make the Visual Studio Windows 8 Simulator work in the simulator, A.K.A “simception” 😛

After this talk the 10 of us sat down with Phil Cross — the Academic Audience Manager at MS UK — to discuss how to improve the Microsoft UK Student developer group, and how some of the talks could be improved, made more interesting and become more likely to have an affect on the number of people actively developing for Microsoft platforms. I said I thought students needed greater access to systems such as tablets for testing, perhaps through borrowing them from Microsoft and that “Dev Camps” at universities needed to be less about convincing people the platform was worth buying – almost like a sales pitch – and more about showing them developer opportunities and practically how to do things.

Obviously there are some logistical and financial reasons why not everything is possible, but it was good to have the dialogue. In the end I think both the students who won the competition and the Academic Staff at Microsoft both got quite a lot out of the day — I certainly learnt a lot and enjoyed myself.

Danny

What have I been up to?

I haven’t posted since I received my results and felt it was time for an update.

Since I got back from Hull I’ve been working at my uncles company, Regtransfers.co.uk, who are the leading supplier of personal number plates. I’ve had several roles including contacting websites about Internet marketing opportunities, finding companies that have names relevant to number plates we own and want to sell and, most interestingly, a Windows Phone 7 application.

Regtransfers already have an iPhone application and a “HD application” for iPad as well as an Android app available on Google Play. My aim was to make an application that offered all the same functionality of the other applications:

  • Search for number plates
  • Select a number plate and choose options for the acrylic plate (Flag icon, border colour) and see both the front and back plates (white and yellow)
  • Make Enquiries about selected number
  • Buy selected number using secure form
  • Order the Regtransfers Magazine
  • View the Regtransfers Youtube Videos

I also added a twitter feed which is not present in the other applications since the company has started to have a bigger social media presence recently.

The application isn’t finished but below you can see some comparison between the WP7 application I developed and the iPhone version which was outsourced:

Windows  Phones vs iPhone plate search comparison

Windows Phones vs iPhone plate search comparison

Windows Phone vs iPhone build plate comparison (WP7 version incomplete)

Windows Phone vs iPhone build plate comparison (WP7 version incomplete)

As you can see, I’ve taken quite a native look putting a lot of emphasis on the simplicity and “flat look” Windows Phone users expect in their applications — though I’m not sure I’m entirely happy with the background at the moment — it looks nice but it can make some of the text a bit hard to read.

Here are some more images of the WP7 application

Home Page - Emphasizing Search

Home Page – Emphasizing Search

Order a magazine

Order a magazine

Twitter Integration

Twitter Integration

Enquire about a Plate

Enquire about a Plate

What else have I been doing? Well, I’ve realised I’m not back for long so I’ve been spending a lot of time with my friends, family and girlfriend. I’ve also done a bit of work on my brothers website and a few secret projects ill be announcing soon 😉

Danny

Windows Phone 7 to Windows 8 Day

The Commonwealth Club - Embankment - London

A few weeks ago a link was posted on the Microsoft UK Student Developer Group detailing a Windows Phone 7 – Windows 8 weekend in London. Originally the location wasn’t released, presumably whilst Microsoft worked out how many people would come and how much room they needed, but eventually we were told it would be at the Commonwealth Club at Embankment in London. This is the nice building you can see in the above photo! The event itself was this weekend just passed, I couldn’t make the Sunday but thoroughly enjoyed Saturdays festivities.

It was a snazzy place, and a great place to stay for the day, but I’ll talk more about that later. The idea of the weekend was to show people how to port their application from Windows Phone 7 to Windows 8. It also showed off some of the new API’s, Runtimes and paradigms that make Windows 8 apps an improvement over those of the phone — though I’m sure there will be API and feature parity in Windows Phone 8.

When I got to the commonwealth club I was shown to the basement floor which had been taken over by Microsoft (the only company who would schedule a Phone related event in a basement with no phone signal ;))

One room was the “Work Zone” where developers could actively work on porting their applications from Windows Phone 7 – Windows 8 with the help of the Microsoft Evangelists.

The "Work Zone" -- Posh

The “Work Zone” — Posh

Another was the “Game Zone” where people could play Star Wars Kinect competitions to win prizes such as DAB radios. The final area was the “Talk Zone”, in which mini lectures were held with topics that had been voted in by the people at the event.

The C# 5 / .NET 4.5 / WinRT Asynchronous Framework

The most popularly requested talk, and therefore the one we got to see first was a talk on C#, .NET 4.5 and WinRT’s new asynchronous framework. Whereas at the moment to send a WebClient to fetch some data and then display it you’d have to do some code like the following:

//Actual simplified (i.e. no error reporting etc) code from the Hull CS Blogs app for Windows Phone 7

//Set up downloader somewhere
WebClient contributorsXMLDownloader = new WebClient();
            contributorsXMLDownloader.UseDefaultCredentials = true;
            contributorsXMLDownloader.DownloadStringAsync(new Uri("http://www.dantonybrown.com/hullcompsciblogs/contributors.xml", UriKind.Absolute));
            contributorsXMLDownloader.DownloadStringCompleted += contributorsXMLDownloadComplete;

//In another totally seperate place
public void contributorsXMLDownloadComplete(object sender, DownloadStringCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                XDocument xdoc = new XDocument();
                xdoc = XDocument.Parse(e.Result, LoadOptions.None);
                contributorsList.LoadFromXML(xdoc, FileOrigin.internet);
                contributorsListBox.ItemsSource = contributorsList;
            }
        }

As you can see, we set it up and then at a later time the method we specified in the event handler earlier is called once the download is complete. If you have loads of these async calls, or worst yet async calls within async calls it all gets very confusing, very very quickly.

In C# 5 two new keywords have been implemented to ease this situation. Async, which as you can guess marks a method call as being one that is executed asynchronously and await which says “don’t execute code under me until this async method is complete”.

For example we can convert our above code to a HTTPWebRequest using the new keywords. Look how simple it is!

public async void DownloadContributors()
{
       HttpClient http = new System.Net.Http.HttpClient();
       //Notice how we're awaiting this response right here rather than going to an event handler
       HttpResponseMessage response = await http.GetAsync("http://www.dantonybrown.com/hullcompsciblogs/contributors.xml");
       //We'll only get here once the response has completed!
       string result = await response.Content.ReadAsStringAsync();
       //Business Logic that would normally be in the event handler
       XDocument xdoc = new XDocument();
       xdoc = XDocument.Parse(result, LoadOptions.None);
       contributorsList.LoadFromXML(xdoc, FileOrigin.internet);
       contributorsListBox.ItemsSource = contributorsList;
}

It’s nice because everything is where it should logically be. Together. Anyway, theres a hell of a lot more to talk about that I can fit in this already packed blopost, for example any method which calls another method which is marked as async has to be async itself, but you can find out all this at Channel 9.

The Windows 8 User Experience (UX)

Metro is all about making an experience for the user, from Live Tiles which mean you don’t have to even enter an application to get its content to the exact alignment and size of text of titles, sub-titles and paragraphs in apps. Andrew Spooner delivered a great talk on how to achieve the best user experience for users when porting your application from Windows Phone to Windows 8.

Although a lot of things can be directly ported in some ways — a panorama application on Windows Phone can be a panorama application on Windows 8 — some things can’t. Windows 8 has no concept of a Pivot page for example.

A Pivot Screen - There's no similar control in Windows 8

A Pivot Screen – There’s no similar control in Windows 8

Because pivot screens are often used to filter content, in my example the blog pivot shows only blog posts whilst the twitter pivot shows only tweets, there are a few ways to get round the limitation. You could use an application bar, a context menu or change the overall layout of the page.

Andrew also explained about the different modes a page can be in. Landscape, Portrait or pinned to the side, and how to deal with each. You can find out more about redesigning your Windows Phone 7 application to Windows 8 or designing a new application from scratch here.

Windows 8 Contracts

The second most popular talk topic was contracts. I’ve written about my love for the idea of contracts before, when I attended the Windows 8 camp at The University of Hull a few weeks back.

The idea behind a contract is that it is a way for an app to communicate with other applications in a standard way, even ones it doesn’t know about. For example a share contract says “I have these images that can be shared”. Any application that can accept images then says “I can accept these images and do something with them”. Notice how the sharing application doesn’t say what it wants done with the images and the receiving application doesn’t tell what it can do — this is on purpose to allow more interesting experiences.

If the user selects that your application it receives the images and can do anything with them, for example allow the user the edit them or share them straight to a social network. 🙂 Its all really cool stuff and allows experiences that no one would previous think of, the example given was a cooking application that shares pictures of food. An application that accepts pictures could then make it into an interactive Jigsaw. Why anyone would want to do this is unknown… by everyone. But you can see it allows us to do things we wouldn’t previously have thought of. I mean who, when writing a cooking application writes in a MakeJigsaw() method? No one 😛 But Windows 8 will allow this important functionality! 😉

Search isn’t the only type of contract. Previously to this event I hadn’t seen the Settings Contract but it looks quite cool. It allows your app to store its settings in a uniform way within the right hand pane which comes up when the settings charm is pressed. Some of this might not make sense now, but it will when you use Windows 8. Its nice because it allows applications to have application specific settings in the same place as universal ones such as “Allow this app access to location data” 🙂

Background Tasks on Windows 8

Background tasks on Windows 8 are very similar to background tasks on Windows Phone 7… apparently. I’ve never used them, but it’ll be a nice easy port for those people who have. There are all the sort of optimized background tasks you expect:

  • Media player (Audio AND Video, whereas on Windows Phone 7 it can only do audio)
  • VoIP
  • Background downloading
  • Update Tile and Notification

There’s also a generic background task which is unoptimized but allows you to do whatever you want. We were advised that this was a last resort and if we could use one of the more optimized background tasks to do whatever we wanted to achieve we should. Background tasks can be activated in several ways:

  • By a timer
  • When a certain condition is met (e.g. WiFi connection state changed)
  • By custom rules (e.g. Connection State changed && connection state is online)

In a background task you can write any code you want and are totally unlimited. The only thing to be aware of is that normal applications only get 1 second of background task CPU time ever 2 hours in order to retain battery life.

New in Windows 8 are notifications on the lock screen. 1 application, chosen by the user, can display its notifcations on the lock screen. Much like the calendar application does on Windows Phone 7. This chosen application is special because it gets 2 seconds of CPU time every 15 minutes.

Posh Food

One of the interesting but non-CS parts of the day was the dinner. It was kind of weird, but cute. Lots of small versions of popular dishes such as burgers, there are some pictures below.

The best kind of beer is free beer!

The best kind of beer is free beer!

We had a good choice of drinks too!

We had a good choice of drinks too!

The worlds smallest burger!

The worlds smallest burger!

Burger compared to a small tea candle

Burger compared to a small tea candle

Getting on the Windows 8 Marketplace for Day One of General Availability

One of the opportunities of the event was to discuss getting a “store token” which allows your application to be on the store the day Microsoft releases Windows 8, days — possibly weeks before your competitors. I spoke to Paul Lo about this and should find out if I’ve successfully received a token soon!

Getting help with Hull CS Blogs for Windows 8

The best and most helpful part of the day for me was having a 40 odd minute chat with Andrew Spooner about porting my applications design to Windows 8. We used a programming statement and some use cases to think about the experiance — this was a methodology I haven’t used before and I found it incredibly useful, I shall be using it from now on!

A programming statement is a paragraph or two explaining what your application or program is all about, for example my one was

The Hull CS Blogs application aims to deliver the content of all the bloggers at the University of Hull Computer Science department to users in an attractive way whilst allowing people to discover more about each contributor, via the use of twitter streams and a list of applications they have worked on. The application will also deliver a regularly updated list of featured applications developed by people within the universities computer science department.

Having this statement allows you to have something to refer back to when you’re thinking about features, for example. “I’m writing an application which allows people to discover about the contributors through the use of twitter, do I need to have a reteweet feature?” Well, the use of twitter in the application is to discover things, not necessarily interact with content, so this should be left out til a later release where there aren’t other more important features to be developed.  (By the way, this idea was actually one discussed about the Hull CS Blogs application)

A set of use cases are the “stories” of how you envisage people using your application. For example one of mine was

Russell has missed a guest lecture at university, he wants to read up about it and knows that his fellow computer scientists will most likely have blogged and tweeted about it. He opens the Hull CS blogs app and views the latest blogs and reads a couple. He then looks at the latest tweets for more minute by minute information, and then drills down into James’ contributor page because he cares about james’ opinion and wants to see more about what he has to say about the event both via twitter and his latest blog posts.

Reading this makes you realise what features are crucial to your app. So in this situation you would need.

  • Latest blog list
  • Feed of all tweets by all users
  • A page for each user

Without this user case I wouldn’t have thought about implementing an overall twitter feed in the main panorama rather than just a per user feed in each contributors page.

Anyway in the end we went from these initial designs, which are essentially a direct port of the Windows Phone app:

Main Panorama Initial Idea - Hull CS Blogs for Windows 8

Main Panorama Initial Idea – Hull CS Blogs for Windows 8

Contributor Page - Hull CS Blogs Windows 8

Contributor Page Initial Idea – Hull CS Blogs Windows 8

To this overall view of the application in a hierarchical order:

Andrew Spooners improvements On My Initial Ideas - Entire App - Hull CS Blogs

Andrew Spooners improvements On My Initial Ideas – Entire App – Hull CS Blogs

I will be using this design for the actual version of the Hull CS Blogs app for Windows 8, so check back here to hear more about that.

I apologise for the length of this post but it really was such a packed day! I hope this blog has made you look forward to developing for Windows 8 and porting your existing WP7 applications, because I certainly am! I’d like to thank Microsoft for treating me so well as they always do, with lots of support, free drinks and some amazing free food. Truely an experience worth remembering!

Danny.