Sunday, August 25, 2019

Agile Software Development and Methods

 Introduction:

In English, "agile" means " the ability to move quickly and easily".

  • Agile is a way to manage projects.
  • Agile breaks down larger projects into small, manageable chunks called iterations.at the end of each iteration something of value is produced.

Agile : What and How to work


Agile Software Development:  is a set of principles for software development in which requirements and solutions evolve through collaboration between self-organizing, cross-functional teams.

  • It refers to the software process models that are people focused , communication oriented , flexible, speedy, rapid and iterative development of the product in small release.
  • Agile software development is a conceptual framework for software engineering that promotes development iterations throughout the life-cycle of the project.
  • Software developed during one unit of time is referred to as an iteration, which may last from one to four weeks.
  • Agile methods also emphasize working software as the primary measure of progress.
Characteristics of Agile Software Development


  • Light Weighted methodology
  • Small to medium sized teams
  • vague and/or changing requirements
  • vague and/or changing techniques
  • Simple design
  • Minimal system into production

Agile Methods:


  • methods to overcome perceived and actual weakness in conventional software engineering.
  • to accommodate changes in environment, requirement and use cases.
  • is an approach to project management in software development.
Agile Process:
  • Focus on Team Structures, Team Communication, Rapid Delivery of software and de-emphasis on importance of intermediate product.

Agile Manifesto

All agile methods adhere to a set of rules described as Agile Manifesto which are well-defined guidelines for the agile methods.


The above-defined agile manifesto can be elaborated as:
  1. Individuals and interactions: In agile development, self organization and motivation are important, as are interactions like co-location and paring programming.
  2. Working Software:  Working software is more useful and important than just presenting documents to clients in meetings.
  3. Customer collaboration: Requirements cannot be fully identified at the beginning of the software development cycle, therefore, continuous customer or stakeholder involvement is very important.
  4. Responding to change: Agile methods are focused on quick responses to change and continuous development.

Some popular and commonly-used agile methods and frameworks  include:
  • Pair Programming
  • Scrum
  • Adaptive Software Development (ASD)
  • Dynamic Systems Development Method (DSDM)
  • Crystal
  • Feature Driven Development (FDD)
  • Agile Modelling (AM)
  • Extreme Programming (XP)

PAIR PROGRAMMING


Pair programming is an agile practice. It is a practice of software development wherein two programmers work in pairs to develop the software while siting at the same workstations. One programmer thinks and other codes. And both swapping their roles.
The keyboard owner is called the driver and responsible for coding where the other partner is called navigator keeps track of larger issues.
  • In pair programming, the driver focuses on the code at hand, the syntax, semantics and algorithm.
  • The navigator focuses less on that and more on the level of abstraction and quality of overall design.
Advantage :

  • Collective code ownership
  • Better Code
  • Increased discipline
  • Resilient Flow (flexible)
  • Improved morale (confidence)
  • Mentoring
  • Team Cohesion (unity)

Disadvantage: 


  • Difficult skill sets may kill the project
  • Disagreement may occur
  • Scheduling conflict between partners
  • Absence of Partners
  • Rushing

SCRUM


Scrum is an agile development method which concentrates on how to manage tasks within a team-based project. it is a framework that helps teams work together. 

Process flow of Scrum :

  • Each iteration of a scrum is known as as Sprint.
  • Sprints are periods of time when software development is actually done.
  • A sprint usually lasts from one week to one month to complete an item from the product backlog. 
  • Each sprint ends with a sprint review.
  • Team delivers product functionality at the end of he sprint.
  • Sprint continue until the project deadline or the project budget is spent.
Scrum Team

The scrum team size is 6 +/- 3  i.e. from 3 to 9 members which does not include the Scrum master and the Product Owner.  

There are three members in a basic Scrum Team:

  1. Scrum Master
    • is the person who is responsible for facilitating the development team and the Product owner to work on the day to day development activities.
  2. Product owner:
    •  is the customer or stakeholder who is responsible for bringing the gap between the development  team and the stakeholder.
  3. The Development Team
    • is comprised of developers or experts who are responsible to complete the sprint or cycle.
Scrum Events 



Scrum Process Framework can be viewed by means of a sequence of events. These are time-boxed events. This means that in a project, every Scrum event has a predefined maximum duration.

Scrum Framework

