Software Engineering Unit 1
Software Engineering Unit 1
Why IT IS USED ?
2. Efficiency –
The software should not make wasteful use of computing devices
such as memory, processor cycles, etc.
3. Correctness –
A software product is correct if the different requirements as
specified in the SRS document have been correctly implemented.
4. Reusability –
A software product has good reusability if the different modules of
the product can easily be reused to develop new products.
5. Testability –
Here software facilitates both the establishment of test criteria and
the evaluation of the software with respect to those criteria.
6. Reliability –
It is an attribute of software quality. The extent to which a program
can be expected to perform its desired function, over an arbitrary
time period.
7. Portability –
In this case, the software can be transferred from one computer
system or environment to another.
8. Adaptability –
In this case, the software allows differing system constraints and
the user needs to be satisfied by making changes to the software.
Advantages :
Disadvantages:
Why it is used:
It encourages the achievement of a higher maturity level in some
cases by displacing the true mission, which is improving the
process and overall software quality.
It only helps if it is put into place early in the software development
process.
It has no formal theoretical basis and in fact is based on the
experience of very knowledgeable people.
It does not have good empirical support and this same empirical
support could also be constructed to support other models.
Level-3: Defined –
At this level, documentation of the standard guidelines and
procedures takes place.
Level-4: Managed –
At this stage, quantitative quality goals are set for the organization
for software products as well as software processes.
Level-5: Optimizing –
This is the highest level of process maturity in CMM and focuses on
continuous process improvement in the organization using
quantitative feedback.
Advantages:-
Advantages -
This model is very simple and is easy to understand.
1. Base model
2. Simple and easy Phases in this model are processed one at a time.
3. Small projects Each stage in the model is clearly defined.
This model has very clear and well-understood milestones.
Drawbacks:-
C- Communication
P - Planning
M – Modeling
C - Construction
D - Deployment
Explanation:-
Rather than deliver the system as a single delivery, the development and delivery is
broken down into increments with each increment delivering part of the required
functionality.
It is particularly useful when enough staffing is not available for the whole project
Incremental model focus more on delivery of operation product with each increment
User requirements are prioritised and the highest priority requirements are included
in early increments.
Once the development of an increment is started, the requirements are frozen thoug
though requirements for later increments can continue to evolve.
Customer value can be delivered with each increment so system functionality is availa
earlier.
Early increments act as a prototype to help elicit requirements for later increments.
The highest priority system services tend to receive the most testing.
Advantages-
1. Prepares the software fast.
Disadvantages-
Advantages:
Applications:
Spiral 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 Spiral Model is a software development life cycle (SDLC) model that
provides a systematic and iterative approach to software development. It is
based on the idea of a spiral, with each iteration of the spiral representing a
complete software development cycle, from requirements gathering and
analysis to design, implementation, testing, and maintenance.
The Spiral Model is a risk-driven model, meaning that the focus is on
managing risk through multiple iterations of the software development
process. It consists of the following phases:
1. Planning: The first phase of the Spiral Model is the planning phase,
where the scope of the project is determined and a plan is created
for the next iteration of the spiral.
2. Risk Analysis: In the risk analysis phase, the risks associated with
the project are identified and evaluated.
Each phase of the 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 are identified and the
risks are resolved using the best possible strategy. At the end of
this quadrant, the Prototype is built for the best possible solution.
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:
Working through Pair programming produces well-written compact
programs which have fewer errors as compared to programmers
working alone.
It reduces the total development time of the whole project.
Agile development emphasizes face-to-face communication among
team members, leading to better collaboration and understanding of
project goals.
Customer representatives get the idea of updated software
products after each iteration. So, it is easy for him to change any
requirement if needed.
Disadvantages:
The lack of formal documents creates confusion and important
decisions taken during different phases can be misinterpreted at
any time by different team members.
Agile development models often involve working in short sprints,
which can make it difficult to plan and forecast project timelines and
deliverables. This can lead to delays in the project and can make it
difficult to accurately estimate the costs and resources needed for
the project.
Some of the good practices that have been recognized in the extreme
programming model and suggested to maximize their use are given below:
Code Review: Code review detects and corrects errors efficiently.
It suggests pair programming as coding and reviewing of written
code carried out by a pair of programmers who switch their works
between them every hour.
Testing: Testing code helps to remove errors and improves its
reliability. XP suggests test-driven development (TDD) to
continually write and execute test cases. In the TDD approach test
cases are written even before any code is written.
Incremental development: Incremental development is very good
because customer feedback is gained and based on this
development team comes up with new increments every few days
after each iteration.
Simplicity: Simplicity makes it easier to develop good quality code
as well as to test and debug it.
Design: Good quality design is important to develop good quality
software. So, everybody should design daily.
Integration testing: It helps to identify bugs at the interfaces of
different functionalities. Extreme programming suggests that the
developers should achieve continuous integration by building and
performing integration testing several times a day.
Some of the basic activities that are followed during software development
by using the XP model are given below:
Coding: The concept of coding which is used in the XP model is
slightly different from traditional coding. Here, the coding activity
includes drawing diagrams (modeling) that will be transformed into
code, scripting a web-based system, and choosing among several
alternative solutions.
(i) Draw the context diagram: The context diagram is a simple model that defines
the boundaries and interfaces of the proposed systems with the external world. It
identifies the entities outside the proposed system that interact with the system. The
context diagram of student result management system is given below:
(ii) Development of a Prototype (optional): One effective way to find out what the
customer wants is to construct a prototype, something that looks and preferably acts
as part of the system they say they want. We can use their feedback to modify the
prototype until the customer is satisfied continuously. Hence, the prototype helps the client to
visualize the proposed system and increase the understanding of the requirements. When
developers and users are not sure about some of the elements, a prototype may help both the
parties to take a final decision.
(iii) Model the requirements: This process usually consists of various graphical
representations of the functions, data entities, external entities, and the relationships
between them. The graphical view may help to find incorrect, inconsistent, missing,
and superfluous requirements. Such models include the Data Flow diagram, Entity-
Relationship diagram, Data Dictionaries, State-transition diagrams, etc.
(iv) Finalise the requirements: After modeling the requirements, we will have a better
understanding of the system behavior. The inconsistencies and ambiguities have been
identified and corrected. The flow of data amongst various modules has been
analyzed. Elicitation and analyze activities have provided better insight into the system.
Now we finalize the analyzed requirements, and the next step is to document these
requirements in a prescribed format.
Validation: It refers to a different set of tasks that ensures that the software
that has been built is traceable to customer requirements. If requirements
are not validated, errors in the requirement definitions would propagate to
the successive stages resulting in a lot of modification and rework. The main
steps for this process include:
The requirements should be consistent with all the other
requirements i.e no two requirements should conflict with each
other.
The requirements should be complete in every sense.
The requirements should be practically achievable.
Entity-Relationship-Diagram(ERD):
It depicts the relationship between data objects and is used in conducting data
modeling activities. The attributes of each object in the Entity-Relationship
Diagram can be described using Data object description. It provides the basis
for activity related to data design.
Data-Flow-Diagram(DFD):
It depicts the functions that transform data flow and it also shows how data is
transformed when moving from input to output. It provides the additional
information which is used during the analysis of the information domain and
serves as a basis for the modeling of function. It also enables the engineer to
develop models of functional and information domains at the same time.
State-Transition-Diagram:
It shows various modes of behavior (states) of the system and also shows the
transitions from one state to another state in the system. It also provides the
details of how the system behaves due to the consequences of external
events. It represents the behavior of a system by presenting its states and the
events that cause the system to change state. It also describes what actions
are taken due to the occurrence of a particular event.
Process-Specification:
It stores the description of each function present in the data flow diagram. It
describes the input to a function, the algorithm that is applied for the
transformation of input, and the output that is produced. It also shows
regulations and barriers imposed on the performance characteristics that are
applicable to the process and layout constraints that could influence the way
in which the process will be implemented.
Control--Specification:
It stores additional information about the control aspects of the software. It is
used to indicate how the software behaves when an event occurs and which
processes are invoked due to the occurrence of the event. It also provides the
details of the processes which are executed to manage events.
Data-Object-Description:
It stores and provides complete knowledge about a data object present and
used in the software. It also gives us the details of attributes of the data object
present in the Entity Relationship Diagram. Hence, it incorporates all the data
objects and their attributes.
DATA MODELING :-
What is data modeling in software engineering?
Data modeling is the process of creating a simplified diagram of a software
system and the data elements it contains, using text and symbols to represent
the data and how it flows.
Data modeling is a method that helps you avoid the cons that come
with poorly designed data. It’s like a map that helps organize
information for better use.
Why Do We Need a Data Model?
You need a data model to ensure that the developer has a structure of data
objects and their flow. Data models help in designing a database at a physical
and logical level. A data model also defines primary keys, foreign keys,
relational tables, and stored procedures. Once the developers have an idea of
how the data flows, they can create a physical database.
When you sort data in the correct order, you can find out which data is
unclear. You can also look for missing information and take action. In the long
run, this helps in upgrading the base of your project or company. Not only that,
maintenance costs go down with a proper data model in action.
Types of Data Model :-
From the definition above, we know that the data model defines the structure
of a database. It does so at a physical, conceptual, and logical level. Let’s check
out the three main types of data models.
Conceptual :-
The conceptual data model defines what the system is made of. Data
architects and stakeholders create this model. The aim is to define, set the
scope, and organize different rules and business concepts. This model aims to
define entities, how those entities relate to each other, and their attributes.
For instance, let’s consider two entities, customer and product. The customer’s
name and ID are the attributes of the customer. The price and name are the
entities of the product. We can say that sales is the connection between the
product and the customer.
Physical :-
A physical data model has more details than a conceptual one. Also, the
physical model defines all the things that a developer needs to build a
database. Apart from all those in the conceptual model, a physical data model
has properties like column names, table structures, and foreign keys.
There are two ways of creating a physical data model. You can create it by
modifying the existing logical model. Or, you can use the native DBMS
language. Database admins use the physical data model to plan the database’s
capacity.
Logical :-
The logical data model is responsible for defining the structure of different
data elements. The design and development of this model don’t depend on
DBMS. In this model, you need not define the primary and secondary keys. You
need only verify the details and adjust the connector between the entity and
attributes. This model is the same as the conceptual model, only a bit more
detailed.
Data Modeling Steps :-
Because there’s ample data to cater to, data modeling happens step-wise. Let’s
take a look at the steps of data modeling.
Identify Entities :-
We first consider raw data into different sets, each modeled separately. Each
set has some business objects or entities. The first step is to identify these
entities.
Identify a Key Property :-
Every entity has a key property. This way, you can differentiate between
entities in a data model. For instance, in an employee data model, employee ID
is a unique property.
Create a Rough Draft :_
Entities in a data set form a connection with each other in some way or
another. Make a rough draft to display how the entities connect with each
other.
Identify Different Data Attributes :-
After creating a rough draft, identify different data attributes or properties.
Incorporate these attributes into the data model.
Map Out the Attributes :-
Map the attributes to entities after identifying various attributes. This way, the
Entity-Relationship model will show what the data means from a business
point of view. For instance, let’s consider the employee data model we
discussed
ADVANTAGES :-
1. Lower Costs
Data models help in lowering the cost of development. Generally, companies
spend a lot of funds on coding and testing. Data modeling reduces the
company’s coding budget. Not only that, the best part is that data models
don’t use a lot from the budget.
2. Better Management of Data as a Resource
You can normalize your data with data modeling. You can also define the data
in terms of what it is. Not only that, you can even define data in terms of the
properties it can have.
3. Designing Repositories and Databases
Having a smooth-functioning database is a must for every firm. For that, data
modeling is an important process. It also helps in driving better decisions about
archives and data warehouses.
4. Accurate Representation of Objects
Data modeling provides an accurate description of data objects by creating a
flow or diagram. This diagram shows how the entities and their properties
connect with each other or with other elements in the database.
5. Better Performance
Most people think that a database runs slow because of some problem in the
database design. But in reality, without a data model, the database
development is poor. Also, data modeling ensures better performance by
easing the database tuning. When the concepts in a data model are clear, the
developer can design a database that runs faster.
DISADVANTAGE :-
1. You can’t perform data modeling without knowing the features of the
physical data stored.
2. Even if you make only a minor change in the structure later, you’ll need to
modify the entire structure.