Some stuff about Web and .NET development
RSS icon Email icon Home icon
  • Getting Visual Studio 2010 search back

    Posted on August 16th, 2010 Thibaut 2 comments

    If you already worked using Visual Studio 2010, you surely noticed the new, simplified interface and the different code profiles that you can choose after the installation. As a result, you’ve got a bigger area to code and the toolbars are kept to the minimum (at least if you chose the code only profile like me).

    But the thing is that I’m addicted to the search box and it’s gone (maybe due to my config, but surely others had the same case)… Here’s how to get it back :

    • Step 1 : check that you’ve enabled the standard toolbar. To do this, right click in the toolbar area (top of the IDE) and select Standard

      VS2010 Standard Toolbar
    • Step 2 : go to the customize options of the standard toolbar by clicking on the little arrow at the rightmost of it.

      VS2010 Standard Toolbar customize option
    • Step 3 : click on the Add command button, go to the edit pane and add the find in files and go to find combo. Then use the move down button to rearrange the commands you’ve just added. Their standard place is just before the solution explorer command.

      VS2010 Standard Toolbar customize window
    • Final tips : here are 2 simple shortcuts that will maybe make you addicted to that search box. First, moving the mouse and clicking into it to put the focus each time you want to perform a search isn’t really productive. Try [ctrl] + [:]. It will automatically put the focus into it. Then type > of [fileName] and it will list for you all file occurences starting by the name you’ve just entered. The magic behind it is the following : the “>” sign transforms the search box into a command window, and “of” stands for “open file”. An essential trick !

      VS2010 Standard open file

    Make good use of it ;)


  • Visug summary : Modeling that works with code

    Posted on November 15th, 2009 Thibaut 2 comments


    Last Visug edition, animated by Marcel De Vries from InfoSupport, concerned modeling with Visual Studio 2010. Note before we start that all of this is only available in the ultimate edition of VS 2010.


    • Why we use models
    • Models first approach
    • Code first approach
    • Conclusion

    1. Why we use models

    • Diagrams for communication
    • Diagram = viewpoint on a model
    • Model use is challenging because :
      • Many interpretations of the same diagram
      • UML available but people uses a few diagrams only (ex : use cases)
    • Models become stale because :
      • Implementation will be different from the model
      • Maintaining diagrams takes time & effort
    • Ultimate goal : run a model (Oslo vision), from a metamodel store (data repository)

    When to create a model ?

    • It’s about communication, so create only models that serve a purpose
    • Create only models that differ from the normal case

    Two approaches

    • Models first
    • Code first

    2. Models first approach

    Scenario : you start a project and need to define the solution you’re going to build

    • Requirements analysts : use activity diagrams & use cases to outline functionality
    • Architects : build logial diagrams to outline required architecture to meet customer demand stated in the requirements
    • Testers : use the diagrams to do its test analysis based on the specified requirements
    • Developers can use the diagrams done previously to materialize the projects

    => Models are used to communicate throughout the team about what we’re going to do

    In Visual Studio 2010 Ultimate Edition :

    • New project type : modeling project
    • Support for UML 2.X diagrams
    • Other new types of diagrams : Layered diagrams & DGML diagrams

    Diagrams can be generated from code. The speaker uses it to generate sequence diagrams for code reviews. Note that those diagrams are plain XML files but it’s recommended to manipulate them via the API (cause in a next version, maybe Microsoft is going to change the format).

    3. Code first approach

    Scenario : maintenance of existing projects.

    • Developer can generate diagrams to gain insights on code dependencies
    • Architect can find architecture patterns
    • Architecture explorer helps discover and understand how a system works

    Layer diagram

    • Used by the architect to define the architecture
    • Classes and namespaces are mapped to layers in the diagram
    • Details the intended design
    • Diagrams are very interesting to verify the architecture and enfoce it.
    • In VS2010, there’s a tool to validate the architecture. Ex : you draw 3 boxes (UI, BLL and DAL), you link (arrow link) the UI to the BLL and the BLL to the DAL, you drag/drop your projects into the correct box. You then click “validate architecture” and you get a report about what’s violating the dependencies defined by the arrows.
    • You can also use these diagrams to validate things such as code coverage in percentage for a given layer.


    • Directed Graph Markup Language
    • Nodes
    • Containers
    • Links
    • Styles

    You can also create you own diagrams (Progression API). You code in C# the way you want to generate the diagram. Styles can also be defined. Ex : speaker coded a diagram with nodes that must appear green or red (styles) following the code coverage percentage. Can also be used to annotate existing diagrams.

    4. Conclusion

    • Models & diagrams primarily for communication
    • VS2010 supports both approaches : code 1st and models 1st
    • New innovations in models that work with code (DGML & layered diagrams)

    Also note that ScottGu is going to visit Visug in december so stay tuned ;)


  • Visual Studio 2010 new logo & MSDN website refresh

    Posted on October 21st, 2009 Thibaut No comments
    VS2010 logo

    A new logo for Visual Studio (illustrated above) and the MSDN were recently introduced. I personally find ‘em pretty damn sweet : sober yet powerful. Also note that the MSDN has not just a new logo, but the whole website was refreshed at the same time, featuring new services. Details about this can be found on Scott Hanselman’s blog.