Thursday, July 19, 2007

Visual Source Safe (VSS) File Headers

Applies to VSS 6.0c and above

Most Architects or Tech Leads needs to set up the VSS for the solution. Though VSS does keep track of all the changes to the files. It would be great if we can immediately find out who was the last person who edited the file. This way we can bug him when something goes wrong with the compilation.


On a personal front the headers does give a great look and feel to the code (green color on top) which I adore.

In order to use it you will need to know what are called VSS Key words.

Since VSS considers these an extra burden (dont know why, when these guys want a comment before check out which I find absurd) we also need to know what is VSS Key word expansion.

Add the header like this.

/******************************************************************
// Project Name : Your Project or product name
// File Name : $Workfile: $
// Created By : Anton
// Description : Base Class for Data Access Layer.
// =========================================================
// Last Modified by : $Author: $
// Date : $Date: $
// Revision No. : $Revision: $
*******************************************************************/

The test $Workfile, $Author, $Date, $Revision are all key words.


You will aslo have to do some changes to the VSS admin.

Login in to the database that you need the keyword expansion.

On the Tools -> Options

You will notice

a text box for Expand Keywords in files of Type
Enter *.cs

if you want this for more than one file type
Enter *.cs,*.xslt

And viola you are ready.

This will expand to the following after check - in

/*****************************************************************
// Project Name : Your Project or product name
// File Name : $Workfile: DataAccessBase.cs $
// Created By : Anton
// Description : Base Class for Data Access Layer.
// =========================================================
// Last Modified by : $Author: Anton $
// Date : $Date: 8/18/05 8:09p $
// Revision No. : $Revision: 3 $
*****************************************************************/

Happy Programming
Anton

Labels:

Wednesday, July 04, 2007

ASP.NET AJAX Control Toolkit Not for Enterprise Applications

We have been using our own ajax framework till now. Now that Microsoft itself published these controls I thought of checking them out.

The first thing is their much talked about UpdatePanel.

I noticed when some client interaction happens the Panel actually calls the Page_Load event every time. It basically loads the entire page instead of just calling the method which should have been written to be self sufficient. This is like let the server reload the page but the client will get only filtered content.

I have never seen a technology which such a big blunder being accepted so fast.

Its a known fact that the page load is used for load content into the page so if it calls this event it would also get all the datasources even though the ajax function does not deserve it.

This shall never work in an enterprise scenario. I am lost for words as to how these so called experts did not notice this blunder.

I am really lost for words.

For those of you who develop enterprise applications please develop your own frameworks.

Happy programming,
Anton

Labels: ,