The scrum framework has three components: RolesEvents and Artifacts.

Roles

Product Owner

  • Defines features and release plans
  • Prioritize features every iteration as needed
  • Accept or reject work results

Scrum Master

  • Responsible for enacting Scrum values and practices
  • Ensure that the team is fully functional and productive
  • Enable close cooperation across all roles and functions

Team

  • Cross-functional:Programmers, testers, user experience designers, etc.
  • Members should be full-time
  • Teams are self-organizing
  • Sprint Events

    Daily scrum meeting

    • Daily review meeting for 10-15 mins
    • Status review and not for problem solving
    • All sprint team members participate
    • More on daily scrum meeting

    Sprint review

    • Demo of new features to customer/product owner
    • Team presents work accomplished during the sprint
    • All major stakeholders participate

    Sprint retrospective

    • Periodic post-mortem to review what’s working and what’s not
    • Done after every sprint
    • All major stakeholders participate

    Artifacts

    Product backlog

    • A list of all desired work on the project
    • Ideally expressed such that each item has value to the users or customers of the product
    • Prioritized by the product owner
    • Reprioritized at the start of each sprint

    Sprint Backlog

    • A list of tasks identified by the Scrum team to be completed during the sprint.
    • The team selects the items and size of the sprint backlog

     Version Control System
Version Control System (VCS) is a kind of database or software tool that helps a software team manage to source code over time. it keeps track of every modification to the code in a special kind of database. 

Features of VCS:
  • it maintains separate track record for each team member of the project.
  • easy to compare and merge codes of different branches.
  • easy to trace changes in the code to find the version that introduced a bug.
  • simple to compare versions to resolve conflicts in the code during merging.
  • reverts changes made to the code to any state from its history.
Benefits of using VCS:
  • Collaboration.
  • Proper storing of versions
  • Restoring previous versions
  • Understanding events
  • Easy backup


Types of Version Control System:
  1. Centralized Version Control System 
  2. Distributed Version Control System

GIT- A DISTRIBUTED VERSION CONTROL SYSTEM


GIT (Global Information Tracker) is the most popular DVCS and founded by Linus Torvald in 2005. Nowadays, it is used by many popular open source sotwares like Android, Eclipse developer teams and many commercial projects. Basically, it was written in the programming language C but later on GIT has been reimplemented in other languages - Java, Ruby and Python.

Advantage :
  • Performance : GIT has good performance among other VCS.
  • Security: It secures our codes well with cryptographic method SHA-1
  • Branching Model: GIT has multiple local branches which are independent of each other. it use context switching ( switching back and forth to new commit code)
  • Staging Area: GIT has an intermediate stage called"index" or "staging area" where commits can be formatted and modified before being completed.
  • Distributed: means the repository or the complete code base is mirrored onto the developer's system so that he only can work on it.
  • Open Source: GIT is an open source, available for the whole world developers.


Disadvantage :


  • GIT is less preferred for handling extremely large files.
  • GIT does not support 'commits' across multiple branches or tags.
GIT can be downloaded from https://gitforwindows.org/ 




BUSINESS USE-CASE DIAGRAM

INTRODUCTION: Business Use-Case Diagram describes how the business is being used by its customers. it is an important part of UML (Unified Modelling Language) that provides for drawing use-case diagrams. Use-cases are used during the analysis phase of a project to identify and partition system functionality. They separate the system into Actors and use-cases. 


Actor:- an actor is a user or outside system which interacts with the system being designed in order to obtain some result from that interaction. Ex- Person, Machine, Information System
USE-CASE :-  are structured outline or template for the description of user requirements modelled in a structured language like English. Use-case means how a business system interacts with its environment.

Categories of Business Use-cases: 

Based on the activities in a business, there are 03 categories of business use-cases:-
  1. Business Process: includes activities which are commercially important.
  2. Business Work:  includes activities which are not commercially important but to be performed anyhow to run the business like security, administration, cleaning etc.
  3. Management Work:  defines the type of work that affects business use-cases management.
Characteristics of a Good Business Use-Case Model: 

  • it must perform all the activities within the business.
  • it must conform (equal) to the business for which these are designed.
  • every activity must be related to at least one use-case.
  • it should have balance between the number of use-cases and the size of the use-cases:-
    • Less use-cases make the model easier to understand whereas more use-cases may make the model difficult to understand.
    • Large use-case may be complex and difficult to understand.
  • each use-case must be unique.
  • it should be give a good comprehensive picture of the organization.

