Wednesday, August 10, 2011

Agile Software Development Methodology

Agile is software development methodology. It is very effective where Client frequently changes his
requirement.Since it has more iteration so you can assure a solution that meets clients requirement.
More than one build deployment for a project.It involves more client interaction and testing effort.

There are two methods by which this methodology can be implemented:-

1) Scrum: Each iteration would called a scrum which can be a 1-2 Months.In Scrum Client prioritize
his requirements what he want first. If developer did not meets all the requirement which was being fixed for a particular scrum than rest of the development part would be transferred to the next scrum (would be delivered in the next build),  means developer can't increase time decided for a scrum.

2) Extreme Programming (XP): here iteration period would be less then in scrum , which is being 2-4
weeks.Here developer prioritize what to do first on the basis of client requirement. This duration which
was being fixed for a iteration, can be increase if the some development part is still pending. The build would deployed with having all the client needs.Thus iteration period is not fixed here it can be increase.but iteration should meets all the client's requirement in this build.More attention is required for testing in XP.

It is a methodology to satisfy the customer through early and continuous delivery of valuable software. This is useful when we don't have a clear idea of the client's requirements.The development activities can be carried out using the iterative actions.

The following table enumerates the reasons for choosing Agile methodology over the Waterfall method.
 
1) Once a stage is completed in the Waterfall method, there is no going back, since most software designed and implemented under the waterfall method is hard to change according to time and user needs.  The problem can only be fixed by going back and designing an entirely new system, a very costly and inefficient method. Whereas, Agile methods adapt to change, as at the end of each stage, the logical program, designed to cope and adapt to new ideas from the outset, allows changes to be made easily.  With Agile, changes can be made if necessary without getting the entire program rewritten.  This approach not only reduces overheads, it also helps in the upgrading of programmes.

2) Another Agile method advantage is one has a launch-able product at the end of each tested stage.  This ensures bugs are caught and eliminated in the development cycle, and the product is double tested again after the first bug elimination.  This is not possible for the Waterfall method, since the product is tested only at the very end, which means any bugs found results in the entire programme having to be re-written.
 
3) Agile’s modular nature means employing better suited object-oriented designs and programs, which means one always has a working model for timely release even when it does not always entirely match customer specifications.  Whereas, there is only one main release in the waterfall method and any problems or delays mean highly dissatisfied customers.    
 
4) Agile methods allow for specification changes as per end-user’s requirements, spelling customer satisfaction.  As already mentioned, this is not possible when the waterfall method is employed, since any changes to be made means the project has to be started all over again.   
 
5) However, both methods do allow for a sort of departmentalization e.g. in waterfall departmentalization is done at each stage.  As for Agile, each coding module can be delegated to separate groups.  This allows for several parts of the project to be done at the same time, though departmentalization is more effectively used in Agile methodologies.

NUnit - A Unit Testing Framework for .Net Applications

What is NUnit 

NUnit is an open-source unit-testing tool built for .NET, which follows in a long line of similar xUnit testing tools built for other platforms. It provides an easy-to-use framework for writing and running unit tests for your .NET applications. NUnit is an automated unit testing framework for .NET. NUnit is free to use with your .NET projects. NUnit is ported from another product called JUnit, which is a unit testing framework for Java applications. NUnit provides a class library which includes some classes and methods to help you write test scripts. NUnit provides graphical user interface application to execute all the test scripts and show the result as a success/failure report (instead of message boxes from the test script). NUnit is the most popular unit testing framework for .net applications. NUnit does not create any test scripts by itself. You have to write test scripts by yourself, but NUnit allows you to use it's tools and classes to make the unit testing easier.

Test Driven Development

Improved Productivity

A key principle of TDD is that developers are most productive when they are in the process of fixing a bug in an application (note: not looking for the bug). This is one of the few times during development that measurable progress is being made on the project. While developers spend time on other things, like finding bugs, they aren't able to spend as much time writing code to correct defects (for example, fixing bugs). A key benefit of test driven development (TDD) is to maximize the time developers spend in bug-fix mode, thus maximizing their productivity.

Improved Quality

