Sunday, August 9, 2009

Software design

Software design is a process of problem-solving and planning for a software solution. After the purpose and specifications of software are determined, software developers will design or employ designers to develop a plan for a solution. It includes low-level component and algorithm implementation issues as well as the architectural view.

Contents

Overview

The software requirements analysis (SRA) step of a software development process yields specifications that are used in software engineering. If the software is "semiautomated" or user centered, software design may involve user experience design yielding a story board to help determine those specifications. If the software is completely automated (meaning no user or user interface), a software design may be as simple as a flow chart or text describing a planned sequence of events. There are also semi-standard methods like Unified Modeling Language and Fundamental modeling concepts. In either case some documentation of the plan is usually the product of the design.

A software design may be platform-independent or platform-specific, depending on the availability of the technology called for by the design.

Software design topics

Design Concepts

The design concepts provide the software designer with a foundation from which more sophisticated methods can be applied. A set of fundamental design concepts has evolved. They are:

  • 1.Abstraction - Abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically in order to retain only information which is relevant for a particular purpose.
  • 2.Refinement - It is the process of elaboration. A hierarchy is developed by decomposing a macroscopic statement of function in a stepwise fashion until programming language statements are reached. In each step, one or several instructions of a given program are decomposed into more detailed instructions. Abstraction and Refinement are complementary concepts.
  • 3.Modularity - Software architecture is divided into components called modules.
  • 4.Software Architecture - It refers to the overall structure of the software and the ways in which that structure provides conceptual integrity for a system. A software architecture is the development work product that gives the highest return on investment with respect to quality, schedule and cost.
  • 5.Control Hierarchy - A program structure that represent the organization of a program components and implies a hierarchy of control.
  • 6.Structural Partitioning - The program structure can be divided both horizontally and vertically. Horizontal partitions define separate branches of modular hierarchy for each major program function. Vertical partitioning suggests that control and work should be distributed top down in the program structure.
  • 7.Data Structure - It is a representation of the logical relationship among individual elements of data.
  • 8.Software Procedure - It focuses on the processing of each modules individually
  • 9.Information Hiding - Modules should be specified and designed so that information contained within a module is inaccessible to other modules that have no need for such information.

Design considerations

There are many aspects to consider in the design of a piece of software. The importance of each should reflect the goals the software is trying to achieve. Some of these aspects are:

  • Compatibility - The software is able to operate with other products that are designed for interoperability with another product. For example, a piece of software may be backward-compatible with an older version of itself.
  • Extensibility - New capabilities can be added to the software without major changes to the underlying architecture.
  • Fault-tolerance - The software is resistant to and able to recover from component failure.
  • Maintainability - The software can be restored to a specified condition within a specified period of time. For example, antivirus software may include the ability to periodically receive virus definition updates in order to maintain the software's effectiveness.
  • Modularity - the resulting software comprises well defined, independent components. That leads to better maintainability. The components could be then implemented and tested in isolation before being integrated to form a desired software system. This allows division of work in a software development project.
  • Packaging - Printed material such as the box and manuals should match the style designated for the target market and should enhance usability. All compatibility information should be visible on the outside of the package. All components required for use should be included in the package or specified as a requirement on the outside of the package.
  • Reliability - The software is able to perform a required function under stated conditions for a specified period of time.
  • Reusability - the modular components designed should capture the essence of the functionality expected out of them and no more or less. This single-minded purpose renders the components reusable wherever there are similar needs in other designs.
  • Robustness - The software is able to operate under stress or tolerate unpredictable or invalid input. For example, it can be designed with a resilience to low memory conditions.
  • Security - The software is able to withstand hostile acts and influences.
  • Usability - The software user interface must be intuitive (and often aesthetically pleasing) to its target user/audience. Default values for the parameters must be chosen so that they are a good choice for the majority of the users. In many cases, online help should be included and also carefully designed.

Modeling language

A modeling language is any artificial language that can be used to express information or knowledge or systems in a structure that is defined by a consistent set of rules. The rules are used for interpretation of the meaning of components in the structure. A modeling language can be graphical or textual. Examples of graphical modelling languages for software design are:

Design patterns

A software designer or architect may identify a design problem which has been solved by others before. A template or pattern describing a solution to a common problem is known as a design pattern. The reuse of such patterns can speed up the software development process, having been tested and proved in the past.

