Wednesday, May 19, 2010

Agile Methodology

Agile Methodology – An Overview

Gartner defines Agility as "the ability of an organization to sense environmental change and respond efficiently and effectively to that change." Sensing the need for change also includes the proactive initiation of change.

Rapidity of business change is driving a need for agility to respond more effectively to change.Organizations needed to make development process changes should strongly consider using Agile rapid applications development methodologies as part of moving to service-oriented development of applications.

Any enterprise that aspires to respond in real time must have the ability to be agile when needed. Agile is successful because it:
Stresses customer satisfaction
Emphasizes team work (simple, yet effective way to enable groupware style development)
Allows agile programmers communicate with their customers and fellow programmers quite regularly and empowers them to confidently respond to changing customer requirements, even late in the life cycle
Why Agile
Traditionally, software development has been process-centric.
Agile methodologies change the face of software development by giving it a human touch (people over processes).
Customers value ROI and time-to-market.
Agile methodologies help in increasing ROI as well as reduce time-to-market. (incremental working software)
Customers see quality, productivity and turn-around time as a risk when it comes to off-shore software development.
Agile methodologies build trust and confidence as the customer is part of the team and the techniques used reduce the offshore risks. (customer collaboration and embracing change)
Development Firm
Critical Success Factors
Use Continuous Integration to Avoid Integration Headaches
Have Each Site Send Ambassadors to the Other Sites
Use Contact Visits to build trust
Don't Underestimate the Culture Change
Use wikis to contain common information
Use Test Scripts to Help Understand the Requirements
Use Regular Builds to Get Feedback on Functionality
Use Regular Short Status Meetings
Use Short Iterations
Use an Iteration Planning Meeting that's Tailored for Remote Sites
When Moving a Code Base, Bug Fixing Makes a Good Start
Separate teams by functionality not activity
Expect to need more documents.
Get multiple communication modes working early.

Client : A leading supplier of media and technology solutions to connect Health care professionals to customers

Salient Features
The Core / Remote Team Model
Phased Requirements
Project Transitioning
Multiple Technical Approach
Agile Source Control
Agile Testing
Daily & Weekly Meetings
Change Request Management



Agile Requirements & Implementation
1. Planning requires user/programmer cooperation in defining feature benefits and costs. - The Core Team Model, The Remote Team Model.
2. Small releases put out a simple system early and update it often. - Phased Requirements.
3. Simple design value comes from the simplest program that meets requirements. - Multiple Technical approch.
4. Re-factoring has Agile teams correct system design defects and recode as necessary - Multiple approch & Agile source control.
5. Testing has programmers write tests first, and then create software to fulfill test requirements. - Agile Testing
6. On-site customers set priorities, answer programmers' questions and cut documentation costs. - Daily & weekly status meeting.
7. Pair programming has programmers write all production code in pairs, sharing a single machine. - Agile source control
8. Collective ownership implies shared responsibility for code function and quality. - Daily & Weekly Meetings,
Project Transitions, Change Request
Management, The Core Team Model, The Remote Team Model.

Monday, April 19, 2010

Get the Row Count

Get the Row Count using procedure, insted of select count (*) table Name

