agile dev. ii

42
© People Strategists www.peoplestrategists.com Slide 1 of 42 Agile Development and Design Patterns - I

Upload: people-strategists

Post on 17-Aug-2015

304 views

Category:

Technology


0 download

TRANSCRIPT

© People Strategists www.peoplestrategists.com Slide 1 of 42

Agile Development

and Design Patterns - I

© People Strategists www.peoplestrategists.com Slide 2 of 42

Objectives

In this session, you will learn to:

Identify SDLC

Identify agile model

Identify design patterns

© People Strategists www.peoplestrategists.com Slide 3 of 42

Identify SDLC

What is SDLC?

© People Strategists www.peoplestrategists.com Slide 4 of 42

Identifying SDLC (Contd.)

SDLC is the acronym of Software Development Life Cycle.

It is also called as software development process.

It is a term used in information systems and software engineering to describe a process for planning, creating, testing, and deploying an information system.

It is a framework defining tasks performed at each step in the software development process.

The SDLC aims to produce a high quality software that meets or exceeds customer expectations, reaches completion within times and cost estimates.

SDLC defines a methodology for improving the quality of software and the overall development process.

© People Strategists www.peoplestrategists.com Slide 5 of 42

Identifying SDLC (Contd.)

The following figure depicts graphical representation of the various stages of SDLC.

SDLC

Planning

Defining

Designing

Building

Testing

Deployment

© People Strategists www.peoplestrategists.com Slide 6 of 42

Identifying SDLC (Contd.)

A typical SDLC consists of the following stages:

1. Planning and Requirement Analysis:

It is the most important and fundamental stage in SDLC, which is performed by

the senior members of the team.

Planning for the quality assurance requirements and identification of the risks

associated with the project is also done in the planning stage.

2. Defining:

After the requirement analysis is finalized, the next step is to define and

document the product requirements in Software Requirement Specification

(SRS) document.

3. Designing:

Based on the requirements specified in SRS, usually more than one design

approach for the product architecture is proposed and documented in a

DDS - Design Document Specification.

4. Building:

At this stage of SDLC the actual development of product starts and finish. The

programming code is generated as per DDS during this stage.

© People Strategists www.peoplestrategists.com Slide 7 of 42

Identifying SDLC (Contd.)

5. Testing:

At this stage, product's defects are reported, tracked, fixed, and retested, until

the product reaches the quality standards defined in the SRS.

6. Deployment:

Once the product is tested and ready to be deployed it is released formally in

the appropriate market.

After that, based on the feedback, the product may be released as it is or with

suggested enhancements in the targeting market segment

© People Strategists www.peoplestrategists.com Slide 8 of 42

Identifying Different SDLC Models

The most important and popular SDLC models followed in the industry are:

Waterfall Model:

The waterfall model was first process model to be introduced.

It is also referred to as a linear-sequential life cycle model.

In a waterfall model, each phase must be completed before the next

phase can begin and there is no overlapping in the phases.

Iterative Model:

It starts with a simple implementation of a subset of the software

requirements and iteratively enhances the evolving versions until the full

system is implemented.

In this model, at each iteration, design modifications are made and new

functional capabilities are added.

V-Model:

It is an extension of the waterfall model and is based on association of a

testing phase for each corresponding development stage.

This is a highly disciplined model and next phase starts only after

completion of the previous phase.

© People Strategists www.peoplestrategists.com Slide 9 of 42

Identifying Different SDLC Models (Contd.)

RAD Model:

Rapid application development (RAD) is a software development

approach that uses least planning in favor of rapid prototyping.

A prototype is a working model that is functionally equivalent to a

component of the product.

In this model the functional modules are developed in parallel as

prototypes and are integrated to make the complete product for faster

product delivery.

Big Bang Model:

This model comprises of focusing all the possible resources in software

development and coding, with very little or no planning.

This model is ideal for small projects with one or two developers working

together

© People Strategists www.peoplestrategists.com Slide 10 of 42

Identifying Agile Development

Agile is an approach that promotes continuous iteration of development and testing throughout the software development life cycle of the project.

It is an alternative to traditional project management, typically used in software development.

It is a combination of iterative and incremental process models with focus on process adaptability and customer satisfaction.

In agile the tasks are divided to small time frames to deliver specific features for a release.

Agile methods break the product into small incremental builds. These builds are provided in iterations.

