Module 3
Module 3
9.1 Introduction
Robots do not make mistakes, there will be no defects in design and construction.
Software requirements -> converted to Software design -> Software construction etc
Using any software Engineering framework, it is possible to design and construct industry
strength software products that gives good quality.
9.2 Software Engineering Management:
The waterfall model is best suited for projects where well-developed software requirement
specifications (SRSs) exist.
The waterfall model is best suited for large software development projects for government,
military, and other industries only when SRS is well defined.
9.3.2 Software Life cycle in Iterative Model:
We can take a few of the requirements and start designing and then building the software only for
this set of requirements. Once the software is built, it is delivered to the end users.
So the cycle for all these activities may last a few weeks (1–6 weeks).
This cycle is repeated until all requirements are converted into the software product. In this way,
the huge risk of delivering wrong software product at the end of a long period of development can
be avoided.
Some well-known methodologies include Scrum, EXtreme Programming, incremental iteration
model, and spiral development.
There is one more iteration-based model, which was developed by Rational Corporation (part of
IBM). It is known as the rational unified process model.
If tasks involved in these phases can be broken into smaller parts and if many teams can be
employed to do these tasks
To test these parts, dummy parts are used for these interfaces so that the part can be tested (also
known as test oracles). Once these parts are developed by each independent team, they are
integrated to make the complete software product.
Design also considers factors such as reliability, robustness, security, ease of use,
internationalization, localization, and compatibility. All of these are collectively termed as
nonfunctional design requirements.
Some of the challenges in software design include difficulty in modeling due to changes or
unclear requirements, limitations of representation of requirements into system design, etc.
Software coding (also known as building or construction) is the most labor-intensive task in
software development projects. – standard codes to be used
Some of the challenges in software construction include lack of team work, rework due to
changes in design, lack of clarity in design, bad allocation of work, and bad component
structure
In waterfall and agile model, rework should be avoided
- fixing bugs
- we can have a schedule of 15 days to test the application and acceptable quality level of 100 critical
bugs to be fixed after the system goes live.
- final phase
- SRS document
After each phase of software development gets completed, there should be exit criteria that
will ensure that all work has finished per project plan and that these work products are defect
free.
The exit criteria should include completion of all processes for the phase, completion of work
products, and finally acceptable quality of work products. For quality control, formal review
processes should be included in each phase.
If any of the three exit criteria is not met, rework may be needed, and, thus, instead of the
project moving forward, it will move back
When a building is constructed, a good foundation is laid out for the building, so that the building will
have a long lifespan and will not collapse.
Similarly, it is given a strong and resilient structure, so that even in case of an earthquake, it will not
fall down.
The design should provide a sound, resilient, and scalable structure to support the software system.
To deal with this problem, a technique called refactoring is used on these agile projects where
incremental software development is done.
The current trend of service-oriented architecture (SOA) has also helped tremendously in changing
the design concepts.
3.1.1 Design Types
- Work products grouped together to form software design
- Some examples include prototypes, structural models, object-oriented design, systems analysis, and
entity relationship models.
If design standards are implemented on a project, then it will help in streamlining activities that are
involved during the software design phase.
Some industry standards for software design include operator interface standards, test scenarios,
safety standards, design constraints, and design tolerances.
Software design activities produce many intermediate documents and work products. These include
product architecture description, allocated requirements, product component descriptions, product-
related life-cycle process descriptions, key product characteristic descriptions, required physical
characteristics and constraints, interface requirements
- A top-down approach also helps in creating reusable components and hence increases productivity
as well as maintainability.
- Drawback of the top-down approach is that it is a risky model. The whole design has to be made in
one go instead of making attempts to incrementally building the design, which is relatively a safer option.
3.2.2 Bottom-up Approach
- In the bottom-up approach, first, the minute functions of the software product are structured and
designed. Then, the middle-level components are designed, and, finally, the top-level structure is designed.
- There are some benefits to the bottom-up approach. It leads to incremental building of design that
ensures that any missing information can be accommodated later in the design
In product development for a software vendor, many versions of the same product have to be
developed for fulfilling different customers.
At the top level of the hierarchy of files on the configuration and version control tool, the directory
name should be the project/product name.
3.3.1 Subversions
During the software development life cycle, the design changes with changes in requirement speci-
fications or when it is felt to change design as it no longer supports additional requirements.
In such cases, the main design is changed to meet new conditions. However, the main design version
is also kept. The new design is saved as a separate file. So, we have design two documents now.
- Simple
- Maintainable
- Verifiable
- Portable
- Reliable
- Secure
- Scalable
Software design is the phase when a short sighted or myopic vision can turn the software product
development into a nightmarish affair for downstream phases.
A good software design not only ensures a smooth transition to the development phase but also
ensures that the software product has a good shelf life during operation.
Starting with the early procedural programming paradigms, programming has evolved into present
day “service-oriented architecture.”
3.5.1 Prototypes
Prototyping is cheap and fast. It also gets a buy in from customer at an early stage of the project. If not
a full prototype of the application, a partial prototype can help you win over your customer.
A miscommunication or misunderstanding between the customer and the project team gets cleared
once the differences of opinion are sorted out early on during the prototype demonstration sessions.
In any case, customers do not care about internal workings of the application.
Customer expectations become difficult to manage in such instances. Prototypes can only show the
user interface screens.
At the bottom are the smallest units of functions and procedures in a software application.
Many classes together build a component. Components in turn make modules. Modules in turn make
the complete application.
Breaking into parts for an application can best be done using a structural analysis.
This feature set is analyzed and broken down into smaller sets of features, which will go into different
modules.
It has always been difficult to represent business entities and business information flow in a software
model.
Business entities are represented as objects in the object-oriented software design.
System analysis is the process of finding solutions in the form of a system designed from the inputs
coming from business needs.
For instance, a person may want to access his bank account using an Internet connection to the online
Web site of the bank. This scenario calls for many things that are involved in the whole chain of objects
and events.
Based on the analysis, a system model can be made that will be used in developing the application.
Entity relationship models are one of the ways to represent business entities and their relationships
to each other through diagrams.
With object-oriented modeling, it is possible to correlate each object with a corresponding database
object.
For large software products, the design can be broken into many design parts representing each
module of the product.
If we can use a standard method of representing the same information for these components, then it
is possible to use these pieces of information in many components by reusing them.
Internet applications are inherently different. Thus, their design is also different from legacy
client/server applications.
Some of the characteristics that impact their design include:
- They are used by a large number of people. So they need to have good performance built
into design
- They are information providers with lots of content.
- They are asynchronous.
- They are stateless.
All transactions should be made stateless, so that if any transaction is in progress and the
connection between server and user machine breaks, the transaction is reverted back.
Quality in the design of the software application can be built by adhering to best practices (software
engineering principles) in processes adopted for the design as well as making sure that requirements
have been converted into good design.
The design should avoid complexity, inconsistency, and inefficiency.
Inconsistency issues can be addressed by having a solid architecture on which units and other program
units should be based.
Quality control for software designs can be done by checking the design after it is built for defects.
Concurrent engineering deals with taking advance information from an earlier stage for a later stage
in project, so that both the stages can be performed simultaneously.
Until all details about design are made, you cannot start development. So, the development team
cannot start their job until they have a software design in their hands.
Changes in code result in more than normal occurrence of defects as dependency between
modules keeps increasing with increase in the size of the product.
To reduce the chances of product defects, it is necessary to reduce the number of calls among
different modules and classes.
4. SOFTWARE CONSTRUCTION
Construction is one of the most labor intensive phases in the software development life cycle. It
comprises 30% or more of the total effort in software development.
Due to the labor intensive nature of the software construction phase, the work is divided not only
among developers, but also small teams are formed to work on parts of the software build.
The advantage to this is that these project teams do the software coding and other construction
work in parallel with each other and thus the construction phase can be collapsed.
The whole process of construction should follow a proven process so that the produced code is
maintainable, testable, and reliable.
Developers are given software design specifications in the form of use cases, flow diagrams, UI
mock ups, etc., and they are supposed to write a code so that the built software matches these
specifications.
At any time, a code written by a developer will always be different from that written by any other
developer.
4.1.1 Modularity
The produced software code should be modular in nature.
Each time a particular functionality is needed in the software construction, it can be implemented
using that particular module of software code.
4.1.2 Clarity
The produced code should be clear for any person who would read the source code.
There should be sufficient documentation inside the code block, so that anybody reading the code
could understand what a piece of code is supposed to do.
4.1.3 Simplicity
The source code should have simplicity and no unnecessary complex logic; improvisation should
be involved, if the same functionality can be achieved by a simpler piece of source code.
For instance, in the case of object-oriented programming, abstraction and information hiding add
a great degree of simplicity.
4.1.4 Reliability
Reliability is one of the most important aspects of industry strength software products.
Reliability of source code can be increased by sticking to the standard processes for software
construction.
If the development team feels that this is the case, then it is far better to restructure the software
design and then write a code based on the new structure than to add a spaghetti code on top of a
crumbling structure.
4.1.5 Safety
Industries like medicine and healthcare, road safety, hazardous material handling need foolproof
software products to ensure that either human lives are saved (in case of medicine and
healthcare) or human lives are not in danger. Here the software code must have inbuilt safety
harnesses.
4.1.6 Maintainability
As has been pointed out after several studies, maintenance costs are more than 70% of all costs
including software development, implementation, and maintenance
It is estimated that almost 70% of software defects arise from faulty software code.
To compound this problem, software construction is the most labor intensive phase in software
development.
If those defects are allowed to go in software testing (which is the next phase), then fixing those
defects will become costlier
4.3.1 DeskChecks (Peer Reviews)
Deskchecks are employed when a complete review of the source code is not important.
The developer sends his piece of code to the designated team members.
The developer reads those feedbacks and may decide to incorporate or to discard those sug-
gestions.
4.3.2 Walkthroughs
4.3.4 Inspections
Code inspections are final reviews of software code in which it is decided whether to pass a piece
of code for inclusion into the main software build.
Converting design into optimal software construction is a very serious topic that has generated
tremendous interest over the years.
Software product size affects the methods that can be used to construct specific sized software
products. Advancement in the field of computer science also allows discovery of better
construction methods.
In structured programming, data and structured code are separate and accordingly are modeled
separately.
Widely used as an example in object-oriented programming books, a car consists of a chassis, an
engine, four wheels, body, and transmission.
When a software system is modeled to represent real-world objects, both data and structure are
taken care of in object-oriented programming.
Some CASE and modeling tools are available that generate software code.
The generated code is specific to the platform and runs on the device (hardware and software
environment) for which the code is generated.
Many techniques have evolved to reduce the labor intensive nature of writing source code.
Software code reuse is one such technique.
Code reuse in procedural programming techniques is achieved by creating special functions and
utility libraries and using them in the source code.
This concept is used with iteration-based projects especially with eXtreme Programming tech-
nique.
Before developers start writing source code, they create test cases and run the tests to see if they
run properly and their logic is working.
Whenever a developer writes a piece of code, he feels confident that he has written a clean code
and that it does not need testing.
For unit testing, generally developers are comfortable as long as there are no changes required
(due to change in design or requirements) in their code.
But once some change takes place in the code somewhere, other things change.
Generally, it is one of the most challenging situations in software construction to find the impact
of change on other parts of the product under development.
Most software development is done after partitioning the software application under develop-
ment first and then allocating it to distributed teams.
Generally, modules of code are developed first. Later, they need to be integrated with each other
to make a complete software application.
Integration testing has been becoming more and more important, as most software being
developed is modular in nature.