USE [DBName]
GO
/****** Object: StoredProcedure [dbo].[Sp_RowCount] Script Date: 04/19/2010 17:40:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Proc [dbo].[Sp_RowCount]( @Tname as varchar(100)) As
Declare @SQL Varchar(500)
Set @SQL='Select Object_Name(Id) As [Table Name], Rows From sysindexes Where indid < 2 And Id=' + Str(Object_Id(@Tname)) // the case if u want only count u remove the first colum of (table name).
Exec (@SQL)

Sunday, February 28, 2010

Design Patterns

Design patterns are recurring solutions to software design problems you find again and again in real-world application development. Patterns are about design

and interaction of objects, as well as providing a communication platform.
Design patterns categorized as Creational,Structural,Behavioral.

Creational pattern
Abstract Factory --->Creates an instance of several families of classes
(Provide an interface for creating families of related or dependent objects without specifying their concrete classes.)


Builder --->Separates object construction from its representation
(Separate the construction of a complex object from its representation so that the same construction process can create different representations..)
/>

Factory Method--->Creates an instance of several derived classes
(Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses)


Prototype--->A fully initialized instance to be copied or cloned.
(Specify the kind of objects to create using a prototypical instance, and create new objects by copying this prototype.)
/>

Singleton--->A class of which only a single instance can exist.
(Ensure a class has only one instance and provide a global point of access to it.)
/>

Structural pattern
Adapter--->Match interfaces of different classes
(Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible
interfaces.)


Bridge--->Separates an object’s interface from its implementation
(Decouple an abstraction from its implementation so that the two can vary independently.)


Composite--->A tree structure of simple and composite objects
(Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

)
/>

Decorator--->Add responsibilities to objects dynamically
(Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.)
/>

Facade--->A single class that represents an entire subsystem
(Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higher-level interface that makes the subsystem easier to use.)


Flyweight---> A fine-grained instance used for efficient sharing
(Use sharing to support large numbers of fine-grained objects efficiently.)
/>

Proxy--->An object representing another object
(Provide a surrogate or placeholder for another object to control access to it.)
/>


Behavioral pattern
Chain of Resp--->A way of passing a request between a chain of objects
(Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the

request along the chain until an object handles it.)
/>

Command--->Encapsulate a command request as an object
(Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations. )
/>

Interpreter--->A way to include language elements in a program
(Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.)
/>

Iterator --->Sequentially access the elements of a collection
(Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.)


Mediator--->Defines simplified communication between classes
(Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly,

and it lets you vary their interaction independently.)


Memento--->Capture and restore an object's internal state
(Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later.)


Observer--->A way of notifying change to a number of classes
(Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.)


State--->Alter an object's behavior when its state changes
(Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.)


Strategy---> Encapsulates an algorithm inside a class
(Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.)


Template Method--->Defer the exact steps of an algorithm to a subclasse.
(Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an

algorithm without changing the algorithm's structure.)


Visitor--->Defines a new operation to a class without change
(Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the
elements on which it operates.)

Sunday, January 31, 2010

Testing Methodology

Wednesday, January 20, 2010

MVC & 3 Tire Architecture

Model View Controller (MVC)
Introduction:


Design patterns are very useful to solve complex design problems if used properly. This article explains the basic concept of the Model View Controller (MVC) Design pattern and also shows how closely.

Prerequisites

Object Oriented-programming concepts, .NET Framework, ADO.NET, C#, XSD.

Definition/Description: Model View Controller (MVC)

View renders the data from the Model in response to the request made to the model by controlled events made by user interaction.

Model View Controller is a design approach to separate the application object model from GUI, originally invented around 80s. Then later on it has become a widely accepted common design pattern. The main objective behind this pattern is to decouple the view of the data (presentation layer) from the actual data processing so that the same model can be used for various views. This is achieved by using three different types of objects that interact with each other in loosely coupled manner with their discreet set of tasks.

These three objects are known as Model, View and Controller. We will learn for each of them here.



VIEW:

View is the graphical data presentation (outputting) irrespective of the real data processing. View is the responsible for look and feel, some custom formatting, sorting etc. View is completely isolated from actual complex data operations. For example, Online product catalog view is completely separated from database connection, query, tables etc. It simply gets final row-data from the model and puts some cosmetics and formatting before displaying it in browser. View provides interface to interact with the system. The beauty of MVC approach is that it supports any kind of view, which is challenging in todays distributed and multi-platform environment.

A MVC model can have multiple views, which are controlled by controller. View interface can be of WEB-FORMS, HTML, XML/XSLT, XTML, and WML or can be Windows forms etc.

MODEL:

Model is responsible for actual data processing, like database connection, querying database, implementing business rules etc. It feeds data to the view without worrying about the actual formatting and look and feel. Data provided by Model is display-neutral so it can be interfaced with as many views without code redundancy; this eases your code maintenance and reduces bugs and allows code -reuse at good extent. Model responds to the request made by controllers and notifies the registered views to update their display with new data.

CONTROLLER:

Controller is responsible for Notice of action. Controller responds to the mouse or keyboard input to command model and view to change. Controllers are associated with views. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display.

Benefits:

Following are the few of the benefits of MVC design pattern.

Since MVC handles the multiple views using the same enterprise model it is easier to maintain, test and upgrade the multiple system.

It will be easier to add new clients just by adding their views and controllers.

Since the Model is completely decoupled from view it allows lot of flexibilities to design and implement the model considering reusability and modularity. This model also can be extended for further distributed application.

It is possible to have development process in parallel for model, view and controller.

This makes the application extensible and scalable.

Drawbacks:

Requires high skilled experienced professionals who can identify the requirements in depth at the front before actual design.

It requires the significant amount of time to analyze and design.

This design approach is not suitable for smaller applications. It Overkills the small applications.

.NET and MVC:

Lets try to find out how closely ASP.NET allows architecting application to meet MVC concept.

Model: Dataset/Business Entities, DataAccess components
View: .ASPX pages

Controller: Code-behind .vb/.cs files

Typed dataset is one of the greatest features in .NET, which holds the application data in memory and represents the application business entity model, which bridges the UI components with Service Interface and Data Access layer.

So, service interface and Data Access components populate these typed Datasets. Now, these filled datasets can be bound to any view in UI layer.

.ASPX and ASCX pages server as view and mean to interface with application, while the code behind classes for these files server as the controller functions.

ASP.NET doesnt have central controller function, instead the code-behind file can directly make request to the Model and can update the dataset. But lot of controller function can be implemented in code behind class events in .aspx or .ascx pages, like Page_Onload(), OnItem_Created() etcevents.

.NET Framework has all Object-oriented features like code reuse, encapsulation etcSo, proper design of your model can make your user interface and view completely separated from model which can server multiple views.

Reference

Copyright © 2009 Angel