locked
profiles RRS feed

  • Question

  •  
    There are 3 profiles in VSTS 2010 UML diagrams namely .NET, Standard profile L2, Standard profile L3
    When I select different profile, I do not see any difference in code / diagram.

    What is the significance of these profiles?
    Tuesday, February 17, 2009 7:31 AM

Answers

  • Hi Aarti,

    A profile provides a package of stereotypes. A stereotype is a marker that can be added to an element such as a class or component.  For example, the .Net Profile defines a .Net Class stereotype, that lets you mark a class as directly representing a piece of code.

    Some stereotypes allow you to define extra property values for the element. For example, the .Net Class stereotype provides a File Name attribute that can be used when translating the class to code.

    To make the stereotypes available to elements, you put them inside a package that is linked to the appropriate profile.

    The idea of stereotypes is that you can use them:
    • To add extra information to a model, for people reading it.
    • To help generate code or other artefacts from the model.
    There are some standard stereotypes, but you can also define your own. In fact, that's the most interesting case: it helps you to tune the UML notation to your own purposes.

    The UML Standard Profiles L2 and L3 are defined in the OMG's UML specification. They provide a set of standard markers that you might find useful.


    To see how profiles and stereotypes work, you could try this:

    1. In a Modeling Project, create a Logical Class Diagram.
    2. Create a Package by dragging from the Package tool onto the class diagram.
    3. Create a class inside the package by dragging from the Class tool onto the package shape.
    4. Select the package and set its Profiles property to .Net Profile.
    5. Select the class, and look at its property list. Notice that it has a Stereotypes property, which it didn't have before. The list of available stereotypes shows as a drop-down in the value field.
      This list is provided by the .Net Profile. (If you go back to the package and select a different set of profiles, the list of stereotypes available on the class will change.)
    6. Select one of the stereotypes, such as .Net Class.
    7. Now expand the Stereotypes property by clicking the [+].
      The .Net Class stereotype provides a number of additional properties, such as File Name. You can set the property for any class that has this stereotype. 

    At present, the stereotypes and their additional properties are visible only in the Properties window, but this might change in future releases.

    To define your own profiles, take a look at:
     {Program Files}\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\UmlProfiles

    By emulating the .profile files you find there, you will be able to define your own profiles. To make a profile available, add it to this directory and restart Visual Studio. (The location might change in future releases.) Your profile should appear as one of the list of available values for the Profiles property of any package. (If it does not, close Visual Studio, open a Visual Studio command prompt, and type "devenv /setup". To open a Visual Studio command prompt, go to the windows Start menu , point to All Programs, Microsoft Visual  Stidio 2010, Visual Studio Tools, and click Visual Studio Command Prompt.)

    Hope this helps.


    - Alan -MSFT
    Thursday, February 19, 2009 7:03 PM
  • Hi Aarti,

    The Oct 08 CTP is the latest CTP. On those bits, can you try the following:

    1. Right-click the logical class diagram surface, and then click Properties. Set the Profile property to .NET Profile.
    2. Drag a class to the logical class diagram and then look at its properties. It should now have a Stereotypes property.
    Esther Fan | User Education | Visual Studio Team Architect
    Thursday, February 26, 2009 12:00 AM
  •  here you can find a detailed scenario with profiles.

    http://clemensreijnen.nl/post/VSTA-2010-ndash3b-UML-Profiles-make-your-ownhellip3b.aspx


    http://www.ClemensReijnen.nl
    Friday, February 27, 2009 8:26 PM

All replies

  • Hi Aarti,

    A profile provides a package of stereotypes. A stereotype is a marker that can be added to an element such as a class or component.  For example, the .Net Profile defines a .Net Class stereotype, that lets you mark a class as directly representing a piece of code.

    Some stereotypes allow you to define extra property values for the element. For example, the .Net Class stereotype provides a File Name attribute that can be used when translating the class to code.

    To make the stereotypes available to elements, you put them inside a package that is linked to the appropriate profile.

    The idea of stereotypes is that you can use them:
    • To add extra information to a model, for people reading it.
    • To help generate code or other artefacts from the model.
    There are some standard stereotypes, but you can also define your own. In fact, that's the most interesting case: it helps you to tune the UML notation to your own purposes.

    The UML Standard Profiles L2 and L3 are defined in the OMG's UML specification. They provide a set of standard markers that you might find useful.


    To see how profiles and stereotypes work, you could try this:

    1. In a Modeling Project, create a Logical Class Diagram.
    2. Create a Package by dragging from the Package tool onto the class diagram.
    3. Create a class inside the package by dragging from the Class tool onto the package shape.
    4. Select the package and set its Profiles property to .Net Profile.
    5. Select the class, and look at its property list. Notice that it has a Stereotypes property, which it didn't have before. The list of available stereotypes shows as a drop-down in the value field.
      This list is provided by the .Net Profile. (If you go back to the package and select a different set of profiles, the list of stereotypes available on the class will change.)
    6. Select one of the stereotypes, such as .Net Class.
    7. Now expand the Stereotypes property by clicking the [+].
      The .Net Class stereotype provides a number of additional properties, such as File Name. You can set the property for any class that has this stereotype. 

    At present, the stereotypes and their additional properties are visible only in the Properties window, but this might change in future releases.

    To define your own profiles, take a look at:
     {Program Files}\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\UmlProfiles

    By emulating the .profile files you find there, you will be able to define your own profiles. To make a profile available, add it to this directory and restart Visual Studio. (The location might change in future releases.) Your profile should appear as one of the list of available values for the Profiles property of any package. (If it does not, close Visual Studio, open a Visual Studio command prompt, and type "devenv /setup". To open a Visual Studio command prompt, go to the windows Start menu , point to All Programs, Microsoft Visual  Stidio 2010, Visual Studio Tools, and click Visual Studio Command Prompt.)

    Hope this helps.


    - Alan -MSFT
    Thursday, February 19, 2009 7:03 PM
  • Thanks for the elaborate reply Alan.
    I am using Oct 08 CTP and I could not find stereotype on the class in that
    What is the latest CTP available for download?
    Wednesday, February 25, 2009 2:08 PM
  • Hi Aarti,

    The Oct 08 CTP is the latest CTP. On those bits, can you try the following:

    1. Right-click the logical class diagram surface, and then click Properties. Set the Profile property to .NET Profile.
    2. Drag a class to the logical class diagram and then look at its properties. It should now have a Stereotypes property.
    Esther Fan | User Education | Visual Studio Team Architect
    Thursday, February 26, 2009 12:00 AM
  •  here you can find a detailed scenario with profiles.

    http://clemensreijnen.nl/post/VSTA-2010-ndash3b-UML-Profiles-make-your-ownhellip3b.aspx


    http://www.ClemensReijnen.nl
    Friday, February 27, 2009 8:26 PM