Grupo de Arquitectura de Software Português


Welcome to GASP Sign in | Join | Help
in Search

Tiago Pascoal

  • Visual Studio Export Templates and conditional inclusion of content

     

    Visual Studio templates are a great way to give you an head start with code that has a lot of boilerplate code.

    In fact you may already be using project templates withouth knowing. :-) When do option Open New Project in Visual Studio and select a project type (Windows Application, Console Application,etc) you are in fact selecting the project template that will be used to generate your project skeleton. This project skeleton not only includes some code/data files but it also includes the references to the .Net assemblies that your particular project type needs.

    If you are curious of how out of the box project template looks like you can find them at:

    • VS 2005 - %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplates
    • VS 2008 - %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates

    Visual Studio not only provides you with a great number of project templates out of the box, but you can also write your own project templates

    If you don’t want to spend time writing your project template you can find that a lot of people make them freely available on the net. For example Team System MVP Neno Loje created a project template that you can use to kickstart Team System Utilities.

    You can create your own project by hand (which involves some labor) or you can create your project like you regularly do. Create all the boilerplate code, include all the references,all your content and then use that project as your project template by exporting it to a project template using the Export Template wizard (available in File->Export as Template)

    I don’t want to get into much details of how you can create project templates. Either by hand or using the export option. There is plenty of information about that already.

    You can read some fine information about it on these articles:

    Not to get back to the real intent of this post. :-) Conditional inclusion of content.

    Starting with VS 2008 your project templates can have content that is only included if a certain condition is met. This is a simple IF condition and all you can do is comparing the value of a parameter to a value.

    for this you simple have to use on your template files $if$ (<expression>) <your content here> $endif$

    For example if your project template allows framework multi targeting you can use this to include references to Framework 3.5

    $if$ ($targetframeworkversion$ == 3.5)using System.Linq;
    $endif$

    You can check here the list of parameters that are available out of the box and but you can also reference parameters added in the CustomParameters element or parameters added by your wizard.

    Now there is a catch. In order to use conditions, your template has to be a template of version 3.0.0 (the template version is defined in VSTemplate element of the .vstemplate file)

    eg: <VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">

    What is the catch then? If you use the export template to create your project template (even in VS 2008) the project template is exported as version 2.0.0 and you have to manually edit the .vstemplate file to use version 3.0.0 if you wish to use the $if$ functionality.

     

    Post Scriptum: If you think project templates aren’t up to the level of customization you want, you can also use your own wizard in project template. And from that wizard use the VS API to do more complex things on the created project (or/and the solution that is going to hold it). And if that is not enough you can combine it with Software Factories to make it even more powerful.

    [cross posted on http://www.agilior.pt/blogs/tiago.pascoal/archive/2009/05/31/8094.aspx]

  • DevDays 09 wrap up

     

    Last week we had the DevDays 09 event. A two day event packed with more than 50 sessions in which i did 3 sessions (technically two and a half).

    The last time we had a local DevDays event was in 2004. Which brings back some memories, Due to the foulness of someone who shall remain nameless i was invited to speak for the first on a Microsoft event (something which has been repeating ever since). It was a session about the on the defunct Shadowfax

    Since then Microsoft didn’t organized any local Devdays (in 2005,2007 and 2008 we had TechDays) but this year IT was left out so we had DevDays which is mainly a developer event.

    This year i was present in the architecture and the developer tracks. I did three sessions:

    ARC206 Patterns & Anti-Patterns – While attending a session on Teched EMEA, me and Jota agreed that not only it was the best session we had attended so far. That we should present it on DevDays 09 :-).

    It was a presentation about Architectue Patterns & Anti-Patterns, the first (and only :-)) mistake we did was placing patterns on the title since we only talked about architecture anti-patterns.

    The presentation went very well, the room was packed (actually it was overflowing the people present exceeded the capacity of the room (which was 150 people)) and people seemed to genuinely like it (at least the session feedback was unusually high for an architecture talk). The presentation was based on Teched EMEA’s ARC 203 Architectures: The Good, the Bad, and the Ugly. Based being the operative word. We not only cut the presentation in half so we could concentrate on the most important issues we also rewrote the content. If I’m allowed to say so i think we somehow manage to surpass the original presentation. :-)

    The session went so well that me and Jota are already conjuring what we should come with next time. :-)

    TLA206-Scrum e Team System – This was a mixed and ungrateful presentation. I wanted to do a talk on both Scrum and Team System. Since the time was short i had to base my session on the assumption that people were allready familiar with Scrum and had a vague idea what Tem System is.

    In this session I’ve shown the three available process templates to use Scrum with Team System, namely:

    I’ve tried to enumerate the advantages and disadvantages of the three alternatives and i showed how you can leverage Team System while using Scrum. I did this by demoing Scrum for Team System and how you can complement it by using Scrum Dashboard to have a complete and visual grasp of the progress of your sprint. I’ve also shown how you can use Conchango’s TaskBoard to let you plan and manage your sprint more easily in a graphical manner.

    The session was well received by the 120 people that were present.

     

    TLA303 – Customização e Extensibilidade Team System – This was a session on customization and extensibility of Team System. This was a 300 level session and it was assumed people knew what Team System is. Perhaps this scared people off because the session wasn’t full. I don’t have an official count, but by calculations there were probably 68-80 people on the room. This is a purely hands on session. The session has 5 slides with content (excluding titles,etc) on which 3 are images, so it leaves us with 2 slides of information. The rest was done purely on a Virtual Machine with VSTS doing demos. Customization and extensibility is a topic that can be talked for hours so i had to focus my talk on a few topics. I’ve chosen these ones:

    • Customizing a process template (including reporting)
    • Using the Object Model
    • Work Item Custom Controls
    • Source Control Checkin Policies

    In this session I wanted to do something different. Instead of the usual show the power and ease of process customization demo by demoing how it is possible to customize a process by adding a field to a bug to allow you to list the client who reported it or the date that is expected to have this feature implement or such trivial task.

    To show the power of TFS i did a demo totally unrelated to software development. I created a process template from scratch to manage a soccer championship. Not only i modeled the games fixtures (so we can track the calendar, the results, which games have already been played,etc) I’ve also used it to model the workflow of the logistics that happens behind the scenes the allow the game to happen (you know, arrange the police escorts,referees, game reports, notify the press in sum all the tasks that need to happen before and after a game).

    The has been modeled using TFS built in capabilities.

    • Areas to segregate different divisions (1st division, 2nd division,etc)
    • Iterations to model championship seasons and game weeks
    • Global list to hold the list of teams
    • Team Queries to see which games are scheduled, already played,etc,etc

    To show the power of the object model I’ve created two demos

    • One that draws the whole championship fixtures in a random manor by creating all the work items that represent a game
    • An editor that allow you to see the games (leverages the team queries defined in the process template), edit a game or create associated tasks to a game.

    Since the referee have to send reports about the game and sometimes they may include in the report non advisable words I’ve also shown how do develop a custom checkin policy to recommend referees not to include some words in the report. :-) (If you are Portuguese and keep up to date with soccer behind the scenes maneuvers this is much more clearer. Como diria o OctávioVocês sabem do que eu estou a falar”) 

    The session went well (not great but well), but the feedback was positive and people seemed to like my non traditional demo. :-)

    I have to refine some of the demos and to make the story and the transition between the demos more smooth. To make things more easy i wanted to have a slide explaining the things i was leveraging in a demo, but this required a second project to show the slides while the demos were happening and a second project simply wasn’t available. Alas next time things will go smoother.

    I thing overrall DevDays was very positive. As a whole things seemed to went rather well and this year the evaluations (at a general level) seemed to be above last events average.

    At a personal level things went well too. I pulled of the fact that I had to present three sessions in two days.

    Not to escape other events tradition, I was stalked by the usual Paparazzi which at the end of the last day managed to corner me and made me mumble a few words to a camera.

  • DevDays 2009

     

    The cat is almost out of the bag

    devdays_180x150[1] 

    DevDays 2009 is going to be announced very soon in the meanwhile you can browse the official site :-)

    It’s a two day event with over 50 sessions and 40 hands on labs.

    With a lot of topics including:

    • Visual Studio 10 and .Net 4
    • Microsoft Surface
    • Windows 7
    • Internet Explorer 8
    • Windows Azure and Azure Services Platform
    • Biztalk 2009
    • Silverlight e WPF
    • SQL Server 2008
    • ASP.NET
    • Windows Live Services

    The agenda is not closed yet, so I’m not yet sure which topics i will be talking this year. :-)

    The date and location is already closed. 18 and 19 of February.

    Keep an eye on the session page to see which news are going to be announced in the next few days and weeks. :-)

    [Cross Posted on http://agilior.pt/blogs/tiago.pascoal/archive/2009/01/14/6695.aspx]

  • Malevich – A new code review system

     

    In a previous post i slightly grasped (actually just pointed to a good post) about the dynamic of code reviews.

    I’ve also talked about the lack of tools for doing code reviews in Team System, something that JB Brown (from TeamReview) picked it up and wrote about it  a such clear and sucint way that i should have done it in the first place. :-)

    Anyway there seems to be a new kid in town. A new web based code review system that can be used in conjunction with TFS.

    It is called Malevich, you can read it’s announcement right here or you can just go directly to the Malevich project site on codeplex.

    I haven’t tried it yet but it seems a nice and capable. The TFS integration is a bit on the light side, since it only interacts with source control (since it supports other source control systems as well). You also need to use a command line tool to start code reviews.

    If Visual Studio supported extending the checkin window it would be possible to add a way to trigger a code review directly from there. Since an addin would be come in very handy to start code reviews directly from Visual Studio.

    When a code review is “requested” a mail is sent to the person (or persons) that are invited to review the code, it would also be nice if a code review task as automatically created in the work item store.

    The good thing is that Malevich is available with source so you can hack it yourself. :-)

     

    [Cross Posted on http://agilior.pt/blogs/tiago.pascoal/archive/2009/01/11/6647.aspx]

  • Gendarme - Code analysis tool

    In the last few days I've found a tool called Gendarme it is an open source tool from the Mono Project that allows you to find problems in .Net (either Mono or Microsoft.Net) applications and libraries.

    It has a rule based system to do the analysis and it can be seen as an FXCop/Team System Code Analysis kind of system.

     

    I haven't counted the number of rules it provides but doing a visual analysis it doesn't seem to have as many rules as Team System Code Analysis. However quantity isn't everything and from my analysis it has a pretty number of good rules (including some categories that the Code Analysis doesn't has like Linq)

     

    The rules are grouped in the following categories

     

    You can see the full list (and description) of the rules here

     

    There is no Visual Studio integration so you either have to run it from the command line or from a supplied windows form wizard. No MSBuild integration exists either but it would be fairly easy to implement a custom action or just call the execute task.

    Integration with TFS could be either easy or hard depending on how fully integrated you would want it. Since the execution of Gendarme produces a report (XML,HTML,etc) you can execute on your build process and make the HTML report available on the build results (the easy part) or if you want full integration like having the data directly on the TFS build warehouse that could a lot more work.

     

    I've spent a couple of hours running it on a median sized project and it enabled me to fix some naming mistakes, make the code more clear in some areas and even fix an error where disposed wasn't being called.

    During my analysis I also found a bunch of false positives. The tool has a feature that categorizes the issues that it has found with a degree of confidence, which states the degree of confidence that the rule has in the face of the found issue (most false positives had a medium to high degree of confidence which is a bummer).

    The rules documentation is complete and allows you to understand the consequence of not implementing the rule and why you should fix the found issue (although some rules are not documented).

     

    Definitively a tool to use in the future.

     

    [cross posted on http://agilior.pt/blogs/tiago.pascoal/archive/2008/12/29/6537.aspx]

  • Your Code Sucks and I Hate You

    Did the title catch your attention? Well it did mine.

    It is the title of a post that I've just read. Although the title seems a little bit trolish it's because it probably is, if you read the subtitle you will see the main title is not only trollish but very misleading. The post subtitle is The Social Dynamics of Code Reviews.

    It mainly talks about code reviews in open source projects but most of the knowledge sprung in this post is applicable to close source projects.

     

    Code reviews is something that is hard to do effectively. Even you get past the sociological issues mentioned on the post, without a decent tool it is very hard to keep track what has been reviewed and it's not.

    Code review is one of the area I wish there were some kind of offering for TFS. Granted you can do code reviews with shelve sets and some sort of informal communication via email (assigning code review tasks or even a work item type) but that would give us no metrics or a simple way to keep track which parts of the code have been reviewed.

     

    The more complete solution for TFS seems to be TeamReview (freely available on codeplex) which combines specific work item types and a Visual Studio add-in to help you manage the process. While I never tested the tool, I've given some attention to the description and workflow and it seems to work at a very micro level of the code. And the metric tools (what has been reviewed, what is not, etc,etc) seems to be non existant.

     

    There are some more mature solutions that perhaps can be adapted to be used with TFS:

    • Review board which has originated from VMware
    • The venerable Codestriker
    • JCR - which unlike other tools doesn't work at the source control level but with whole files

     

    On the commercial side Code Collaborator from Smart Bear has a good reputation and it works with TFS but never tried it either.

    [Cross Posted on http://agilior.pt/blogs/tiago.pascoal/archive/2008/12/28/6528.aspx]

  • Team System Virtual Machines updates

    TheVSTS 2008 virtual machines that are currently available are set to expire on 31 December, so Microsoft by the magical hand of Brian Randell dressed as santa (people who know Brian can easily get the resemblance :-)) and updated the virtual machines to expiry on 31 December 2009.

     

    Not only he updated the machine with the latest goodies (power tools, the database edition GDR) but  he also added to the list 2 new virtual images that can be run on Hyper-V, this brings up a total of 4 virtual machines (one with only TFS and another with TFS and Team Suite).

     

    This is what has been included

    • the latest virtual machine additions or integration services components
    • all of the latest Windows Updates as of December 1, 2008
    • Team Foundation Server 2008 SP1
    • Visual Studio 2008 Team Suite SP1
    • Team System Web Access 2008 SP1
    • Team Foundation Power Tools, October 2008 update
    • the latest MSSCCI provider
    • Team Explorer 2005 (this allows you to work with TFS from Visual Studio 2005 which is installed so that you can edit and customize TFS reports)
    • the GDR for the product formally known as Visual Studio 2008 Database Edition (aka Data Dude)
    • current Process Explorer, Process Monitor, and Background Info

     

    You can get the goods here

     

    Or read all the details on Brian's post

    [Cross Posted on http://agilior.pt/blogs/tiago.pascoal/archive/2008/12/26/6506.aspx]

  • TFS Branching guidance 2.0 has been released

    When I give a Team System Workshop one of the topics that tends to generate some discusssions is the module about source control and branching (mainly the branching patterns and usage).

     

    Branching is not an easy subject, it normally requires a mindset shift for people who are not used to it. Specially when there are so many ways of doing it.

     

    In TFS 2010 branching is going to be a lot easier  and powerful since the team has been spending a lot of time on branching and visualization support 

     

    When it comes to branching patterns my bible is still Software Configuration Management Patterns: Effective Teamwork, Practical Integration but a few days ago the VSTS Rangers with the collaboration of the VSTS MVP's has launched the second release of the TFS Branching Guide  on codeplex.  This will help TFS users deal with branching scenarios and usages in TFS.

     

    What will you get if you download the package?

    • TFS Branching Guide - Main 2.0
      • This is the main article which briefly explains branching concepts and introduces 3 levels of the most common branching scenario
    • TFS Branching Guide - Scenarios 2.0
      • A collection of less common branching scenarios
    • TFS Branching Guide - Q&A 2.0
      • A set of most frequently asked questions with answers
    • TFS Branching Guide - Drawings 2.0
      • A set of branching drawings in different formats including a large branching poster
    • TFS Branching Guide - Labs 2.0
      • A couple of examples for hands on labs with step by step instruction for practicing the branching scenarios

    [Cross posted on http://agilior.pt/blogs/tiago.pascoal/archive/2008/12/23/6467.aspx]

  • Nova Comunidade VSTS no Brasil

    Foi lançado no brasil uma nova comunidade virtual de Visual Studio Team System.

     

    É muito recente mas já conta com alguns membros.

     

    Para os interessados, podem encontrá-la aqui

    [Crossposted em http://agilior.pt/blogs/tiago.pascoal/archive/2008/12/06/6253.aspx]

  • Team Foundation Power Tools - October 2008 Just Released

    The Team Foundation Power Tool has just been released.

     

    It includes major news since the last release.

     

    Major features highlights:

    • Explorer Extension - That's right you will now be able to do operations on TFS source controlled files directly from windows explorer!!!!
    • The concept of Teams (team tools) - The concepts have teams have been introduced. You can see teams inside team explorer (it even has IM integration). It also allows you to have team queries (work items for the team (or sub teams) instead of just my work teams)
    • Power Shell Extensions - If you are a scripting  buff youwill love this
    • TFS Server Manager - Watch statistics and data about TFS usage (this is the tool Brian Harry uses to give us the TFS dogfood statistics on his blog)

     

    The installer as also been greatly improved (for example the setup is now per machine instead of per user), tfpt.exe had some additions and the help file has been improved.

     

    The Team Tools has a GREAT feature. It allows you to automatically get updates for custom contents (custom controls, check in policies,..) this will greatly reduce the hassle of manually distributing custom controls and check in policies.

     

    Go grab it. I still haven't tried the final version but i have been using a pre release version for a few weeks and it's great (love the team tools).

     

    Kudos for Team System Team to deliver value added tools between the major releases.

     

    It is available for download here 

    [Cross Posted on http://agilior.pt/blogs/tiago.pascoal/archive/2008/11/08/5898.aspx]

  • It just doesn't make sense....

    According to this article for the first time there is documented case of a Leopard hunting down a crocodile.

    While it doesn't seem to be that big of a crocodile nonetheless it seems like a feat for the leopard (I certainly wouldn't mess with either one of them :-)).

    But the comment that caught my attention was:

    "It just doesn't make sense. The meat you get out of a crocodile is just not worth the risk it takes a predator to acquire."

    I have no idea why the Leopard did or what his motivations were.  But I drew an immediate parallel to a lot of things that happen in IT. A high risk move for a ridiculous amount of meat. :-)

    The photographer's site has a take on the story  and the full sequence of photos
  • TFS: I have a volume license but can't find my serial number anywhere...

    This is the question I hear a lot.

     

    People install a TFS trial and when they license it with a volume license agreement but they can't find their serial number to upgrade from trial to licensed version.

     

    After failing to find the key, they do the sensible thing. Call Support. :-) Which normally doesn't help.

     

    Here is the recipe to quick found your key.

     

    Download the TFS ISO file from the volume licensing site.

    Either burn the image or use an ISO reader to see it's contents.

    There should be a folder called AT which contains a file called setup.sdb

    Open setup.sdb with a text editor (notepad will do fine) and search for the string Product Key

    The next line contains the product key.

     

    Voilá. You are now read to fire up TFS setup (control panel->add/remove programs) and enter your serial key.

  • Molding the shape of TFS next version

    Once again Team System Product group is asking for the community feedback on some of the upcoming features of TFS next's version.

    You have the opportunity to influence the future of TFS to match your needs. The product group has released three more specifications that are open for discussion:

    The entire list of already published specs are here

    Even though shaping up the future of the next version is great, what is even greater is using Team System 2008 to help us solve our current problems. :-)

    I you haven't tried Team System 2008 in the next few days you will have the opportunity to do so. Since the current version VSTS VPC freely available images are set to expire on 1st of April.

    A new version of the VPC has been already sent to the distribution server and as we speak (well as i write :-)) it is being replicated to the CDN servers, the release announcement is imminent. :-)

    This new version brings some extra goodies. Besides a Team Suite version of VS and TFS server it also has VSTS 2008 Hands on Labs installed (also available has a separate download if you don't want to download the VPC).

    Watch out of the announcement of the release very soon on Brian Randell blog

  • Project Server 2007 VSTS Connector installation gotchas on TFS 2005

    On the 10th of March Lenny Fenster released a new version of the Project Server 2007 VSTS Connector.

    This releases fixes some bugs and adds support for TFS 2008, unfortunately Lenny forgot (most probably lacked the time to do it) to update the requirements list. We had some issues while upgrading the older version of the connector on a installation still using TFS 2005.

    The components install without problems except the connector for Team Foundation server (the third option on the installer). The installer aborts stating it had unexpected error. The log file hasn't any useful information.

    After some heavy digging (and nagging Lenny over IM :-)) I figured out that the problem lied  on the fact that the connector installer references to TFS 2008 API instead of TFS 2005

    To solve the installation problem you have two choices:

    • Install the TFS 2008 API on the server the connector is going to run. The only way to install the API is by installing Team Explorer 2008
    • After the first time the installation fails, create a standard .Net policy redirection DLL file configuration file on the installation folder temporary directory (c:\windows\PS2007-TFS Connector) so when the code attempts to to access TFS using the API it uses 2005 API instead of the 2008 version. I haven't gone this path, since this would also involve applying the same redirection on the connector. So in theory this should work but I haven't tested it. :-)

    The web site to manage the connector is also configured to use framework 3.5 so you must install framework 3.5 on that machine (if the web site is installed in the same machine as the TFS connector then no need to worry about this since Team Explorer 2008 also installs framework 3.5).

     

    Lost a bunch of hair on this one, I hope this saves you same time if you are in a similar situation.

  • Requirements Management with Team System

    Requirements management is considered one of the Achilles heels of Team System but that is not entirely true. Requirements management is a term that refers to a very broad set of different activities that concern the lifecycle of requirements life.

    But there is a certain truth to this pre conceived idea, since Team System offer is (practically) non existent when it comes to requirements elicitation (which is widely confused with requirements management, since requirements elicitation is just a small part of requirements management).

    When it comes to requirement management Team System is (imho) only ill served in the elicitation phased. And by that I only mean out of the box support, since there are offers from several partners to help you handle this shortcoming in Team System.

    One of my my favorites for this task is the young TeamSpec  from Personify Design, if you are more curious about TeamSpec you can watch Juan Perez talking about it oh Channel 9

    Microsoft recently launched a Requirements Management with Visual Studio Team System White Paper explaining all the phases of requirements management, how they relate to Team System and some partner products that will help you fill the gaps that Team System currently has.

    As a bonus the white paper also includes some information how this gap will be reduced in Rosario (Team System next version).

More Posts Next page »
Powered by Community Server (Personal Edition), by Telligent Systems