Each build is incremental in terms of features; the final build holds all the features required by the customer.

© People Strategists www.peoplestrategists.com Slide 11 of 42

Identifying Agile Development (Contd.)

The following figure graphically illustrate the agile model.

© People Strategists www.peoplestrategists.com Slide 12 of 42

Principles of Agile Development

The agile development is based on the following principles:

1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

2. Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage.

3. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale.

4. Business people and developers must work together daily throughout the project.

5. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.

6. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation.

7. Working software is the primary measure of progress.

© People Strategists www.peoplestrategists.com Slide 13 of 42

Principles of Agile Development (Contd.)

8. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.

9. Continuous attention to technical excellence and good design enhances agility.

10. Simplicity – the art of maximizing the amount of work not done – is essential.

11. The best architectures, requirements, and designs emerge fromself–organizing teams.

12. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.

© People Strategists www.peoplestrategists.com Slide 14 of 42

Agile vs Waterfall Method

The following figure depicts the differences between the agile and waterfall models.

Agile Waterfall

Agile method proposes incremental and iterative approach to software design.

Documentation attends less priority than software development.

The agile process is broken into individual models that designers work on.

The customer has early and frequent opportunities to look at the product and make decision and changes to the project.

Agile model is considered unstructured compared to the waterfall model.

Development of the software flows sequentially from start point to end point.

Documentation is a top priority and can even use for training staff and upgrade the software with another team.

The design process is not broken into an individual models.

The customer can only see the product at the end of the project.

Waterfall model are more secure because they are so plan oriented.

© People Strategists www.peoplestrategists.com Slide 15 of 42

Agile vs Waterfall Method (Contd.)

The following figure depicts the successful rate of the agile model over the waterfall model.

© People Strategists www.peoplestrategists.com Slide 16 of 42

Advantages of Agile Development

Agile development has the following advantages:

Customer satisfaction by rapid, continuous delivery of useful software.

People and interactions are emphasized rather than process and tools.

Customers, developers and testers constantly interact with each other.

Working software is delivered frequently (weeks rather than months).

Face-to-face conversation is the best form of communication.

Close, daily cooperation between business people and developers.

Continuous attention to technical excellence and good design.

Regular adaptation to changing circumstances.

Even late changes in requirements are welcomed.

© People Strategists www.peoplestrategists.com Slide 17 of 42

Limitations of the Agile Development

Agile development has the following limitations.

In case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the software development life cycle.

There is lack of emphasis on necessary designing and documentation.

The project can easily get taken off track if the customer representative is not clear what final outcome that they want.

Only senior programmers are capable of taking the kind of decisions required during the development process. Therefore, it has no place for newbie programmers, unless combined with experienced resources.

© People Strategists www.peoplestrategists.com Slide 18 of 42

Exploring the Agile Model

When to use Agile model?

© People Strategists www.peoplestrategists.com Slide 19 of 42

Exploring the Agile Model (Contd.)

© People Strategists www.peoplestrategists.com Slide 20 of 42

Exploring Agile Methodologies

The following figure depicts the various methodologies of the agile model.

© People Strategists www.peoplestrategists.com Slide 21 of 42

Scrum is one of the most important method used in agile development because of its very simplicity and flexibility.

Scrum believes in empowering the development team and believes in working in small teams.

It comprises of three roles and their responsibilities, which are displayed in the following figure.

Scrum

Scrum meetingScrum master

Product owner

Prepare product backlogs

Team organize tasks

© People Strategists www.peoplestrategists.com Slide 22 of 42

Scrum master:

Is responsible for setting up the team, sprint meeting and removes hurdles to

progress.

Product owner:

Creates product backlog, prioritizes the backlog and is responsible for the

delivery of the functionality at each iteration.

Scrum team:

Manages its own work and organizes the work to complete the sprint or cycle.

Product Backlog:

Is a repository where requirements are tracked with details on the No. of

requirements to be completed for each release.

It is maintained and prioritized by scrum master and distribute it to the

scrum team.

Scrum (Contd.)

© People Strategists www.peoplestrategists.com Slide 23 of 42

eXtreme Programming (XP):

This technique is mostly used when demands or requirements of the customers constantly changed.

It advocates frequent "releases" of the product in short development cycles, which integrally improves the productivity of the system and also introduces a checkpoint where any customer requirements can be easily implemented.

The XP develops software keeping customer in the target.

eXtreme Programming (XP)