What is a USE-CASE DIAGRAM actually?

UCD:- show what a system does from the view of an external observer. The main focus is on what a system does rather than how it does it. It is a formal way of representing how a business system interacts with its environment by illustrating the activities that are performed by the users of the system.

Elements/ component in Use-Case Diagrams:

There are 03 basic elements in use-case diagrams are:
  • Actor: An actor represents a role that an outsider takes on while interacting with the business system.
  • Association/Relationship: it is the relationship between an actor and a business use-case association.  it is shown by "straight bold line".
  • Business Use Case: It describes the interaction between an actor and a business system.  it is shown  by "oval shape".
  • Subject: it describes a business system that has one or more business use-cases attached to it. it is shown by "rectangle shape".
  • Other symbols that are usually used with use-ase diagrams are:
    • Connector- Interaction  (shown by straight line)
    • Generalization- further parts of connector (Shown by Straight arrow)
    • Steretype- relationship ( Shown by dashed straight arrow)
    • <<include>> it is an implicit function to use any use-case/capability.
    • <<extend>> it is an explicit function and is optional . This signifies that we may or may not use a capability.
Note :  
  • Actors appear outside the rectangle.
  • Rectangle describes the use-cases functionality.
  • Relationship/Association is a solid line between actor and use-cases.

An example of a use-case diagram


In the above use case diagram, there are two actors named student and a teacher. There are a total of five use cases that represent the specific functionality of a student management system. Each actor interacts with a particular use case. A student actor can check attendance, timetable as well as test marks on the application or a system. This actor can perform only these interactions with the system even though other use cases are remaining in the system.
It is not necessary that each actor should interact with all the use cases, but it can happen.
The second actor named teacher can interact with all the functionalities or use cases of the system. This actor can also update the attendance of a student and marks of the student. These interactions of both student and a teacher actor together sums up the entire student management application.




Use-case diagram as case study

A use case diagram is a representation of a user's interaction with the system where relationship is shown between the user and the different use cases in which the user is involved.

How to build a Use Case Diagram?

Following are the steps to draw use case diagram.
•Identify the Actors of the system.
•Identify all roles played by the users relevant to the system.
•Identify the users/task required to achieve the goals.
•Create use cases for every goal.
•Structure the use cases.
•Prioritize/review/estimate/validate the users.











There are many online website for use case design 

  • Creately:Online diagramming and collaboration. 
  • Several modeling languages supported
  • Diagram.ly :Simpeand easy
  • Draw.io
  • Gliffy| Online Diagram and Flowchart Software
  • Lucidchart
  • Create UML diagrams online
  • MxGraph(JavaScript based)

*************end of chapter********






Friday, August 16, 2019

Software Engineering

INTRODUCTION:
Software Engineering is a structured ,systematic approach for the design,development and maintenance of software systems.
1) on time
2) on budget
3) with acceptable performance
4) with correct operation

The economies of all developed nations are dependent on software.
• More and more systems are software controlled.
• Software engineering is concerned with theories, methods and tools for

   professional software development.

NEED :
  • Correct Specifications
  • Proper Delivery on time.
  • Solve the problem
  • Conform the budget.
  • Reliable
  • Maintain Quality

SOFTWARE PROCESS:
 It refers to a set of logically related activities, which are carried out in a
systematic order that leads to the production of the software to be delivered.
It is also known as Software development life cycle (SDLC).

Structured set of activities required to develop a software system
• Specification
• Design
• Validation
• Evolution
• Activities vary depending on the organization and the type of system being         developed.
• Must be explicitly modeled if it is to be managed.



SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)

