Sunday, July 18, 2010

Having fun with "Silverlight Augmented Reality Toolkit" (Silverlight 4)

Last December 2009 we were playing around with a POC for a customer and the SLARToolkit (Silverlight Augmented Reality Toolkit). However, I did not have the chance to write about it. Here you go :

1/ First print a markers (for example a L-marker here) or make your own L-marker by drawing it approximately on a sheet of paper, like this one (note, I put deliberately my finger over the edge to break it, else Silverlight will recognize the marker and put a "teapot" over it) :

2/ Then, go to the CodePlex project : http://slartoolkit.codeplex.com
and find a live demo, such as "Balder Sample".

3/ Then, you can allow Silverlight to have access to your WebCam and microphone :

4/ Start the fun by moving the marker around the screen : back and forth and spin it all over the screen. Make the teapot scale up and down, rotate or move it up and down.


If your did not yet have the opportunity to play with, I would recommend it. Moreover, your marker will work with other online Silverlight demos.

To add another link to the ability of Silverlight 4 to connect to a Webcam and microphone

Sorry for this post with little value added, but I just find that they are not many websites offering an online demo of the ability of Silverlight 4 to connect to a Webcam. Indeed, we essentially can find webcast, but we can't really play with a demo.

So here is one : http://www.e-naxos.com/Blog/post/2010/06/16/Silverlight-4-Webcam-Capture-et-Prise-de-vuee280a6.aspx

As a preview, I inserted it into the IFRAME below, where you'll have to scroll down and clic "Capture". Then the popup asking "Do you want to allow camera and microphone access?". Answer [Yes], then you'll be able to see yourself.



I used to play with another online demo with enhanced reality, but the link is now broken :-(
I shall make a wee demo too so that it could be played with.

Thank you Olivier Dahan (MVP CAD 2010, MVP C# 2009).

Thursday, July 15, 2010

Playing around with the Process Template "Team Foundation Server Scrum v1.0 Beta"

Although I was quite interested in trying this template, I did not expect a huge difference with the default "MSF for Agile Software Development v5.0" at first. However I was quite pleased by the little details I came across.

Here are the seven new WorkItems templates : Bug, Impediment, Product Backlog Item, Shared Steps, Sprint, Task, Test Case :





  • Bug:

  • Impediment:

  • Product Backlog Item:

  • Shared Steps:

  • Sprint (showing the 2 tabs Details and Retrospective):

  • Task (along with its TFS Web version):

  • Test Case:


Unfortunately, I did not try the Reports, since I have neither Sharepoint nor Reporting Services/BI on my test computer. According to what I saw on the Net, they sound great.

As for us, we just use EXCEL connected to TFS to perform automatically basic subtractions, so we can draw a line every day on the A2 sheet of paper stuck on the wall.

I particularly like the Rich Text Editor support (not only in the History part), but also in the Description part. However, the drawback of this nice advantage is that is it obviously not compatible anymore with EXCEL. Since, our Product Owner and few other people essentially work with EXCEL in sync with TFS, this could be a problem
.





As I said, I was just playing around with this template: to really evaluate it, I shoud be using this template in our production project, with real projects constraints.

As a conclusion, now that I am back to work using the "MSF for Agile Software Development v5.0" template, and knowing the advantages of the Scrum version, I just can't wait it release.

However, since it is in Beta version, and like any projects, ours is critical and due to deliver soon, I prefer sticking with the MSF Agile that works fin for us 

(I just added 2 fields and removed 1 field to suite our needs so far).


More info on Scrum methodology and how to use this template in the following video : Channel9 Walkthrough.

.

Microsoft supporting Silverlight UI automation ... nearly a problem of the past !

UPDATE : Microsoft Coded UI now supports Silverlight 4, thanks to VS2010 Feature Pack 2. Cf http://memoprojects.blogspot.com/2010/11/first-attempts-with-codeduitests-with.html

The problem detailed later is "nearly" solved by Microsoft, here is the Post from today :
http://blogs.msdn.com/b/anutthara/archive/2010/07/14/update-on-silverlight-ui-automation-release.aspx
which indicates that "Silverlight UI automation" CTP is on its way.
The released version is to be by the end of the year.

As for us, in the meantime, we used two complementary tools to record and play automatically our user scenario on our Silverlight 4 application :

A/ QTP (Quick Test Pro from HP) : The post here is quite old, but I can confirm QTP supports Silverlight 4, and we were surprised but pleased that it worked without additional.
I haven't tried the plug-in (it's really expensive) but it is considerably more powerful than our current solution.
B/ Telerik WebUI Test Studio 2010, the version that is integrated within Visual Studio 2010.

Here is the problem we encountered with the Microsoft "Coded UI Tests and Action Recordings" :
  1. Run  your  "Test Case" within the "Coded UI Tests and Action Recordings",
  2. On an IE 7 or 8 Browser, enter the URL of a web page containing both some HTML and Silverlight,
  3. You can perform actions on the HTML part, but as soon as you hit the Silverlight zone, the popup Test Runner - Microsoft Test Manager complains with the following message :

    Microsoft Silverlight is currently not supported.
    Go to 
    http://go.microsoft.com/fwlink/?LinkId=157214 for information on available add-in for possible support.
  4. The "Coded UI Tests and Action Recordings" is paused.






Wednesday, July 14, 2010

Ease your TFS 2010 deployment

This post is not intended to show you all the steps to build and deploy your code using TFS 2010. Instead, it is a short post to demonstrate how few tools and tricks helped me ease my job.

If your budget is restricted, you will not be able to enjoy the full TFS 2010 environment to deploy on an integration environment (VSTS 2010 Lab Management with a prerequisit of Hyper-V, powerfull servers, ...), you have at least the alternatives described below.

1/ By default, Visual Studio 2010 provides a transformation mecanism to deal with many versions of Web.Config (web.debug.config, web.release.config, ...) depending on the environment. However, if you want more than that (e.g. replace strings within App.Config), you will be able to do that for any XML configuration files, when using XML Document Transform (XDT) as described in :
http://vishaljoshi.blogspot.com/2010/05/applying-xdt-magic-to-appconfig.html

2/ Use the default VS2010 "Package/Publish SQL" and "Package/Publish Web" in the Project's Property.


3/ If you love RegExp and want more capabilities in analysing and modifying text within any files, use of the wonderful and robust tool PowerGREP. It could be configured with the advanced UI, then save the configuration file so that it could be run as a command line.

(as per today, it costs 119€ http://www.powergrep.com/)


PS: With far less functionnalities that PowerGREP, but totally free and stable, you have Agent Ransack 2010 that is a file searching tool from Mythicsoft. It is a freeware 'lite' version of FileLocator Pro. However, you cannot replace text in files.


You could also add to your batch file a command to deploy your T-SQL scripts :
osql is a "old" command that comes with SQL Server.

OSQL.EXE -U <username> -P <password> -S <machinename\sqlexpress>
Here is a great oqsl tutorial (french).


Finally, create and call your batch file within your Build Definition, as long as you have extended it with a custom Workflow activity. For instance, Step 4 "Versionning" below does not exist be default,

and comes from a custom workflow activity.



More details on:
http://blogs.msdn.com/b/jimlamb/archive/2010/02/12/how-to-create-a-custom-workflow-activity-for-tfs-build-2010.aspx

and the Best Practices here :
http://blogs.msdn.com/b/aaronhallberg/archive/2009/06/01/writing-custom-activities-for-tfs-build-2010-beta-1.aspx