Thursday, June 24, 2010

Using Team Foundation Server 2010 from Visual Studio 2005 and 2008

On my project the TFS server has just been upgraded, ready for us to replatform the software onto .Net 4.0. In the meantime we're still working on a mixture of Visual Studio 2005 (for BizTalk 2006 R2) and Visual Studio 2008 (for the rest of the .Net and database code).

Team Foundation Server 2010 is not compatible with Visual Studio / Team Explorer 2005 and 2008 without the compatibility upgrade.

In order to install the compatibility pack for Visual Studio 2008 go here:


In order to install the compatibility for Visual Studio 2005 go here:


Workspace issues

Once you have connected to the new TFS server and mapped your projects back, you should be able to map your workspaces without any problems.

However, you might find that your workspaces do not work. This is especially an issue in Visual Studio 2005, which seems not to recognise the workspace that you have reapped the workspace. If this is the case, run the following command from the VS2005 Command Prompt:

tf.exe workspaces /remove:*

Then get latest on your source branch. It should be OK.

Tuesday, February 23, 2010

The endless debate on "what is an architect"

Just been following the following debate in LinkedIn: http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers&discussionID=13839089&gid=100988&commentID=12211252&trk=view_disc

The discussion started with the following comment:

This is what is killing Enterprise Architecture…
Quote from "John Zachman" article..;-)
This is what is killing Enterprise Architecture… every computer programmer, systems designer, software architect, solutions architect, technology architect, computer operator, PC owner, data architect, database architect, network architect, business analyst, systems analyst, enterprise architect, service architect, object architect, project manager and CIO calls whatever they want to or maybe, whatever they are doing, “Architecture.” It is chaos. No wonder we don’t have Enterprises that are coherent, integrated, flexible, dynamic, interoperable, reusable, aligned, lean and mean and working.


And I thought I'd add my bit as well.....

I love this discussion, if only because it goes round in circles so much. Getting back to the original point though:

"....calls whatever they want to or maybe, whatever they are doing, “Architecture.”"

This gets to the nub of the problem. Quite simply, you are an architect if the role you perform is "architecture". However, people do indeed hijack the term to make their own role sound better. We cannot rely on some higher authority to define for us what an architect is and then impose a set of criteria to test against. Instead it is incumbent upon all of us who consider ourselves to be architects to explain what architecture involves and if we suspect others of "job title inflation" we should ask what they have done that qualifies as architecture.

As a marker, I think there are some fundamental aspects of architecture that we should be able to agree on:

* Architecture is a high-level design activity. The output of architecture is a design of some sort, although this can vary enormously in the level of abstraction. Architecture is the synthesis of a design that satisfies a set of requirements.

* A secondary activity of an architect is communication of the design and the supervision of the detailed design and implementation to ensure that the design intent has been captured.

* Another secondary activity of an architect is to communicate to those creating requirements what the impact of their requirements will be on the design and to advise on improvements.

Someone whose primary role is development / implementation / operations is not therefore an architect. I think "enterprise" architecture vs other types of architecture is a red herring in this regard. These are all valid disciplines - there are indeed "data architects", there are indeed "infrastructure architects" and there are indeed "enterprise architects". The key thing is that in each case the primary goal of their activity is design.


You've got to love it. I haven't seen a more circular debate since the old artists vs scientists one that you have at university!

Thursday, January 07, 2010

User-Defined Functions for Today and Tomorrow in SQL

Just a quick post today. I have been working on some bugs on a system were about to release, which was originally built by some dodgy developer before we took it over. The older reaches of the application are a total mishmash f things that should be in the database, data access layer, business logic layer and in the UI, so please don't flame me with comments like "you shouldn't be doing this in the database, it should be in the ......".

One of the features that I was fixing was a view that contains the current effective price for a product. Imagine that you have a table that contains prices, and when a price changes you insert a new row with the updated price and an effective date. Simple stuff - the current price is the one with the most recent effective date that is either today or in the past, i.e. before tomorrow.

Now, SQL server is a pain in the ass when it comes to simple date stuff like this, because all I want is something like this:

SELECT
TOP 1 *
FROM
ProductPrice
WHERE
ProductID = @ProductID
AND EffectiveDate <>
ORDER BY
EffectiveDate DESC

I therefore wrote a couple of functions to achieve this:

CREATE FUNCTION [dbo].[Today]()
RETURNS datetime
AS
BEGIN
DECLARE @today datetime;

SET @today = convert(datetime, convert(varchar(10),getdate(),101), 101);

RETURN @today;
END

CREATE FUNCTION [dbo].[Tomorrow]()
RETURNS datetime
AS
BEGIN
DECLARE @tomorrow datetime;

SET @tomorrow = convert(datetime, convert(varchar(10),getdate(),101), 101);
SET @tomorrow = DATEADD(d, 1, @tomorrow);

RETURN @tomorrow;
END


Enjoy :)