© People Strategists www.peoplestrategists.com Slide 24 of 42

Dynamic Software Development Method (DSDM)

DSDM:

Is a Rapid Application Development (RAD) methodology used in software development and provides an agile project delivery framework.

the important aspect of DSDM is that the users are required to be involved actively, and the teams are given the power to make decisions.

Products whose delivery change frequently use this technique.

The techniques used in DSDM are:

Time boxing

MoSCoW rules

Prototyping

© People Strategists www.peoplestrategists.com Slide 25 of 42

Introducing Design Pattern

How to resolve the problems that

commonly occurs in software design?

© People Strategists www.peoplestrategists.com Slide 26 of 42

Introducing Design Pattern (Contd.)

Design pattern:

Is a language-independent tactics used to solve common object-oriented design problems.

Is used to speed up the development process by providing tested, verified development paradigms.

Provides general solutions, which are documented in a format that doesn't require specifics tied to a particular problem.

Allows developers to communicate using well-known, well understood names for software interactions.

Resides in the domain of modules and interconnections.

Is not a finished design that transformed directly into code. In fact, it is a description or template that is used resolve problems, which can be used in many different situations.

© People Strategists www.peoplestrategists.com Slide 27 of 42

What is Gang of Four (GOF)?

Authors of the book named Design Patterns, are often referred to as the

GOF, or Gang of Four.

The Design Patterns book was published by four authors Erich Gamma,

Richard Helm, Ralph Johnson and John Vlissides, in 1994.

The Design Patterns book describes various development techniques

and pitfalls

According to GOF design patterns are primarily based on the following

principles of object orientated design.

Program to an interface not an implementation

Favor object composition over inheritance

© People Strategists www.peoplestrategists.com Slide 28 of 42

Usage of Design Pattern

In software development, two main usages of design patterns are:

Common platform for developers

Design patterns provide a standard terminology and are specific to

particular scenario.

For example, a singleton design pattern signifies use of single object so

all developers familiar with single design pattern will make use of single

object and they can tell each other that program is following a singleton

pattern.

Best Practices

Design patterns have been evolved over a long period of time and they

provide best solutions to certain problems faced during software

development.

Learning these patterns helps unexperienced developers to learn

software design in an easy and faster way.

© People Strategists www.peoplestrategists.com Slide 29 of 42

Exploring Design Patterns

Design patterns are further classified into following categories:

Creational patterns

Structural patterns

Behavioral patterns

J2EE patterns

© People Strategists www.peoplestrategists.com Slide 30 of 42

Creational Patterns

Creational Patterns:

Provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new operator.

Are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.

Provide ways to instantiate single objects or groups of related objects.

Different types of creational patterns are:

Abstract Factory:

Is used to control class instantiation.

is used to provide a client with a set of related or dependent objects.

The "family" of objects created by the factory is determined at run-time

according to the selection of concrete factory class.

Provides one level of interface higher than the factory pattern. It is used to

return one of several factories.

© People Strategists www.peoplestrategists.com Slide 31 of 42

In the given figure, abstract factory pattern with two Kinds of products created by

two concrete factories.

Implementation for the abstract factory pattern is given in the embedded code.

Creational Patterns (Contd.)

Client

AbstractProductA AbstractProductB

AbstractFactory

+createProductA():AbstractProductA+createProductB():AbstractProductB

ProductA1 ProductA2 ProductB2ProductB1

ConcreateFactory2

+createProductA():AbstractProductA+createProductB():AbstractProductB

ConcreteFactory1

+createProductA():AbstractProductA+createProductB():AbstractProductB

© People Strategists www.peoplestrategists.com Slide 32 of 42

Creational Patterns (Contd.)

Singleton:

Ensures that only one object of a particular class is ever created. All further

references to objects of the singleton class refer to the same underlying

instance.

Are extensible by the subclass by defining subclass final.

Make a method or a variable public or/and static.

Is useful when a single, global point of access to a limited resource is required.

The following figure depicts the implementation of the singleton pattern:

Implementation for the Prototype is given in the embedded code.

Singleton

-Singleton():+getInstance(): Singleton

-instance: Singleton

© People Strategists www.peoplestrategists.com Slide 33 of 42

Creational Patterns (Contd.)

Builder:

Is used to create complex objects from simple objects step by step.

It uses the Factory Builder pattern to decide which concrete class to initiate in

order to build the desired type of object.