Usage

Software design documentation may be reviewed or presented to allow constraints, specifications and even requirements to be adjusted prior to programming. Redesign may occur after review of a programmed simulation or prototype. It is possible to design software in the process of programming, without a plan or requirement analysis, but for more complex projects this would not be considered a professional approach. A separate design prior to programming allows for multidisciplinary designers and Subject Matter Experts (SMEs) to collaborate with highly-skilled programmers for software that is both useful and technically sound.

Software Sizing

Software sizing is an important activity in software engineering that is used to estimate the size of a software application or component in order to be able to implement other software project management activities (such as estimating or tracking). Size is an inherent characteristic of a software in just like weight is an inherent characteristic of any tangible material.

Contents

Background

It is essential to differentiate between software sizing and software effort estimation. Measuring the size of a piece of software is different from measuring the effort needed to build it. We need to measure the size of software in order to be able to measure productivity.

Example

For example, if a software engineer has built a small web-based calculator application, we can say that the project effort size was 280 man-hours. However, this does not give any information about the size of the software product itself. Conversely, we can say that the application size is 5,000 LOCs (Lines Of Code),ff or 30 FPs(Function Points).

Software Sizing Methods

Historically, the most common software sizing methodology was counting the lines of code written in the application source. Although this method is easy and straightforward, it is no longer practical due to the great advancements in software engineering and modern programming languages. Another commonly used sizing method is the IFPUG method called Function point analysis. The IFPUG FPA functional sizing method(FSM) has proven successful and accurate for more than thirty years. However, its accuracy and effectiveness has lately become highly controversial. Reasons behind the criticism of FP analysis include lack of sensitivity towards algorithmic complexity and its relative difficulty.

New trends of software sizing have recently emerged. For example, Use Case based software sizing relies on counting the number and characteristics of Use Cases found in a piece of software. Also, different variations of Function Points have emerged over the years, such as Object Oriented Function Points, or OOFP. Other methods such as COSMIChave evolved to address sizing software that has a very limited amound of stored data such as 'process control' and 'real time' systems. Both the IFPUG Method and the COSMIC Method are ISO/IEC standards. For more information about the similarities and differences between these ISO FSM methods see IFPUG and COSMIC - Similarities and Differences. In order to determine the best Functional Sizing Method for your software you need to consider a number of factors, including the functional domain of your applications, the process maturity of your organisation and the extent of use of the FSM Method. For more guidelines on how to choose an FSM Method[1] see ISO/IEC 14143-6: - SOFTWARE ENGINEERING — SOFTWARE MEASUREMENT — FUNCTIONAL SIZE MEASUREMENT — PART 6: GUIDE FOR USE OF ISO/IEC 14143 SERIES AND RELATED INTERNATIONAL STANDARDS. There are many uses and benefits of function points[2] beyond measuring project productivity and estimating planned projects, these include monitoring project progress and evaluating the requirements coverage of COTS packages.

COCOMO Model

The COnstructive COst MOdel (COCOMO) is an algorithmic Software Cost Estimation Model developed by Barry Boehm. The model uses a basic regression formula, with parameters that are derived from historical project data and current project characteristics.

COCOMO was first published in 1981 Barry W. Boehm's Book Software engineering economics[1] as a model for estimating effort, cost, and schedule for software projects. It drew on a study of 63 projects at TRW Aerospace where Barry Boehm was Director of Software Research and Technology in 1981. The study examined projects ranging in size from 2,000 to 100,000 lines of code, and programming languages ranging from assembly to PL/I. These projects were based on the waterfall model of software development which was the prevalent software development process in 1981.

References to this model typically call it COCOMO 81. In 1997 COCOMO II was developed and finally published in 2001 in the book Software Cost Estimation with COCOMO II[2]. COCOMO II is the successor of COCOMO 81 and is better suited for estimating modern software development projects. It provides more support for modern software development processes and an updated project database. The need for the new model came as software development technology moved from mainframe and overnight batch processing to desktop development, code reusability and the use of off-the-shelf software components. This article refers to COCOMO 81.

