Contact Me
Software Factories:
|
Abstract Thinking in UML: the Russian Doll
Wednesday, February 6, 2008, 10:20 PM General
Within my current role, I am helping the client interview candidates for both Senior .NET Developer and Architect positions. As part of the interview process I ask the candidate a few quick-fire questions regarding .NET (dependent on the position that they have applied for), and then I ask them to model a Russian Doll using a UML class-diagram. For those who don’t know, a Russian Doll (or a Matryoshka Doll), is made up of many pieces that nest inside one another. The idea behind this simple modelling exercise is to allow the candidate to demonstrate both abstract thinking (by applying some form of object-oriented analysis), and their agile modelling capabilities. This is obviously a very important aspect if the candidate is to fit in an Agile team. Once the description of a Russian Doll is agreed upon, the candidate simply needs to begin modelling on the whiteboard. It is surprising how many candidates fail to apply an analysis process to the problem, or simply ask questions. I wouldn’t consider it a weakness if a candidate asks me to get the model started for them. Many have simply given up immediately. By far the simplest approach would be to analyse the nouns in the agreed description (i.e., a “doll” made up of many “pieces”). That gives us two candidate classes. Then we need to think about how the pieces nest inside one another, and also how we can represent the fact that a piece is the last piece in the set making up the doll. I am sure that there are several ways in which this exercise can be modelled, but my model answer is shown below:  All design is subjective, but my model answer has two qualities (which hopefully would also be represented in the candidate’s design). First, it distinguishes between two distinct piece types (one hollow and one solid), and secondly, how these pieces can be arranged using the Composite design-pattern to form a doll that is made up of several hollow pieces, with a solid piece being the terminating condition for the overall structure. The use of the Composite design-pattern also prevents us from having a structure that has a solid piece that is the container for other pieces, since clearly it is collaborating in the leaf role. So far, one or two candidates have actually questioned the validity of the association between HollowPiece and Piece (its base). I am hoping however, that this is down to inexperience with UML, since I feel that Composite is one of the most commonly used design-patterns (regardless of whether a candidate knows they are using it in their code or not). I would be interested to hear any thoughts on this modelling exercise, especially as part of an interview process. I would also welcome any comments on my model answer too.
[ add comment ] [ 0 trackbacks ] permalink
Setting up Team Foundation User Permissions
So you've installed Team Foundation Server and now you need to setup your permissions. There's quite a lot to follow in the TFS Installation Guide, so if you're using Active Directory, here's a digest of how I've recently defined permissions on a single-server deployment ( this should work with both 2005 and 2008): First, we have to remember that there are three areas where permissions have to be managed. TFS itself, SharePoint Services, and SQL Server Reporting Services. As far as I can tell, SQL Server Reporting Services appear to be the least secure of the three. When a user is assigned a Role Assignment it is not in relation to any particular Team Project. There are also four distinct role types that we have to consider when thinking about permissions (summarized below):
- TFS administrators are those users who create Team Projects
- TFS project administrators are those users who manage Team Projects
- Everyone else is either a Contributor or a Reader
The approach that I have taken (obviously working in conjunction with an Active Directory Administrator), is to define two Active Directory domain groups called TFSAdministrators and TFSProjectAdministrators. TFSAdministrators is added to the SharePoint Administration Group (or the Farm Administration Group in SharePoint 2007). It is also added as a System Administrator for the site-wide security settings in SQL Server Reporting Services. Basically any user added to this group will then have the appropriate permissions to create Team Project Portals and Reports in both SharePoint and SQL Server Reporting Services. The second group (TFSProjectAdministrators), gives Team Project Administrators the Content Manager Role Assignment within SQL Server Reporting Services. Finally, to support the Contributor and the Reader roles, we define a new Browser Role Assignment within SQL Sever Reporting Services for the Domain Users group (i.e., the group to which everyone on the Domain in a member). The combination of these two Active Directory groups and their permissions within SharePoint and SQL Server Reporting Services, effectively means that there is no longer a need to manually add users to the appropriate Role Assignment in SQL Server Reporting Services. Instead, a user can be added to their appropriate Active Directory group. Since permissions in SQL Server Reporting Services are not relative to a Team Project, this makes things much more intuitive going forward. In fact, it is now possible to forget about SQL Server Reporting Services altogether, and instead focus on adding users to the Team Foundation Server groups (i.e., Team Foundation Administrators or [ project_name]\Project Administrators), and then adding the user to an appropriate group in the Team Project Portal. I think that this provides a sensible and intuitive approach in managing user permissions within TFS. One change that I might consider is not adding the Domain Users group to the Browser Role Assignment in SQL Server Reporting Services, since this effectively gives every user in the Domain the ability to view all reports.
[ add comment ] [ 0 trackbacks ] permalink
The Agile misconception as witnessed by Dilbert
Monday, December 10, 2007, 03:35 PM General
A common "agile" misconception reflected in a way that only Scott Adams can:  ( isn't this all too familiar?)
[ add comment ] [ 0 trackbacks ] permalink
Introducing Partial Methods (that's right... methods)
Since the early betas, and now with the final RTM release of Visual Studio 2008, developers have the opportunity to begin exploring some new language features. Perhaps the most talked about language feature is LINQ (Language INtegrated Query), that provides a ubiquitous way in which to query data sources right from within the language itself, whether it be memory resident objects, XML, or relational data. There is however, one new language feature that has not been publicized that much: Partial Methods. By now, most developers will have encountered partial classes and seen their benefits. They provide a means by which code-generation can be easily implemented and managed. Authored code and generated code can exist side-by-side in separate files, and the compiler will perform the task of stitching everything together during compilation. The Form designer provides a good example of this separation in action. Thinking beyond the Form designer however, it is safe to assume that many of the motivations for partial classes was driven by Microsoft's Software Factory thinking. Code that is generated by a DSL for example, can be easily interwoven with code provided by the developer using the DSL. There is no longer the need to mark areas of a source-file as protected from the code-generator, as was often the case in the past. The value gained from partial classes is clear, but not immediately obvious for partial methods. Partial methods are made up of a method-declaration using the partial keyword, and an optional method-body. The method can accept parameters, including parameters modified with the ref, this, or params keyword. Methods must also be private and must return void, and more significantly, they can only be declared within a partial class. The following example demonstrates a partial method declaration (in bold). Read More...
[ add comment ] [ 0 trackbacks ] permalink
T4 Template Editor for Visual Studio 2005/8
Clarius have released a new T4 Templating Transformation Toolkit that provides a better experience when working with T4 templates. Although T4 templates are predominately used for Guidance Automation and DSL work, with the T4 components being included out of the box in Visual Studio 2008, it is likely that more and more developers will begin using them for their own code-generation work. Well worth taking a look.
[ add comment ] [ 0 trackbacks ] permalink
Had a think... time to re-think the adventure
To all those who have subscribed to, or regularly read my blog (there's not many I know but one can hope): I have decided to abandon my attempt in building a Software Factory for 3-tier Enterprise solutions. I have decided to do this because of two principal reasons: The adventure was always supposed to be about getting exposure to the tools used in building Software Factories. I have realized that the sheer size and scope of 3-tier Enterprise applications will most likely interfere with that focus. I had intended to try and conceptualize the underlying Enterprise Framework, but this will be very difficult to do, plus it would detract from the product-line paradigm. One day I may also want to begin talking about and presenting material on what I have learnt during the adventure. This will typically be with my own clients, but as the topic becomes more prominent, I may also look into public speaking. Again, the size and scope of 3-tier Enterprise applications would make this much more difficult. Despite this, I am not abandoning my adventure with Software Factories. Instead I am going to select a domain that is much smaller and self-contained, and continue the adventure with that. I already have a few ideas and I'll post more over the next few days. I hope that you will agree that by adopting a smaller domain, the focus will remain on the tools themselves, and more importantly, the value that they may bring to the process. While pondering my decision, I came across the NMVP Enterprise Factory that has been started on CodePlex. I will take a look at this project soon and possibly even try and contribute to it (if the project owner is willing). I will post more on that if it happens too. Please note: I have removed some of the posts in the Software Factories category because they are no longer relevant. I will continue to add information about my adventures with Software Factories to the same area on the wiki. I really hope you continue following my adventure, albeit a slighty new one.
[ add comment ] [ 0 trackbacks ] permalink
How to add Guidance Automation recipes to arbitrary Visual Studio menus
If you want to place a Guidance Automation recipe virtually anywhere within Visual Studio's menu structure, then here's a great tip for finding those menu Guids and Id's.
[ add comment ] [ 0 trackbacks ] permalink
Articles on building and packaging Software Factories
Jezz Santos has announced a mini-series of articles that will discuss the packaging and building of Software Factories. The first article discusses how the various assets of a Software Factory, such as the DSL's and Guidance Automation Packages, can be combined into a single MSI installer.
[ add comment ] [ 0 trackbacks ] permalink
Back Next
|
| « |
February 2008 |
» |
| Mon | Tue | Wed | Thu | Fri | Sat | Sun | | | | | | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | 25 | 26 | 27 | 28 | 29 | | | | 09/09/10 |
|