Upload
others
View
6
Download
2
Embed Size (px)
Citation preview
Mr. V. Khatri, PGTCS, KV1 Jammu
Unit II, Software Engineering Software Engineering - Software engineering is an engineering branch where main focus is
given over the development of software product using well defined scientific principal, procedures and
methods.
SE is the process of analyzing user needs, designing, constructing or coding, and testing &
Maintenance end user applications that will satisfy the needs of the user through the use of software
programming language(s). As compared to simple programming, software engineering is used for
larger and more complex software systems, which are used as critical systems for business or for any
organization.
Any programmer’s main task is to write source code that makes a program run, whereas a
software engineer is responsible for designing, developing and implementing the software solutions.
Software processes: A software process is the process of dividing software development work
into different phases so that software design is improved and product/project is easily managed. It is
also known as a software development process or software development life cycle
Steps of Software processes: Common fundamental activities of all software processes:
1. Software specification –What are the requirements of the software are defined in this
phase, various activities are performed to detect software specification.
2. Software design and implementation – Designing of software to meet the specification
of software.
3. Software validation - The software is validated in this phase so that it can meet the
customer needs.
4. Software evolution – Software is tested and Maintained in this phase, if any specific
requirement is to be added then it will be implemented before delivering to the user.
Software Process Models: Common software process models are
1. Waterfall model: It is a Linear sequential
life cycle model. It is easy to use.
In a waterfall model, there are number of
phases and each phase must be completed
before the next phase begins and their must
not be any overlapping in the phases.
The sequential phases in Waterfall model are –
Requirement analysis – Requirement is specified
In this phase by using various techniques.
System Design – Overall design of the software is
Made in this phase, it shows overall structure of
The software.
Implementation − Based on system design small
programs as units are developed and later on
these are integrated to work like a software
Mr. V. Khatri, PGTCS, KV1 Jammu
Verification − Testing of the software to check whether it fulfills user requirements.
Maintenance − Some issues may arise at client environment to be resolved are as a
part of maintenance.
Advantages of waterfall model: 1Easy to understand 2. Easy to arrange task 3.
Clearly defined stages and 4. Easy to manage
Disadvantages of waterfall model: 1. Poor model for long project 2. Cannot
fulfill changing requirement 2. No working software is developed till last phase 3.
Difficult to measure the progress in phases.
(2) Evolutionary model: The evolutionary model is like "Incremental Waterfall
Model”, where development cycle is divided into smaller cycles, in this model users are able to
get access to the product at the end of each cycle.
The users also provide feedback on the product for planning to the development team for
changing the product, plans or process on each cycle.
These incremental cycles are typically of two or four weeks in duration and continue until the
product is fully developed.
Advantages of Evolutionary Model: 1. Error reduction: because versions are tested at
each incremental cycle 2. User satisfaction: Users are given full chance of experimenting
partially developed system. 3 High quality: Quality is maintained due to thoroughly testing.
Disadvantages of Evolutionary Model: 1 Difficult to Divide software: It is difficult to
"divide the software and the problems in several versions. 2 Uncertain customer needs: A
confused user has uncertainty over his requirements 3. Time and Cost: As this model reduces
"Time and Cost" but requirement is not gathered correctly, may later on effect over time and
cost.
Following are the evolutionary
process models.
a. The prototyping model
b. The spiral model.
c. Concurrent development model
a. The prototyping model:
It is software working model of
limited functionality. It is just creating
a sample project or software for testing purpose, in this model, working programs are
quickly produced, following are the steps in this model:
1.Communication- It is done between developer and customer to discuss the overall objectives of the
software.
2.Quick design- Base on Communication Quick design is made.
3.Modeling quick design- It is done for getting clear idea about the development of software
Mr. V. Khatri, PGTCS, KV1 Jammu
4.Construction of prototype- Prototype is a model or assumed software which is made by
programmer and evaluated by the customer itself.
5.Deployment, delivery, feedback- Deployment is the completion process of developed software, it is
to be delivered to the customer after proper testing and Maintenance then feedback should be taken
from the customer.
Situations to use prototyping model: 1 Typically, online systems, web interfaces where
there is very high amount of interaction with end users, are best suited for Prototype model. 2 In
Prototype model the end users constantly work with the system and provide a feedback which is very
essential and later on these feedbacks are implemented in software development to make software
better.
b. The spiral model: It is a combination of prototype & sequential model or waterfall model.
All activities are done in one iteration. Software development is done in the phases like planning,
modeling, construction, deployment, communication in spiral/continuous manner. These phases are
repeated till fully functional software is not developed.
Situations to use spiral model
1 Large and high budget projects
2. When risk assessment is very
critical or there should not be any
risk in the software
3 Requirements are not very clearly defined or these are changing simultaneously 4. Ample or lot of
time is available.
c. The Concurrent
development model: This
model defines a series of events
that will trigger transition from
state to state for each software
engineering activities. For any
software its starting stage is
Inactive stage after that when software development team
works it enters in to Under Development stage, there
different changes in the software are made, its comes in
under revision stage if changes are made then in under
review, getting review it comes in to Baseline stage where
it is ready to deliver and the last stage is Completion stage.
lt is suitable for the development of client/server
applications.
Situations to use Concurrent development model:
1 When immediate need of feedback after testing
Mr. V. Khatri, PGTCS, KV1 Jammu
2 More features to be added later on in the project
3 When there is need of continuous testing
III. Component Based Model: Software products are built using components, and these
components are developed through a number of different sources, be written in several different
programming languages. Software development gone through the steps like feasibility study, in its it
checks that development of software will be feasible for organization or not, system is designed in
system design phase, component identification, component integration, system testing and system
release are different phase in this model. After software release it will be delivered to the user.
Situations to use Component Based Model
1. When the emphasize is given to buy
components not to build components
2.When the focus is assembling the
software components not on developing.
Advantages: 1Reduce the cost & risk of
software development. 2.Faster delivery
of software.
Disadvantages: 1. Requirement changes
effect the software development.
2. Control over the system evolution is lost
Delivery Models: Software Delivery is the process of getting a software product for the market
or to for a client, it means to deliver the software, after delivering it check and gets feedback from the
customer, before final delivery it ensures the quality product to be delivered to the customer.
Software delivery includes the following actions: 1 Client requirements finding 2 Technology for
software development and deployment 3 Testing and validation of software for quality
A software delivery model is a term which is widely used in the IT industry. It is defined as a way of
project delivery based on the location of client/user. The choice of a delivery model can affect the
success of the entire project.
We will go through two types of delivery models:
1 incremental delivery model: Incremental delivery model refers to the practice of repeatedly
delivering a system into client environment or (to the marketplace) in a series of expanding
capabilities. It means software is updated on each Incremental model to make it perfect. A six-
month delivery cycle could be composed of 10 short iterations or updating cycles. The results of each
Mr. V. Khatri, PGTCS, KV1 Jammu
iteration are not delivered to the marketplace, but the results of an incremental delivery are delivered
to the client. Here iterations are the cycle and in picture two types of delivery is shown.
2 spiral delivery model: Spiral delivery model can be pretty costly to use and does’t work well for
small projects. Its main motto is to make the software reliable by completing various activities and
after each cycle delivering software to the client, if any drawback found then again it will be go through
various cycles, first one is Plaining phase in which Estimated cost of the Project, Scheduling of various
activities and Risk Analysis is considered, in Second Phase Modeling of Analysis Design is done, In Third
phase Code Generation and testing is done and then Delivery of the software and taking feedback from
the party is taken and based on these feedback again communication is started with the software
making team. Strong side of this model is that there’s a possibility to add some additional
functionality at the last stages of software product development and Software is repeatedly delivered
after each refinement.
Note: Its diagram will be same as mentioned in previous page spiral model.
The software process: The software process activities are the sets of activities that finally ends
up in the production of a software product or these are the activities which are required to make a
complete software. There are different software processes but all must include the major four
activities. Utilization of these activities depends on the type of software, people and organizational
structures involved, they are:
Mr. V. Khatri, PGTCS, KV1 Jammu
1. Software specification: The Software specification or requirements engineering is the
process of understanding the user requirements means finding what services are required and what
constraints on these services are also to ensures that the software will meet the user expectations.
It’s is the first stage of software process, errors at this stage will reflect later on the next stages,
resultant higher costs of the project. There are four main sub-activities of software specification in
Process Activities:
• Feasibility study: Technical, operational, economical feasibility is checked that these are as per
budget planned.
• Requirements analysis: Deriving the system requirements through observation of existing systems,
onsite observation, discussion with stakeholders, etc.
• Requirements specification: elicitation of requirements and writing down these in a document, this
document will be called Requirement Specification Document.
• Requirements validation: Checking the requirements for completeness after that software will be
handed over to party and feedback will be taken from the party.
2. Software Development (design and implementation): After software
requirement second phase is Designing, in this phase overall design and its implementation is specified.
The design process activities are the followings: • Architectural design: It defines the overall
structure of the system, its components and their relationships between these components.
• Interface design: It defines the interfaces between these components, which must be clear.
• Component design: Take each component and design it.
• Database design: The system data structures are designed and their representation in a database
is defined.
3. Software validation & Software verification: Software is valid or not, it is to be
verified by the QA (Quality Assurance Team), it means system conforms to its specification and that it
meets the expectations of the customer. Testing of software is another phase in it, testing has three
main stages:
• Development (or component) testing: Components are tested by the team during development
phase.
• System testing: Finding errors that result from interactions between components.
• Acceptance testing: The system is tested, whether it is acceptable or not by the Customer.
4. Software evolution: Software evolution means software maintenance, refer to the process
of developing software initially, then repeatedly updating it for various reasons. The main objectives of
software evolution is ensuring the reliability and flexibility of the system. The costs of software
maintenance are often several times the initial development costs of software.
Mr. V. Khatri, PGTCS, KV1 Jammu
Agile Methods: The Agile Method is an approach to project management in software
development. It is a process of continuously updating our software according to user needs, many
process or amendments are run simultaneously on software to make it better. It uses incremental,
iterative (looping) work sequences that are commonly known as sprints. So Spring is a part of work
done or it’s a part of different processes that are running in an iteration (looping). AGILE
methodology promotes continuous iteration of development/testing throughout the software
development. Both development and testing activities are concurrent.
The general principles of the Agile Method • continually develop software to satisfy the client. •
Concentrate on delivering working software. • Developers and user must work together throughout
the software development. • Constant attention to technical excellence.
Pair Programming: Pair Programming is an agile method,
where two programmers share a single workstation/computer.
One programmer is the driver, whom has control over the mouse
and keyboard to write the code, while the other serves as the
navigator, who review the code that the other is writing the code.
Benefits of Pair Programming: • Increased software Quality • User Satisfaction • Easy
Integration of components • Mentoring & Learning by programmers
Scrum: It is an agile development method which concentrates on how to manage tasks within a
team-based development environment. Scrum believes in empowering the development team and
advocates working in small teams.
It consists of three roles
• Scrum Master: Responsible for setting up the team, sprint meeting and removes obstacles to
progress.
• Product owner: Creates product backlog and responsible for the delivery of the functionality at
each iteration
• Scrum Team: Organizes the work to complete the sprint or cycle
Process flow of Scrum: •Each iteration or cycle of a scrum is known as Sprint • Product backlog
is a document/list where all details are entered to get the end product. • Team works on the
Mr. V. Khatri, PGTCS, KV1 Jammu
specified sprint backlog • Team checks the work on daily basis. • Team delivers product functionality
at the end of the sprint.
The Sprint: The main part of Scrum is a Sprint; Sprints can be of one week to one month in length.
There are three events each Sprint:
Sprint Planning – Team decides what to work in current period
Daily Scrum – The Development Team meets for 5 to 15 minutes daily to inspect progress toward
Goal. Sprint Review – The Team review about task competed as the per Backlog Sprint Retrospective
– The Team discusses on right and wrong development, and how to improve.
Business use case Diagrams: Business use case diagram describe how the business is being
used by its customers. Activities that directly concern the customer. 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.
Actor: It is a user or outside system which interacts with the system in order to obtain some result
from that interaction.
Association: It is relationship between an actor
and a business use case association
Generalization – shows further parts of connector, in shown example Customer is
Generalized in two types, one is Member type customer and other one is Non Member
Type Customer, it is widely used in Business Use Case Diagram.
Scenarios: Use case diagrams are connected to scenarios. A scenario means what happens
when anyone interacts with the system. scenario for a point of sale terminal. A customer reach to
the shop to purchase an item. The cashier/seller take the decision based on the item chosen by the
customer and deliver that item receive money.
Categories of Business Use Cases: Based on the activities in a business there are three
categories of business use cases:
1. First, activities which are commercially important, known as business processes.
2. Second, activities which are not commercially important, but to be performed anyhow to make the
business work. E.g. security, administration, cleaning etc.
3. Third, management work. Type of work that affects business use cases management.
There are three main reasons for structuring the business use-case model:
• To make it easier to understand.
• To connect parts of workflows which are shared among many business use cases.
• To make easier to maintain.
Characteristics of a Good Business Use-Case Model:
• It must perform all the activities within the business.
• It must conform to the business for which these are designed.
• Should have balance between the number of use cases and the size of the use cases:
Mr. V. Khatri, PGTCS, KV1 Jammu
• Less use cases make the model easier to understand where as More use cases may make the model
difficult to understand.
• It should give a good comprehensive picture of the organization.
Following are the steps to draw use case diagram: First Identify the Actors of the system.
Also all roles played by the Actor relevant to the system. then Identify the users/task required to
achieve the goals. And use cases to be created for every goal and use cases should be structured
With Relationship.
Types of Use Cases:
1.<<include>>: all fixed or unchangeable U cases which are already added are defined in it.
2.<<extend>>: These are used in inserting additional action into the business use-case sequence. It
is explicit function and it is optional. means some capability to be used are optional.
3. Abstract and generalized Use Case: The general use case is abstract; it contains incomplete
information. The title of an abstract use case is always shown in italics.
Some Use Cases are shown here:
There are many online website for use case design: 1 Draw.io 2.Gliffy | Online Diagram and
Version control system: Version Control System (VCS) can be considered as a kind of
database. It helps us to Monitor the complete project at any point of time. Project can be tracked
Mr. V. Khatri, PGTCS, KV1 Jammu
along with who made the change and why the changes were made. Later on when if required to take a
look at an older snapshot/version, VCS shows how exactly it differed from the previous one.
When our project is tracked by VCS, any addition/deletion/modification in files of our project
will be automatically detected and recorded by it. Version Control System also known as
Source Control Management System or Revision Control System or Configuration Management
System. Some Version Control Systems are GIT, CVS, SVN, Bazaar etc.
Version control system of two types – (i) Centralized Version Control System – It
has single server computer, contains all the version files or software and all the clients or computers can
access these file or software, there will be total control of the Administrator on the total progress.
(ii) Distributed Version Control System: In this types of system data or software does not
reside at a single place, rather it resides on different remote sites or PC, different work may be
distributed to different clients and later it may be combined or linked to make a complete
software, so data is safe in this system to different location and it is good to earlier system.
Features of VCS: Easy to trace changes and Simple to compare of all versions to resolve conflicts
also changes may be reverted from any state to remove any drawback also it is collaborative, it means
everyone is absolutely free to work
GIT: Git is currently the most popular distributed version control system. It originates from the
Linux kernel development and it was founded in 2005 by Linus Torvalds. Nowadays it is being used by
many popular open source projects, like, Android and by as many commercial organizations. Basically
it was written in the programming language C, but later on Git has been re-implemented in other
languages, e.g., Java, Ruby and Python.
GIT has good performance among other VCS also it secures codes and we can have multiple local
branches which are independent of each other, it is an Open Source software and may be downloaded,
being open source invites the developers from all over the world to contribute to the software
But it is less preferred for handling extremely large files.
GIT may be downloaded from www.gitforwindows.org , after installing create a folder then right click
on folder to select Git Base Here option, then we will apply some operation on it -
Some of the basic operations in Git are: • Initialize • Add • Commit • Pull • Push Some advanced
Git operations are: • Branching • Merging • Rebasing
1. Initialize - git init command creates an empty Git repository/re-initializes an existing one.
2 git status – this command lists all the modified files which are ready to be added to the local
repository. Now make some changes in the selected directory ,like create a.txt file in it. Now again type
git status, it will display that untracked files are there like a.txt.
3. git add – This command to add any new or modified files to the index. (git add –A to add all the files of
current directory) Now type git add a.txt and then git status, it will display changes occurred
4. git commit - It refers to recording snapshots of the repository at a given time. git commit always
changes master points to latest commit.
In above diagram after git commit command master point
will move to s3 snapshot from s2 snapshot