SDLC PHASES:    (https://www.youtube.com/watch?v=8MV9c2TtEG4)

• Software specification(Data/Information gathering)
• Feasibility
• System Analysis
• System Design
• System Coding and Testing
• Implementation / Conversion
• Software Verification and Validation
• Software Evolution/Maintenance 

SOFTWARE PROCESS MODELS:

A software process model is asn abstract representation of a software process. The Widely - used generic software process models are classified into three types:
1- The Waterfall model  2-  Evolutionary model  3-  Component based model

WATERFALL MODEL (Linear-sequential life cycle model)

It is based on linear sequential approach. In this model , the project is divided into sequence of well defined phases. One phase is completed before the next starts. There is a feedback loop between adjacent phases. Every phase has to be completed before the next phase starts and there is no overlapping of the phase.


                     see video for clear concepts: 

It should be used in situations with:-
  • Clear and fixed requirement
  • Stable problem definition
  • Technology is static
  • Small projects
  • No confusing need
Advantage :
  • easy to understand
  • easy to arrange the task
  • easy to manage
  • clearly defined stages
  • well understood milestones
Disadvantage :
  • Poor model for long term projects
  • Not suitable for changing requirements during development
  • not suitable for complex systems.
  • Difficult to measure the progress in phases.

EVOLUTIONARY MODEL
It is like "Incremental Waterfall Model" where the developent cycle is divided into smaller cycles. This model is useful for projects using new technology that is not well understood. This is also used for complex projects.


see video for more details


Advantage: 
  • User satisfaction
  • Error reduction
  • High Quality
  • Low risk
  • Low cost
Disadvantage: 
  • Uncertain Customer Needs
  • Difficult to divide software
  • increases complexity
  • Increases Time if requirement not gathered correctly
  • multiple versions
PROTOTYPING MODEL

It is a software working model of limited functionality. In this model working programs are quickly produced. it comprises of five stages:-


See Video for more understanding purpose

  • Communication: it takes place between the developer and the customer to discuss the overall objectives of the software.
  • Quick Design: it involves developing a quick design of known requirements.
  • Modelling quick design:  This stage is essential for getting a clear data about the development of a software.
  • Construction of Prototype: It is evaluated by the customer itself.
  • Deployment,delivery, feedback of developed software solution.

 Advantage:
  • Increased user involvement in the product even before its implementation.
  • Since a working model of the system is displayed, the users get a better understanding of the system being developed.
  • Reduces time and cost as the defects can be detected much earlier.
  • Quicker user feedback is available leading to better solutions.
  • Missing functionality can be identified easily.
  • Confusing or difficult functions can be identified.

Disadvantage:

  • Risk of insufficient requirement analysis owing to too much dependency on the prototype.
  • Users may get confused in the prototypes and actual systems.
  • Practically, this methodology may increase the complexity of the system as scope of the system may expand beyond original plans.
  • Developers may try to reuse the existing prototypes to build the actual system, even when it is not technically feasible.
  • The effort invested in building prototypes may be too much if it is not monitored properly.


SPIRAL MODEL

This model was first described by Barry Boehm in his 1986 paper, "A Spiral Model of Software Development and Enhancement".  it is a combination of prototype and sequential model or waterfall model. all activities are done in one iteration. Software development is done in phases like planning,modelling,construction,deployment, communication in spiral manner. These phases are repeated till a fully functional software is not developed.




In the following situations spiral model can be used:
  • Large and high budget projects are being implemented.
  • When risk assessment is very critical.
  • Requirements are not very clearly defined.
  • Requirement are vague and even complex.
  • Ample time is available.

Advantage:

  • Changing requirements can be accommodated.
  • Allows extensive use of prototypes.
  • Requirements can be captured more accurately.
  • Users see the system early.
  • Development can be divided into smaller parts and the risky parts can be developed earlier which helps in better risk management.

Disadvantage:

  • Management is more complex.
  • End of the project may not be known early.
  • Not suitable for small or low risk projects and could be expensive for small projects.
  • Process is complex
  • Spiral may go on indefinitely.
  • Large number of intermediate stages requires excessive documentation.
 See video for clear concepts : https://www.youtube.com/watch?v=A4s9lf46hM8


Component based Model

Software products are built using components and these components are developed through a number of different sources that cane be written in several different programming languages. Software development goes through various steps like  :-

  • feasibility study 
  • system design, 
  • component identification, 
  • component integration and 
  • system testing 
  • system release.



Situations where component-based Model should be used are;
  • when emphasis is given on buying components and not on building components.
  • when the software structure is lower in coupling.
  • when the development process is evolutionary i.e. underging transitions and modifications continuously and is concurrent in nature.
  • when the focus is laid on assembling the software component and on developing them.

Advantage :
  • Low Cost
  • Low Risk
  • Fast delivery
Disadvantage:

  • Requirement changes affect the software development
  • Control over system evolution is lost.
Delivery Models

software delivery is the process of getting a software product to the market or to the client. Software delivery performs the following actions:
  • Finding and tracking client requirements.
  • Technology for software development and deployment.
  • Testing and validation of software for qualitiy.

Software delivery model is classified into two types:
  1. Incremental Delivery Model
  2. Spiral Delivery Model

Incremental Delivery Model

Incremental Model is a process of software development where requirements are broken down into multiple standalone modules of software development cycle. Incremental development is done in steps from analysis design, implementation, testing/verification, maintenance.
Each iteration passes through the requirements, design, coding and testing phases. And each subsequent release of the system adds function to the previous release until all designed functionality has been implemented.


Characteristics of an Incremental module includes

  • System development is broken down into many mini development projects
  • Partial systems are successively built to produce a final total system
  • Highest priority requirement is tackled first
  • Once the requirement is developed, requirement for that increment are frozen

When to use Incremental models?

  • Requirements of the system are clearly understood
  • When demand for an early release of a product arises
  • When software engineering team are not very well skilled or trained
  • When high-risk features and goals are involved
  • Such methodology is more in use for web application and product based companies

Advantage :

  • The software will be generated quickly during the software life cycle
  • It is flexible and less expensive to change requirements and scope
  • Thought the development stages changes can be done
  • This model is less costly compared to others
  • A customer can respond to each building
  • Errors are easy to be identified

Disadvantage:

  • It requires a good planning designing
  • Problems might cause due to system architecture as such not all requirements collected up front for the entire software lifecycle
  • Each iteration phase is rigid and does not overlap each other
  • Rectifying a problem in one unit requires correction in all the units and consumes a lot of time.
Spiral Delivery Model

Spiral model is one of the most important Software Development Life Cycle models, which provides support for Risk Handling. In its diagrammatic representation, it looks like a spiral with many loops. The exact number of loops of the spiral is unknown and can vary from project to project. Each loop of the spiral is called a Phase of the software development process. The exact number of phases needed to develop the product can be varied by the project manager depending upon the project risks. As the project manager dynamically determines the number of phases, so the project manager has an important role to develop a product using spiral model.
The Radius of the spiral at any point represents the expenses(cost) of the project so far, and the angular dimension represents the progress made so far in the current phase.
Below diagram shows the different phases of the Spiral Model:

Each phase of Spiral Model is divided into four quadrants as shown in the above figure. 
The functions of these four quadrants are discussed below-
  1. Objectives determination and identify alternative solutions: Requirements are gathered from the customers and the objectives are identified, elaborated and analyzed at the start of every phase. Then alternative solutions possible for the phase are proposed in this quadrant.
  2. Identify and resolve Risks: During the second quadrant all the possible solutions are evaluated to select the best possible solution. Then the risks associated with that solution is identified and the risks are resolved using the best possible strategy. At the end of this quadrant, Prototype is built for the best possible solution.
  3. Develop next version of the Product: During the third quadrant, the identified features are developed and verified through testing. At the end of the third quadrant, the next version of the software is available.
  4. Review and plan for the next Phase: In the fourth quadrant, the Customers evaluate the so far developed version of the software. In the end, planning for the next phase is started.
Advantages of Spiral Model: Below are some of the advantages of the Spiral Model.
  • Risk Handling: The projects with many unknown risks that occur as the development proceeds, in that case, Spiral Model is the best development model to follow due to the risk analysis and risk handling at every phase.
  • Good for large projects: It is recommended to use the Spiral Model in large and complex projects.
  • Flexibility in Requirements: Change requests in the Requirements at later phase can be incorporated accurately by using this model.
  • Customer Satisfaction: Customer can see the development of the product at the early phase of the software development and thus, they habituated with the system by using it before completion of the total product.
Disadvantages of Spiral Model: Below are some of the main disadvantages of the spiral model.
  • Complex: The Spiral Model is much more complex than other SDLC models.
  • Expensive: Spiral Model is not suitable for small projects as it is expensive.
  • Too much dependable on Risk Analysis: The successful completion of the project is very much dependent on Risk Analysis. Without very highly experienced expertise, it is going to be a failure to develop a project using this model.
  • Difficulty in time management: As the number of phases is unknown at the start of the project, so time estimation is very difficult.