It is used to isolate code for construction and representation.

It gives you finer control over the construction process.

© People Strategists www.peoplestrategists.com Slide 34 of 42

The following figure depicts the implementation of the builder pattern:

Creational Patterns (Contd.)

Director

+construct(builder: Builder): void

ConcreateBuilder

+buildPart(): void+getResult():Product

Builder

+buildPart(): void

ProductFor all objects in structure: builder.buildPart()

© People Strategists www.peoplestrategists.com Slide 35 of 42

Creational Patterns (Contd.)

The participants classes in this pattern are:

Builder: class specifies an abstract interface for creating parts of a product

object.

ConcreteBuilder: constructs and puts together parts of the product by

implementing the Builder interface. It defines and keeps track of the

representation it .

Director: class constructs the complex object using the Builder interface.

Product: represents the complex object that is being built.

Implementation for the Builder pattern is given in the embedded code.

© People Strategists www.peoplestrategists.com Slide 36 of 42

Creational Patterns (Contd.)

Prototype:

Instantiate a new object by copying all of the properties of an existing object,

creating an independent clone.

Is useful when the construction of a brand new object, using the new

operator, is inefficient.

Is used when there are many subclasses that differ only in the kind of objects,

Is used when a system needs independent of how its objects are created,

composed, and represented.

It helps in dynamic binding or loading a method and add and remove objects

at runtime.

It use one instance to finish job just by changing its state or parameters.

Ensures that only one instance of a class is created.

Provides a global point of access to the object

© People Strategists www.peoplestrategists.com Slide 37 of 42

The following figure depicts the implementation of the prototype pattern:

Creational Patterns (Contd.)

Prototype

+Clone(): Object

ConcreatePrototype1

+Clone(): Object

ConcreatePrototype2

+Clone(): Object

Client

+Operation:void

//Only the first object is created:ConcretePrototype obj1 = new ConcretePrototype();ConcretePrototype obj2 = new ConcretePrototype();

© People Strategists www.peoplestrategists.com Slide 38 of 42

The classes participating to the prototype pattern are:

Client: creates a new object by asking a prototype to clone itself.

Prototype: declares an interface for cloning itself.

ConcretePrototype: implements the operation for cloning itself.

Implementation for the prototype is given in the embedded code.

Creational Patterns (Contd.)

© People Strategists www.peoplestrategists.com Slide 39 of 42

Summary

SDLC is the acronym of Software Development Life Cycle.

SDLC is a term used in information systems and software engineering to

describe a process for planning, creating, testing, and deploying an

information system.

SDLC defines a methodology for improving the quality of software and

the overall development process.

A typical SDLC consists of the following stages:

Planning and Requirement Analysis

Defining

Designing

Building

Testing

Deployment

© People Strategists www.peoplestrategists.com Slide 40 of 42

Summary (Contd.)

The most important and popular SDLC models followed in the industry

are:

Waterfall Model

Iterative Model

V-Model

RAD Model

Big Bang Model

Agile Model

Agile is an approach that promotes continuous iteration of development

and testing throughout the software development life cycle of the

project.

In agile the tasks are divided to small time frames to deliver specific

features for a release.

© People Strategists www.peoplestrategists.com Slide 41 of 42

Summary (Contd.)

Agile methods break the product into small incremental builds. These

builds are provided in iterations.

Scrum is one of the most important method used in agile development

because of its very simplicity and flexibility.

eXtreme Programming (XP) technique is mostly used when demands or

requirements of the customers constantly changed.

Is a Rapid Application Development (RAD) methodology used in

software development and provides an agile project delivery

framework.

Design pattern is a language-independent tactics used to solve common

object-oriented design problems.

Design pattern provides general solutions, which are documented in a

format that doesn't require specifics tied to a particular problem.

© People Strategists www.peoplestrategists.com Slide 42 of 42

Summary (Contd.)

Design pattern allows developers to communicate using well-known,

well understood names for software interactions.

Creational patterns provide a way to create objects while hiding the

creation logic, rather than instantiating objects directly using new

operator.

Abstract factory is used to provide a client with a set of related or

dependent objects.

Singleton ensures that only one object of a particular class is ever

created. All further references to objects of the singleton class refer to

the same underlying instance.

Builder pattern is used to create complex objects from simple objects

step by step.

Prototype pattern instantiate a new object by copying all of the

properties of an existing object, creating an independent clone.