Tools & Apps
CommNight December - Some interesting events
In the middle of the company parties, you should take one night off to do some fantastic learning and networking at CommNight (Community Night) on the 14th December! You can read about all the details on the Microsoft DPE Blog.
There are two groups which I want to highlight which will be at CommNight:
S.A. Developer
S.A. Developer is a user group for developers and in December will be hosting the following topics:
- Tool of the month: This short (10min to 15min) session is where someone can present their favourite developer focus tool or add-on.
- Unit Testing WPF & Silverlight – Tools & Techniques: Silverlight and WPF can be used to create truly immersive UI experiences for users. Testing these UI components and the logic around it can become complex – especially when using frameworks like PRISM. Join us in this session as we take a look at a few tools and techniques that can be used when unit testing WPF and Silverlight applications.
Really looking forward to this session!
Information Worker
Information Worker is a user group for those in the IW space, not just developers but everyone even people who job just involves Excel and Outlook! This month we are looking at:
- Lync – Microsoft’s Unified Communication System
- Windows Phone 7 – What does this give the IW user? Things like Office and SharePoint integration will be discussed
T4 Cheat sheets!
I’ve been spending a lot of time working on two things recently: T4 (Text Template Transformation Toolkit) and Windows Phone 7. Part of my work around T4 included creating some cheat sheets to make it easier to get to grips with it!
There is now three posters available (High res PDF’s below or on the DRP site):
General Overview
This provides a high level overview of the various components in T4.
@template detail
The @template directive has a lot of options and this sheet provides detail on those.
Examples
This sheet provides usage examples of various aspects directives in T4.
You can see my time with Windows Phone 7 leaking into these two as I loosely designed them around the Metro UI design guideline that Windows Phone 7 uses. Interestingly for me is that Metro seems to work fantastically well for cheat sheets as these are some of the nicest and easiest to grok sheets I’ve ever done.
Pull - October 2010 Release
I’m happy to share my second stable release of Pull, the simplest podcast/vidcast download tool, in the world, this release has had a ton of new work done to it to get it more usable and some plumbing work to improve it.
Major features in this release
Full Proxy Support
Proxies are either really easy to use or completely destroy your application. Previously Pull used what ever Internet Explorer specified, now you can tell it there is no proxy, in case your IE proxy settings are different for some reason, or provide proxy settings. This should help people use it in a variety of environments.
Add multiple podcasts at once
Want to subscribe to multiple podcasts? Just use the new add dialog box to add them.
Automatic backup of feeds to OPML
Have a database? Then you better have a backup. These are rules for all software and Pull does the same now by automatically backing up your feeds to an OPML file, just in case ![]()
New jumplist options
Right click on the Pull icon in Windows 7 and you will get the jumplist which contains two new options – Play next unplayed episode and Force refresh of podcasts.
Since putting in the play un-played I’ve used it a ton as it allows me to keep playing podcasts quickly. When one podcast finishes, it is two clicks to get the next one started, without having to switch to the application to do it!
Ability to automatically download latest episode when subscribing to a podcast
When you subscribe to a podcast, you likely want the latest episode and so we now have an options to enable that. Options are available on both the new podcast dialog box (see above) and also if you are adding via protocol handlers or OPML.
For those last two you can turn it off in the settings:
Ability to cancel downloads
Right click on a download in the download pane and you will be able to cancel a download!
Locking
Often I have a podcast I want to keep forever, now you can right click on a podcast and select lock which adds a little lock icon next to it. Repeat the process to unlock.
This prevents the file from being deleted and from a clean-up perspective this means you can now select all played episodes and hit delete and it will ignore the locked items.
Ability to prevent Windows from going to sleep during downloads
In settings you can control if you have an active download is the computer allowed to go to sleep.
Ability to selectively import or export podcasts from OPML file
Want to export your podcast, except that one which will make your mother blush? Or maybe your friend gave you an OPML file you want to import but you don’t want all his podcasts. You can now select individual podcasts and export and import selectively.
Delete to recycle bin
When you delete a podcast, it now goes to the recycle bin and not into the ether. This also means you can hit retry now if the delete fails for any reason.
Scan for Episodes
Another new small feature lets you scan an existing folder for episodes you have already downloaded in Pull or other application. This was added to help people migrate to Pull and quickly associate their existing episodes, but if you want to re-associate a deleted episode this works great for that too!
Welcome wizard to make getting up and running easy
Pull used to only need two settings from you and so when you started it for the first time it showed you the settings dialog to get those settings. However this release added a number of settings and to not scare off a new user with a million settings we get now start with a simple welcome wizard which asks for the two we really need and makes the user feel at home in the application.
Future
I am planning another release for about a month away and I want to add some more download management features in it but if you have any ideas drop me a line or leave a message in the Pull discussions forum.
Poken @ Tech·Ed 2010
We live in an increasing digital and disconnected world where we seldom meet face to face, and in less than a week that will all change because it will be time for Tech·Ed Africa 2010! Last year there was a new piece of hardware unveiled, the Poken – which I can assure you will be even bigger this year.
For those who do not know what a Poken is, it’s a small device which links your digital persona to a physical world! Or put more simply it’s a way to share details about who you are with other people, think like a digital business card.
From Ruari Plints post on these guys, here is what you need to do:
- Pop onto Poken website to find out all about it and why we going crazy “Poken-ing” everyone this year.
- Sign up foryou own Poken account.
- Get your Poken device, before or at TechEd Africa.
- Join us and go “Poken” you friends, and then some.
- Create your own “Poken” language and make us all laugh at the possibilities.
- Pop on to the TechEd Social media sites and start expressing yourself.
I have it on good authority that the Poken’s on sale at the event will be at a special price and plenty will be available to WIN!
Redirected down a one way: Clearing the Internet Explorer host redirect cache
Internet Explorer 9 is fast, really, really fast! A lot of that speed comes from the massive caching improvements in IE9 – but this is a bit of a double edge sword, especially for developers when caching gets in the way of what is actually happening. I spent two hours debugging an odd caching issue recently and this is the sad story.
For some testing I needed to setup a redirect, in this case a 301 permanent redirect (handy HTTP status codes cheat sheet in case you don’t remember these). What this would do is enable me to have site alpha (http://localhost:5000/Demo) redirect to site beta (http://localhost:9000/Demo).
Prior to this the scenario look like this:
Behind the two browser windows is the IE 9 Developer tools and their fantastic new network capture feature. You can easily see that when I hit site alpha I got a 200 result, meaning all good and it loaded.
Once I setup the redirect, you’ll see I get a 304 this is because the data is already cached. Note that even though I typed in the site one URL it immediately loaded site two. This is because the browser had cached the redirect and so skipped the network steps for performance.
Now the problem, I wanted to turn off the redirect – however the browser cached it and so would ignore the change. Clearing cache, deleting files, rebooting and even using the IE reset option did nothing to solve this
The only way to fix it was to fire up the fantastic Fiddler tool and use it’s Clear Cache option with the option to delete persistent cookies, which flushes the WinINET cache.
Considering that this is supposedly the same as clearing the IE cache I have no idea why this works and IE cache clearing doesn’t but it does work.
Cannot add a Service Reference to SharePoint 2010 OData!
SharePoint 2010 has a number of API’s (an API is a way we communicate with SharePoint), some we have had for a while like the web services but one is new – OData. What is OData?
The Open Data Protocol (OData) is a Webprotocol for querying and updating data that provides a way tounlock your data and free it from silos that exist in applicationstoday. OData does this by applying and building upon Webtechnologies such as HTTP, Atom PublishingProtocol (AtomPub) and JSON toprovide access to information from a variety of applications,services, and stores.
The main reason I like OData over the web services is that it is lightweight, works well in Visual Studio and works easily across platform, thanks to all the SDK’s.
SharePoint 2010 exposes these on the following URL http(s)://<site>/_vti_bin/listdata.svc and you can add this to Visual Studio to consume using the exact same as a web service to SharePoint, right click on the project and select Add Service Reference.
Once loaded, each list is a contract and listed on the left and to add it to code, you just hit OK and start using it.
Add Service Reference Failed
The procedure above works well, until it doesn’t and oddly enough my current work found a situation which one which caused the add reference to fail! The experience isn’t great when it does fail – the Add dialog closes and pops back up blank! Try it again and it disappears again but stays away.
If you check the status bar in VS, you will see the error message indicating it has failed – but by this point you may see the service reference is listed there but no code works, because the adding failed.
If you right click and say delete, it will also refuse to delete because the adding failed. The only way to get rid of it is to close Visual Studio, go to the service reference folder (<Solution Folder>\<Project Folder>\Service References) and delete the folder in there which matches the name of your service. You will now be able to launch Visual Studio again, and will be able to delete the service reference.
What went wrong?
Since we have no way to know what went wrong, we need to get a lot more low level. We start off by launching a web browser and going to the meta data URL for the service: http(s)://<site>/_vti_bin/listdata.svc/$metadata
In Internet Explorer 9 this just gives a useless blank page
but if you use the right click menu option in IE 9, View Source, it will show you the XML in notepad. This XML is what Visual Studio is taking, trying to parse and failing on. For us to diagnose the cause we need to work with this XML, so save it to your machine and save it with a .csdl file extension. We need this special extension for the next tool we will use which refuses to work with files without it.
The next step is to open the Visual Studio Command Prompt and navigate to where you saved the CSDL file. We will use a command line tool called DataSvcUtil.exe. This may be familiar to WCF people who know SvcUtil.exe which is very similar, but this one is specifically for OData services. All it does is take the CSDL file and produce a code contract from it, the syntax is very easy: datasvcutil.exe /out:<file.cs> /in:<file.csdl>
Immediately you will see a mass of red, and you know that red means error. In my case I have a list called 1 History which in the OData service is known by it’s gangster name _1History. This problem child is breaking my ability to generate code, which you can figure out by reading the errors.
Solving the problem!
Thankfully I do not need 1 History, so to fix this issue I need to clean up the CSDL file of _1History references. I switched to Visual Studio and loaded the CSDL file in it and begin to start removing all references to the troublemaker. I also needed to remove the item contract for the list which is __1HistoryItem. I start off by removing the item contract EntityType which is highlighted in the image along side.
The next cleanup step is to remove all the associations to __1HistoryItem.
Finally the last item I need to remove is the EntitySet for the list:
BREATH! RELAX!
Ok, now the hard work is done and so I jump back to the command prompt and re-run the DataSvcUtil tool, and it now works: ![]()
This produces a file, in my case sharepoint.cs, which I am able to add that to my project just as any other class file and I am able to make use of OData in my solution just like it is supposed to work!
Visual Studio 2010 Training in Jo'burg
Notion Solutions will be running some Visual Studio 2010 training in Johannesburg at the end of October. These are not free courses but the value you will get from training with one of the worlds top ALM companies will be worth it.
Tester Training with Visual Studio 2010 Ultimate (4-Day Course)
This course provides students with the knowledge and skills to use the latest testing tools provided by Visual Studio 2010 to improve their ability to manage and execute test plans. Test case creation and management will be covered, as well as test execution and automation practices using Test Manager. Creating and managing virtual lab environments using Lab Management 2010 will be discussed within the context of test planning and execution. By the end of the course, students are equipped to begin planning the implementation of Visual Studio 2010 for improving testing practices within their organizations.
October 25 – October 28, 2010 09:00 – 17:00
Overview of Visual Studio 2010 (4-Day Course)
The Visual Studio 2010 Overview course provides students with the knowledge and skills to improve the development practices of their entire organization and team. A broad set of features provided with Visual Studio 2010 will be covered to assist your team with application design, test management and execution, development standards and collaboration, automated build and release management, database schema management and test lab management. This course covers all of the most important features without going overly deep. By the end of the course, students are equipped to better understand how Visual Studio 2010 can be used within their organizations.
Making Money with CodedUI
Saturday was Microsoft’s Dev4Dev’s event, where each presenter gets 20min to cover one topic. It is fantastic fun and a great way to learn.
For the event I decided to tackle CodedUI, which is just a great testing technology and in 20min I showed off a number of features using it. Below is the slides, which are not valuable - unless you jump to the hidden content where you find my demo script and some extra information!
If you are wanting to play with the demo’s you will also need my pre-constructed demo bits:
- The Xbox Super Store website: http://xbox360superstore.codeplex.com/
- My WPF application: Below
- The XML file with the values for the Data Driven test: Below
For those who attended and saw my second demo not go according to plan, I apologise again
I’ve since run it again and it works every time, I guess the massive audience scared CodedUI into breaking ![]()