In TDD, all non-trivial features of an application are tested. These tests are written before the actual code is written, and they are run all the time. Whenever a test fails, the developer immediately corrects the failure. So, when the time comes to add new functionality, the developer assumes the functionality exists and writes a test. He then runs the tests (which often won't even compile if they rely on as-yet-undefined classes and methods), and when they fail, he enters bug-fix mode and begins adding code to the application until he can get all tests to pass once more. Often, the process of writing the test for the functionality will provide the developer with a better understanding of how the production code should be designed, resulting in improved final code quality.
TDD also makes code easier to maintain, upgrade, and redesign, and has other benefits which the reader is encouraged to research.


NUnit: A Test Framework for .NET

NUnit provides a simple way for developers to write unit tests of the .NET classes, and comes with a small, sample application that demonstrates its use. The current version is written in C# and relies on attributes rather than inheritance and/or naming conventions to define tests and test suites. The main attributes involved are TestFixture, which applies to a class containing tests, SetUp and TearDown, which are run before and after each test, and Test.

NUnit also provides a simple graphical user interface that lets you select which assembly you want to test and which set of tests within that assembly you want to run. It then runs all of the tests in the assembly (or namespace or class) selected, displaying a green bar if everything passes and a red bar if any tests failed. Details of each failed test are also displayed, making it very easy to locate the cause of the failure.

Aa479010.aspnet-testwithnunit-01(en-us,MSDN.10).gif

Figure 1. NUnit's GUI tool provides instant feedback that everything is running as it should be, according to the tests defined so far.

Aa479010.aspnet-testwithnunit-02(en-us,MSDN.10).gif

Figure 2. NUnit shows the details of a failure caused by an invalid connection string.

There are other testing tools coming to market for .NET, but today NUnit has the largest support base, and is both free and open source, making it something you may want to try first.

Related Tools

NUnit Visual Studio .NET Addin

This addin, which requires NUnit, allows you to run your tests without leaving the Visual Studio .NET IDE. Simply right-click on a project or solution in the Solution Explorer to run all tests within that project or solution. The results are displayed in the Output window. Unfortunately, there are no pretty green or red bars, but if having one less program open is important to you, this can be a useful tool.

Aa479010.aspnet-testwithnunit-03(en-us,MSDN.10).gif

Figure 3. Run tests in Visual Studio .NET with a simple right-click.

Aa479010.aspnet-testwithnunit-04(en-us,MSDN.10).gif

Figure 4. Output from NUnit tests run within Visual Studio .NET

NUnitASP

NUnitASP allows TDD to be extended to the user interface in ASP.NET, by providing a means of testing Web controls. Its usage is beyond the scope of this article, but you may learn more about it from the NUnitASP Web site.

A Simple Application

To demonstrate TDD, I've used it to help me redevelop a multi-tier sample application for ASP.NET. The application demonstrates how to register a user for an application, how to grant them access to secure web pages, and how to allow them to sign in and sign out. The data access layer for this application is concerned with adding users to the database, retrieving user information, and verifying that user logins are correct. I’ve used this sample for a couple of years now and built it with TDD several times, learning new things with each iteration.

Windows Workflow Foundation?

What is Windows Workflow Foundation?

WWF is a programming model for building workflow-enabled applications on windows. System. Workflow namespace has all the necessary modules to develop any type of workflow.

What is a Workflow?

A Workflow is a set of activities, which is stored as model and they depict a process. Below figure depicts clearly the difference between Workflow and Activity. Every task is an activity and group of activity depicts a complete workflow. Workflow is run by the Workflow runtime engine.

What are different types of Workflow in Windows Workflow foundation?

There are two basics type of workflow Sequential Workflow and State machines workflow.
A sequential workflow has clear start and finish boundaries. Workflow controls execution in Sequential workflow. In sequential execution, one task is executed after other. Sequential workflow is more rigid in format and execution path has a deterministic nature.

A State machine workflow is more dynamic in nature. Workflow has states and the state waits for events to help it move to next state. In State machine execution path is undeterministic nature.
Below figure shows visual conceptualization of fundamentals. You can see in Sequential workflow the execution path is very determent. Shiv performs the entire task sequentially and these tasks are very determent. Now have a look at the second workflow. Every state goes to other state when it receives some external events. For instance when Shiv is seeing star trek there is an event of flashing news which triggers him to see the flashing new.