COCOMO consists of a hierarchy of three increasingly detailed and accurate forms. The first level, Basic COCOMO is good for quick, early, rough order of magnitude estimates of software costs, but its accuracy is limited due to its lack of factors to account for difference in project attributes (Cost Drivers). Intermediate COCOMO takes these Cost Drivers into account and Detailed COCOMO additionally accounts for the influence of individual project phases.

Contents

Basic COCOMO

Basic COCOMO computes software development effort (and cost) as a function of program size. Program size is expressed in estimated thousands of lines of code (KLOC).

COCOMO applies to three classes of software projects:

  • Organic projects - "small" teams with "good" experience working with "less than rigid" requirements
  • Semi-detached projects - "medium" teams with mixed experience working with a mix of rigid and less than rigid requirements
  • Embedded projects - developed within a set of "tight" constraints (hardware, software, operational, ...)

The basic COCOMO equations take the form

Effort Applied = ab(KLOC)bb [ man-months ]
Development Time = cb(Effort Applied)db [months]
People required = Effort Applied / Development Time [count]

The coefficients ab, bb, cb and db are given in the following table.

   Software project    ab      bb      cb      db

Organic 2.4 1.05 2.5 0.38
Semi-detached 3.0 1.12 2.5 0.35
Embedded 3.6 1.20 2.5 0.32

Basic COCOMO is good for quick estimate of software costs. However it does not account for differences in hardware constraints, personnel quality and experience, use of modern tools and techniques, and so on.

Intermediate COCOMO

Intermediate COCOMO computes software development effort as function of program size and a set of "cost drivers" that include subjective assessment of product, hardware, personnel and project attributes. This extension considers a set of four "cost drivers", each with a number of subsidiary attributes:-

  • Product attributes
    • Required software reliability
    • Size of application database
    • Complexity of the product
  • Hardware attributes
    • Run-time performance constraints
    • Memory constraints
    • Volatility of the virtual machine environment
    • Required turnabout time
  • Personnel attributes
    • Analyst capability
    • Software engineering capability
    • Applications experience
    • Virtual machine experience
    • Programming language experience
  • Project attributes
    • Use of software tools
    • Application of software engineering methods
    • Required development schedule

Each of the 15 attributes receives a rating on a six-point scale that ranges from "very low" to "extra high" (in importance or value). An effort multiplier from the table below applies to the rating. The product of all effort multipliers results in an effort adjustment factor (EAF). Typical values for EAF range from 0.9 to 1.4.

Cost Drivers Ratings
Very Low Low Nominal High Very High Extra High
Product attributes
Required software reliability 0.75 0.88 1.00 1.15 1.40
Size of application database 0.94 1.00 1.08 1.16
Complexity of the product 0.70 0.85 1.00 1.15 1.30 1.65
Hardware attributes
Run-time performance constraints 1.00 1.11 1.30 1.66
Memory constraints 1.00 1.06 1.21 1.56
Volatility of the virtual machine environment 0.87 1.00 1.15 1.30
Required turnabout time 0.87 1.00 1.07 1.15
Personnel attributes
Analyst capability 1.46 1.19 1.00 0.86 0.71
Applications experience 1.29 1.13 1.00 0.91 0.82
Software engineer capability 1.42 1.17 1.00 0.86 0.70
Virtual machine experience 1.21 1.10 1.00 0.90
Programming language experience 1.14 1.07 1.00 0.95
Project attributes
Use of software tools 1.24 1.10 1.00 0.91 0.82
Application of software engineering methods 1.24 1.10 1.00 0.91 0.83
Required development schedule 1.23 1.08 1.00 1.04 1.10

The Intermediate Cocomo formula now takes the form:

E=ai(KLoC)(bi).EAF

where E is the effort applied in person-months, KLoC is the estimated number of thousands of delivered lines of code for the project, and EAF is the factor calculated above. The coefficient ai and the exponent bi are given in the next table.

Software project ai bi
Organic 3.2 1.05
Semi-detached 3.0 1.12
Embedded 2.8 1.20

The Development time D calculation uses E in the same way as in the Basic COCOMO.

[edit] Detailed COCOMO

Detailed COCOMO - incorporates all characteristics of the intermediate version with an assessment of the cost driver's impact on each step (analysis, design, etc.) of the software engineering process.

Friday, August 7, 2009

Prototyping

What is Prototyping?


