Wednesday, May 28, 2008

INVEST - Characteristics of Effective User Stories

In Agile Software Development, for example SCRUM and XP, User Story is a tool to capture the requirements from the clients. The term User Story takes a very free form. Sometimes, we feel that there needs to be a boundary so that a user story is an effective one and not misused. I have a feeling that INVEST defines the border line on this regard.

The INVEST principle is a very good guideline for defining user stories in an agile environment. According to the principle, a user story should have the following characteristics-

Independent, Negotiable, Valuable, Estimable, Small, Testable

For an elaborate description on each of the terms please take a look at the link http://agilesoftwaredevelopment.com/blog/vaibhav/good-user-story-invest

Enable IntelliSense support for Spring.Net objects xml definition

Spring.Net has integration support with VS 2005 and VS 2008 (also supports older versions). To achieve this, just perform a simple copy-paste and define an XML namespace on the objects node. This will enable you to get IntelliSense and validation support while editing the objects node of the xml configuration file.

Two steps:

Step 1: Copy the <Spring.Net Installed location>\doc\schema\spring-objects-1.1.xsd to <Visual Studio installed location>/Xml/Schemas

Step 2: Make sure your objects node looks like this

<objects xmlns="http://www.springframework.net">
...
</objects>

With this IntelliSense support you will surely feel happy while editing the xml file!

Friday, May 23, 2008

My Article at CodeProject on LINQ to SQL DataContext CommandTimeout

CodeProject has published my article at 'Change The Default CommandTimeout of LINQ DataContext' I have discussed the topic covered in this article on a previous blog post at this link.

Please read the article and provide me with your feedback.

Wednesday, May 14, 2008

Read My Article at CodeProject on LINQ to Log4Net Logging

Today CodeProject has published an article of mine where I have shown a way to use Log4Net logging to capture your LINQ to SQL class generated log messages. I suggest you all to take a look and comment at http://www.codeproject.com/KB/linq/LINQ2Log4Net.aspx.

Try the CopySourceAsHTML VS Addin to blog .Net Codes

I have just found a great add-in for blogging my codes preserving the styles exactly the same as that I see in VS 2008. I am surely going to use it in future posts.

Follow the steps here - http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/11/21/copy-source-as-html-copysourceashtml-for-visual-studio-2008-rtm.aspx

Sunday, May 11, 2008

Page_ClientValidate - Use this Method from Javascript for ASP.Net Client Side Validation

In a typical ASP.Net web form, we have a few controls and also validators associated with the controls. The most common validators are used for Required Field validation, Type validation, Regular Expression validation and so on.

When we want to logically group the validators in a web form, we apply the same value for ValidationGroup property on the controls of a group and in this way, we create a logical division among our controls and the validation. This may be important, if we want to validate only a subset of all the controls on a form when a button is clicked and do not want to validate all the controls on that form.

If we choose to use the client side validation, then the validation takes place before the post back occurs. This works fine unless you want to validate two distinct groups on a single button click, because a button can only specify a single value for ValidationGroup.

So, on a situation like this or when you actually want to invoke the client side validation using Javascript, you can make use of the following code to invoke the validation on controls belonging to a particular validation group -

Page_ClientValidate('<your validation group name here>');

If, the result of validation of the controls in the ValidationGroup turns out to be valid, this method will return a 'true' or otherwise a 'false'.

So, with this method, you will be able to invoke the client side ASP.Net validation using Javascript.

Sunday, May 04, 2008

An Article on Unit Testing Events in C# 3.0

Please read this article to find out an interesting way to write unit tests on your events.

http://www.dotnettoad.com/index.php?/archives/12-unit-testing-events.html

Unit testing has always seemed rather easy and annoying to most of the people who are new to test driven development for the reason because there is not much room for coding other than the Assert methods. Yet, I have found that people actually starts finding it cool once they have written some test codes and stuck at a point where it offers the 'Challenge' to really write a clean and concise test code.

Happy Unit Testing Fellas!