Prototyping is the process of building a model of a system. In terms of an information system, prototypes are employed to help system designers build an information system that intuitive and easy to manipulate for end users. Prototyping is an iterative process that is part of the analysis phase of the systems development life cycle.


During the requirements determination portion of the systems analysis phase, system analysts gather information about the organization's current procedures and business processes related the proposed information system. In addition, they study the current information system, if there is one, and conduct user interviews and collect documentation. This helps the analysts develop an initial set of system requirements.


Prototyping can augment this process because it converts these basic, yet sometimes intangible, specifications into a tangible but limited working model of the desired information system. The user feedback gained from developing a physical system that the users can touch and see facilitates an evaluative response that the analyst can employ to modify existing requirements as well as developing new ones.


Prototyping comes in many forms - from low tech sketches or paper screens(Pictive) from which users and developers can paste controls and objects, to high tech operational systems using CASE (computer-aided software engineering) or fourth generation languages and everywhere in between. Many organizations use multiple prototyping tools. For example, some will use paper in the initial analysis to facilitate concrete user feedback and then later develop an operational prototype using fourth generation languages, such as Visual Basic, during the design stage.


Some Advantages of Prototyping:


Reduces development time.

Reduces development costs.

Requires user involvement.

Developers receive quantifiable user feedback.

Facilitates system implementation since users know what to expect.

Results in higher user satisfaction.

Exposes developers to potential future system enhancements.


Some Disadvantages of Prototyping

Can lead to insufficient analysis.

Users expect the performance of the ultimate system to be the same as the prototype.

Developers can become too attached to their prototypes

Can cause systems to be left unfinished and/or implemented before they are ready.

Sometimes leads to incomplete documentation.

If sophisticated software prototypes (4th GL or CASE Tools) are employed, the time saving benefit of prototyping can be lost.


Because prototypes inherently increase the quality and amount of communication between the developer/analyst and the end user, its' use has become widespread. In the early 1980's, organizations used prototyping approximately thirty percent (30%) of the time in development projects. By the early 1990's, its use had doubled to sixty percent (60%). Although there are guidelines on when to use software prototyping, two experts believed some of the rules developed were nothing more than conjecture.


In the article "An Investigation of Guidelines for Selecting a Prototyping Strategy", Bill C. Hardgrave and Rick L. Wilson compare prototyping guidelines that appear in information systems literature with their actual use by organizations that have developed prototypes. Hardgrave and Wilson sent out 500 prototyping surveys to information systems managers throughout the United States. The represented organizations were comprised of a variety of industries - educational, health service, financial, transportation, retail, insurance, government, manufacturing and service. A copy of the survey was also presented to a primary user and a key developer of two systems that the company had implemented within the two years of the survey.


There were usable survey results received from 88 organizations representing 118 different projects. Hardgrave and Wilson wanted to find out how many of the popular prototyping guidelines outlined in literature were actually used by organizations and whether compliance affected system success (measured by the user's stated level of satisfaction). It should be noted that, although not specifically stated, the study was based on the use of "high tech" software models, not "low tech" paper or sketch prototypes.


Based on the results of their research, Hardgrave and Wilson found that industry followed only six of the seventeen recommended in information system literature. The guidelines practiced by industry whose adherence was found to have a statistical effect on system success were:

Prototyping should be employed only when users are able to actively participate in the project.

Developers should either have prototyping experience or given training.

Users involved in the project should also have prototyping experience or be educated on the use and purpose of prototyping.

Prototypes should become part of the final system only if the developers are given access to prototyping support tools.

If experimentation and learning are needed before there can be full commitment to a project, prototyping can be successfully used.

Prototyping is not necessary if the developer is already familiar with the language ultimately used for system design.


Instead of software prototyping , several information systems consultants and researchers recommend using "low tech" prototyping tools (also known as paper prototypes or Pictive), especially for initial systems analysis and design. The paper approach allows both designers and users to literally cut and paste the system interface. Object command and controls can be easily and quickly moved to suit user needs.


Among its' many benefits, this approach lowers the cost and time involved in prototyping, allows for more iterations, and gives developers the chance to get immediate user feedback on refinements to the design. It effectively eliminates many of the disadvantages of prototyping since paper prototypes are inexpensive to create, developers are less likely to become attached to their work, users do not develop performance expectations, and best of all, your paper prototypes are usually "bug-free" (unlike most software prototypes)!