This document is the preface to a book on software engineering technologies with a focus on web applications. It provides an overview of the book's contents and approach. The book is designed for upper-division undergraduate and graduate courses in software engineering and is intended to focus on core concepts rather than being a reference. It includes code examples in Java and is organized into two parts, with the first covering basic object-oriented software engineering concepts and the second focusing on technologies for web applications.
The college website provides information about the college through multiple pages that are accessible from the home page. The pages include sections about the college departments, courses offered, contact information, and student resources. The website was designed by a BSc student to help visitors easily access relevant information about the college in an organized manner through clear navigation.
Report file on Web technology(html5 and css3)PCG Solution
This document provides a summary of the history and development of web technology:
- The term "Web 2.0" was first coined in 1999 to describe more interactive web sites that use technology beyond static pages.
- Key concepts of Web 2.0 include the web being a platform for integration and applications, with users generating content to create value.
- Major events included the first O'Reilly Web 2.0 conference in 2004 where the concepts of Web 2.0 were outlined, contrasting it with the business models of early companies like Netscape that focused on software distribution.
This document provides an overview and outline of a banking management system project. It acknowledges the guidance provided by faculty members. The abstract describes the goals of defining and managing requirements to ensure customer needs are met. The introduction discusses the project objectives of authorizing users, locating accounts, and reducing clerical work. It also covers project benefits and scope such as accessing privileged banking and providing banking services. The system development life cycle stages are then outlined, including preliminary investigation, determining requirements, designing the system, development, testing, and implementation.
Why java is important in programming language?NexSoftsys
Java is highly robust and flexible programming language as it must be compiled through as cross-platform suitable for JVM (Java Virtual Machine). Also, android mobile apps are also built using Java platform since the android OS (Operating System) runs on Java language environment.
This document provides guidelines for an internship report for a web development internship on an address book project. It includes sections that should be included like acknowledgements, certificates, project abstract, introduction, tasks completed, technical skills learned, and conclusion. It also provides formatting guidelines and requirements for submitting supplementary documents and reports. The internship focused on building a web-based address book application with features for adding, deleting, updating, and searching addresses while learning skills in HTML, CSS, JavaScript, and PHP. The intern gained experience in web design, problem solving, and communication skills through completing assigned tasks on the project.
This document summarizes an Android news app project. It lists the project mentor and team members. The app aims to provide latest news updates in English and Hindi, as well as options to watch TV and play games. It discusses what was learned technically and generally during the project. It also outlines the software requirements, intended end users, and plans for future enhancements.
The business-to-consumer aspect of product commerce (e-commerce) is the most visible business use of the World Wide Web. The primary goal of an e-commerce site is to sell goods online.
This project deals with developing an e-commerce website for Online Product Sale. It provides the user with a catalog of different product available for purchase in the store. In order to facilitate online purchase a shopping cart is provided to the user. The system is implemented using a 3-tier approach, with a backend database, a middle tier of
Microsoft Internet Information Services (IIS) and PHP, and a web browser as the front end client. In order to develop an e-commerce website, a number of Technologies must be studied and understood.
These include multi-tiered architecture, server and client side scripting techniques, implementation technologies such as PHP(OOP), JQUERY, BOOTSTRAP, HTML5, relational databases (such as MySQLi, Access). This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart application and also to know about the technologies used to develop such an application. This document will discuss each of the underlying technologies to create and implement an e-commerce website.
Apps are software programs that can run on computers, phones, or other electronic devices. There are three main types of apps: desktop apps that run independently on computers, web apps that require an internet connection, and mobile apps that run on smartphones or tablets. Mobile apps can be classified as native apps that are developed for specific devices or hybrid apps that contain features of both web and native apps and can be used offline with limited functionality. Common apps are used for education, social networking, entertainment, banking, e-commerce, and more.
The college website provides information about the college through multiple pages that are accessible from the home page. The pages include sections about the college departments, courses offered, contact information, and student resources. The website was designed by a BSc student to help visitors easily access relevant information about the college in an organized manner through clear navigation.
Report file on Web technology(html5 and css3)PCG Solution
This document provides a summary of the history and development of web technology:
- The term "Web 2.0" was first coined in 1999 to describe more interactive web sites that use technology beyond static pages.
- Key concepts of Web 2.0 include the web being a platform for integration and applications, with users generating content to create value.
- Major events included the first O'Reilly Web 2.0 conference in 2004 where the concepts of Web 2.0 were outlined, contrasting it with the business models of early companies like Netscape that focused on software distribution.
This document provides an overview and outline of a banking management system project. It acknowledges the guidance provided by faculty members. The abstract describes the goals of defining and managing requirements to ensure customer needs are met. The introduction discusses the project objectives of authorizing users, locating accounts, and reducing clerical work. It also covers project benefits and scope such as accessing privileged banking and providing banking services. The system development life cycle stages are then outlined, including preliminary investigation, determining requirements, designing the system, development, testing, and implementation.
Why java is important in programming language?NexSoftsys
Java is highly robust and flexible programming language as it must be compiled through as cross-platform suitable for JVM (Java Virtual Machine). Also, android mobile apps are also built using Java platform since the android OS (Operating System) runs on Java language environment.
This document provides guidelines for an internship report for a web development internship on an address book project. It includes sections that should be included like acknowledgements, certificates, project abstract, introduction, tasks completed, technical skills learned, and conclusion. It also provides formatting guidelines and requirements for submitting supplementary documents and reports. The internship focused on building a web-based address book application with features for adding, deleting, updating, and searching addresses while learning skills in HTML, CSS, JavaScript, and PHP. The intern gained experience in web design, problem solving, and communication skills through completing assigned tasks on the project.
This document summarizes an Android news app project. It lists the project mentor and team members. The app aims to provide latest news updates in English and Hindi, as well as options to watch TV and play games. It discusses what was learned technically and generally during the project. It also outlines the software requirements, intended end users, and plans for future enhancements.
The business-to-consumer aspect of product commerce (e-commerce) is the most visible business use of the World Wide Web. The primary goal of an e-commerce site is to sell goods online.
This project deals with developing an e-commerce website for Online Product Sale. It provides the user with a catalog of different product available for purchase in the store. In order to facilitate online purchase a shopping cart is provided to the user. The system is implemented using a 3-tier approach, with a backend database, a middle tier of
Microsoft Internet Information Services (IIS) and PHP, and a web browser as the front end client. In order to develop an e-commerce website, a number of Technologies must be studied and understood.
These include multi-tiered architecture, server and client side scripting techniques, implementation technologies such as PHP(OOP), JQUERY, BOOTSTRAP, HTML5, relational databases (such as MySQLi, Access). This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart application and also to know about the technologies used to develop such an application. This document will discuss each of the underlying technologies to create and implement an e-commerce website.
Apps are software programs that can run on computers, phones, or other electronic devices. There are three main types of apps: desktop apps that run independently on computers, web apps that require an internet connection, and mobile apps that run on smartphones or tablets. Mobile apps can be classified as native apps that are developed for specific devices or hybrid apps that contain features of both web and native apps and can be used offline with limited functionality. Common apps are used for education, social networking, entertainment, banking, e-commerce, and more.
This document provides a project report on the development of a "WEBBLOG" system for TecHindustan Private Ltd. The report includes an introduction to the company, the project, existing systems and their drawbacks. It describes the scope and benefits of the new system. The system modules including user and admin functionalities are outlined. Requirements for inputs, outputs, and maintenance are specified. Finally, the report discusses system analysis including data, operational, technical, economic and security analyses to establish the feasibility of the new weblog system.
There are two types of compiler passes: multi-pass compilers perform multiple traversals of the source code to perform different stages of compilation like scanning, parsing, semantic analysis, etc. One-pass compilers only traverse the source code once, performing all compilation stages on each line before moving to the next.
Bootstrapping is the process of using a compiler written in a language to compile itself, allowing the creation of a self-hosting compiler for that language. It involves first creating a simple bootstrap compiler for a language subset, then using that to compile a full compiler for the language which can then compile future versions.
This document provides an overview of the FITNESSBABA Android application project. It includes sections on the overview of the Android OS and features, the technology used to develop the app like Android Studio and Java Development Kit, an introduction to the app and its four activities, and system specifications. The objective of the app is to provide gym tricks and exercises to users to help them stay fit at home without a trainer.
Memory management is the method by which an operating system handles and allocates primary memory. It tracks the status of memory locations as allocated or free, and determines how memory is distributed among competing processes. Memory can be allocated contiguously or non-contiguously. Contiguous allocation assigns consecutive blocks of memory to a process, while non-contiguous allocation allows a process's memory blocks to be scattered across different areas using techniques like paging or segmentation. Paging divides processes and memory into fixed-size pages and frames to allow non-contiguous allocation while reducing fragmentation.
Here are the key steps to add coding quality management to the news portal project:
1. Implement code reviews. Have another developer review all code additions/changes before merging to main branch. This catches errors and improves code quality.
2. Add unit tests. Write tests to validate all core functionality works as expected. Run tests automatically on commits to catch regressions early.
3. Follow coding standards and conventions. Define standards for code structure, naming, documentation etc. and enforce via linter. This improves readability and maintainability.
4. Implement continuous integration. Automatically build and test code on each commit. Fail builds on errors to prevent broken code from being merged.
5. Use version control best practices
The document summarizes the boot process of an operating system. It begins with the BIOS executing code from the ROM chip and loading the master boot record (MBR) from the hard disk. The MBR then loads the volume boot record (VBR) from the active partition, which loads the second stage boot loader like NTLDR or GRUB. This boot loader then loads and executes the kernel, which initializes the filesystem and launches core processes.
The document summarizes a weather Android app project created by two students. It includes sections acknowledging the project guide and department head for their support and guidance. It describes the need for the app to help farmers decide when to irrigate based on weather forecasts. The app overview explains it can be used not just by farmers but for other activities like planning events. It analyzes the economic, operational and technical feasibility of the app. Other sections provide details on requirements, design diagrams, the user interface, and benefits. It concludes the app will enhance farming and is an economically, technically feasible user-friendly solution.
This document summarizes a seminar presentation on developing a fitness app. The presentation was given to the Department of Computer Engineering at Jagadambha College of Engineering & Technology in India under the guidance of Prof. A. V. Mahalle. The presentation discusses the objectives of developing a fitness app to help users track their health progress and stay motivated through features like setting goals, exercise routines, calorie counting, and health tips. It reviews previous literature on physical fitness and health and proposes the development of an Android app called "Fitness App" that would allow users to create accounts, personalize settings, track steps, and connect with a health coach for a fully-integrated health tool to improve users' health.
This document presents a Java project report on e-learning. It introduces Java and its features such as being platform independent, object oriented, and secure. It then describes the database for the e-learning project, which includes tables for admins, courses, course details, registration, and questions/answers. It outlines the process for users including registration, login, accessing courses, and includes sections on administration, contact, and help. It discusses the scope and future of e-learning, how it can be used for education and corporate training from home.
This document provides a project report for developing a Hospital Management System. It includes requirements for key functions like patient registration, assigning patient IDs, generating reports on patient and bed information, and updating patient records in the database. The system is intended to automate manual paper-based processes currently used by the hospital. It will utilize web-based and MySQL database technologies with a Windows development environment.
This document describes a project to develop a bank management system using Java. It includes sections on functional and non-functional requirements, code implementation with classes to handle new accounts, viewing details, deposits and withdrawals, and sample outputs/screenshots. The system allows customers to securely manage bank accounts online through a menu-driven interface that incorporates input validation, exception handling and other programming techniques.
This document discusses different types of programming languages:
- Low-level languages like assembly are close to machine instructions and require knowledge of computer hardware. High-level languages abstract programming concepts and are easier for humans.
- Third-generation languages like FORTRAN and COBOL are machine-independent but still textual. Fourth-generation languages allow visual programming.
- Fifth-generation languages are designed for artificial intelligence and problem-solving.
The document provides an overview of advanced Java topics for an industrial training course, including introductions to Java, J2EE, MVC architecture, Java Server Pages, JavaBeans, servlets, how servlets work, cookies and sessions, creating a simple servlet, and JDBC. It describes these technologies and how they are used to develop web applications and interact with databases.
The document provides step-by-step instructions for installing Windows 7 on a personal computer. It outlines 19 steps for installing Windows 7, including entering the BIOS, booting from the installation DVD, selecting language and time settings, accepting license terms, selecting a drive to install to, and completing the installation process. The instructions are accompanied by figures illustrating each step in the installation process.
This document provides an overview of virtual machines. It defines a virtual machine as a software implementation of a machine that executes programs like physical hardware. There are two main types: system virtual machines which provide a complete OS environment, and process virtual machines which provide a platform-independent programming environment. Popular virtual machine software discussed includes VMware Workstation, Xen, VirtualBox, and Citrix. VMware Workstation allows multiple operating systems to run simultaneously on a single PC without restarting. Xen is an open-source virtual machine monitor that allows multiple guest operating systems to run concurrently on the same hardware. It has a three-layer architecture consisting of a virtual machine layer, hypervisor layer, and hardware/physical layer.
This document discusses the differences between requirement engineers and architects in the software engineering field. It aims to clarify misconceptions about their roles by outlining their different responsibilities and job profiles. The document begins by describing requirement engineers and architects, examining their roles and tasks. It looks at similarities and differences between the profiles, as well as other related job roles. The conclusion provides insights gained from comparing requirement engineers and architects.
This document discusses the differences between requirements engineers and architects in software engineering. It aims to clarify misconceptions about their roles by listing the differences in their responsibilities, job profiles, and skills. The document will examine what tasks each profile performs, any differences and similarities between them, and take a brief look at other related profiles. It concludes by providing insights gained from comparing requirements engineers and architects.
This document provides a project report on the development of a "WEBBLOG" system for TecHindustan Private Ltd. The report includes an introduction to the company, the project, existing systems and their drawbacks. It describes the scope and benefits of the new system. The system modules including user and admin functionalities are outlined. Requirements for inputs, outputs, and maintenance are specified. Finally, the report discusses system analysis including data, operational, technical, economic and security analyses to establish the feasibility of the new weblog system.
There are two types of compiler passes: multi-pass compilers perform multiple traversals of the source code to perform different stages of compilation like scanning, parsing, semantic analysis, etc. One-pass compilers only traverse the source code once, performing all compilation stages on each line before moving to the next.
Bootstrapping is the process of using a compiler written in a language to compile itself, allowing the creation of a self-hosting compiler for that language. It involves first creating a simple bootstrap compiler for a language subset, then using that to compile a full compiler for the language which can then compile future versions.
This document provides an overview of the FITNESSBABA Android application project. It includes sections on the overview of the Android OS and features, the technology used to develop the app like Android Studio and Java Development Kit, an introduction to the app and its four activities, and system specifications. The objective of the app is to provide gym tricks and exercises to users to help them stay fit at home without a trainer.
Memory management is the method by which an operating system handles and allocates primary memory. It tracks the status of memory locations as allocated or free, and determines how memory is distributed among competing processes. Memory can be allocated contiguously or non-contiguously. Contiguous allocation assigns consecutive blocks of memory to a process, while non-contiguous allocation allows a process's memory blocks to be scattered across different areas using techniques like paging or segmentation. Paging divides processes and memory into fixed-size pages and frames to allow non-contiguous allocation while reducing fragmentation.
Here are the key steps to add coding quality management to the news portal project:
1. Implement code reviews. Have another developer review all code additions/changes before merging to main branch. This catches errors and improves code quality.
2. Add unit tests. Write tests to validate all core functionality works as expected. Run tests automatically on commits to catch regressions early.
3. Follow coding standards and conventions. Define standards for code structure, naming, documentation etc. and enforce via linter. This improves readability and maintainability.
4. Implement continuous integration. Automatically build and test code on each commit. Fail builds on errors to prevent broken code from being merged.
5. Use version control best practices
The document summarizes the boot process of an operating system. It begins with the BIOS executing code from the ROM chip and loading the master boot record (MBR) from the hard disk. The MBR then loads the volume boot record (VBR) from the active partition, which loads the second stage boot loader like NTLDR or GRUB. This boot loader then loads and executes the kernel, which initializes the filesystem and launches core processes.
The document summarizes a weather Android app project created by two students. It includes sections acknowledging the project guide and department head for their support and guidance. It describes the need for the app to help farmers decide when to irrigate based on weather forecasts. The app overview explains it can be used not just by farmers but for other activities like planning events. It analyzes the economic, operational and technical feasibility of the app. Other sections provide details on requirements, design diagrams, the user interface, and benefits. It concludes the app will enhance farming and is an economically, technically feasible user-friendly solution.
This document summarizes a seminar presentation on developing a fitness app. The presentation was given to the Department of Computer Engineering at Jagadambha College of Engineering & Technology in India under the guidance of Prof. A. V. Mahalle. The presentation discusses the objectives of developing a fitness app to help users track their health progress and stay motivated through features like setting goals, exercise routines, calorie counting, and health tips. It reviews previous literature on physical fitness and health and proposes the development of an Android app called "Fitness App" that would allow users to create accounts, personalize settings, track steps, and connect with a health coach for a fully-integrated health tool to improve users' health.
This document presents a Java project report on e-learning. It introduces Java and its features such as being platform independent, object oriented, and secure. It then describes the database for the e-learning project, which includes tables for admins, courses, course details, registration, and questions/answers. It outlines the process for users including registration, login, accessing courses, and includes sections on administration, contact, and help. It discusses the scope and future of e-learning, how it can be used for education and corporate training from home.
This document provides a project report for developing a Hospital Management System. It includes requirements for key functions like patient registration, assigning patient IDs, generating reports on patient and bed information, and updating patient records in the database. The system is intended to automate manual paper-based processes currently used by the hospital. It will utilize web-based and MySQL database technologies with a Windows development environment.
This document describes a project to develop a bank management system using Java. It includes sections on functional and non-functional requirements, code implementation with classes to handle new accounts, viewing details, deposits and withdrawals, and sample outputs/screenshots. The system allows customers to securely manage bank accounts online through a menu-driven interface that incorporates input validation, exception handling and other programming techniques.
This document discusses different types of programming languages:
- Low-level languages like assembly are close to machine instructions and require knowledge of computer hardware. High-level languages abstract programming concepts and are easier for humans.
- Third-generation languages like FORTRAN and COBOL are machine-independent but still textual. Fourth-generation languages allow visual programming.
- Fifth-generation languages are designed for artificial intelligence and problem-solving.
The document provides an overview of advanced Java topics for an industrial training course, including introductions to Java, J2EE, MVC architecture, Java Server Pages, JavaBeans, servlets, how servlets work, cookies and sessions, creating a simple servlet, and JDBC. It describes these technologies and how they are used to develop web applications and interact with databases.
The document provides step-by-step instructions for installing Windows 7 on a personal computer. It outlines 19 steps for installing Windows 7, including entering the BIOS, booting from the installation DVD, selecting language and time settings, accepting license terms, selecting a drive to install to, and completing the installation process. The instructions are accompanied by figures illustrating each step in the installation process.
This document provides an overview of virtual machines. It defines a virtual machine as a software implementation of a machine that executes programs like physical hardware. There are two main types: system virtual machines which provide a complete OS environment, and process virtual machines which provide a platform-independent programming environment. Popular virtual machine software discussed includes VMware Workstation, Xen, VirtualBox, and Citrix. VMware Workstation allows multiple operating systems to run simultaneously on a single PC without restarting. Xen is an open-source virtual machine monitor that allows multiple guest operating systems to run concurrently on the same hardware. It has a three-layer architecture consisting of a virtual machine layer, hypervisor layer, and hardware/physical layer.
This document discusses the differences between requirement engineers and architects in the software engineering field. It aims to clarify misconceptions about their roles by outlining their different responsibilities and job profiles. The document begins by describing requirement engineers and architects, examining their roles and tasks. It looks at similarities and differences between the profiles, as well as other related job roles. The conclusion provides insights gained from comparing requirement engineers and architects.
This document discusses the differences between requirements engineers and architects in software engineering. It aims to clarify misconceptions about their roles by listing the differences in their responsibilities, job profiles, and skills. The document will examine what tasks each profile performs, any differences and similarities between them, and take a brief look at other related profiles. It concludes by providing insights gained from comparing requirements engineers and architects.
This document discusses the history and state of the art of learning environments. It describes how pioneers like Montessori and Piaget influenced Seymour Papert's work using computers to teach math concepts through Logo and the "turtle" interface. Papert created an interactive learning environment that allowed students to explore concepts through experimentation rather than following a set curriculum. However, the document argues that current educational technology still relies on old instructional methods combined with new technologies, rather than fully utilizing computers' potential. The goal of this thesis is to create a new interactive learning environment for teaching computer programming that avoids limitations of current tools and allows students to actively explore programming concepts.
Restaurant e-menu on iPad, Rapid Application Development (RAD), Model-View-Controller (MVC), ASP.Net, Xcode, Web services, iPad application and mobile application development.
Back-end and front-end development are two distinct but interconnected components of web development. Understanding their differences and roles is fundamental for anyone entering the field.
Web Collaboration for Software Engineering (Msc Thesis)Tiago Teixeira
Msc thesis, written in English.
Main contents are:
- Research on CSCW, Groupware, Social Software and Software Engineering
- Analysis of 47 Software Engineering tools (categories: Bug Tracking, Collaboration, Construction, Design, Engineering Management, and Requirements)
- Web prototype developed in Ruby on Rails web framework. Includes screenshots of the plugins.
- Experiment for testing the prototype
It was written at Faculdade de Engenharia da Universidade do Porto (FEUP), programme Master in Informatics and Computing Engineering (MIEIC).
This document is the preface to the book "Python for Informatics: Remixing an Open Book". It discusses how the book was created by modifying the open source book "Think Python" by Allen B. Downey to have a stronger focus on data analysis and exploring information using Python. Key changes included replacing number examples with data examples, reorganizing topics to get to data analysis quicker, and adding new chapters on data-related Python topics like regular expressions, web scraping, and databases. The goal was to produce a text suitable for a first technology course with an informatics rather than computer science focus.
This document provides information about the book "Python for Informatics: Exploring Information". It was originally based on the book "Think Python: How to Think Like a Computer Scientist" by Allen B. Downey but has been significantly revised by Charles Severance to focus on using Python for data analysis and exploring information. The revisions include replacing code examples and exercises with data-oriented problems, reorganizing some topics, and adding new chapters on real-world Python applications like web scraping, APIs, and databases. The goal is to teach useful data skills to students who may not become professional programmers.
The document provides guidance for students undertaking an individual software engineering project. It emphasizes that the focus is on demonstrating the software engineering process, not just producing working code. Students must submit documents showing their analysis, design, and development process. The project aims to give students experience working through the stages of a software project, from requirements to testing. Examiners are most interested in the coherence of the development process demonstrated through the documents.
An Analysis of Component-based Software Development -Maximize the reuse of ex...Mohammad Salah uddin
This document provides an analysis of component-based software development by Mohammad Salah Uddin for his Master's degree. It includes an introduction outlining the aims and objectives of analyzing CBSE and maximizing reuse of existing software. It then discusses key aspects of components such as definitions, characteristics, relationships to objects, differences from traditional software engineering, benefits of CBSE, and importance of reusability. The document also examines component technologies, frameworks, and a case study using the Avalon framework.
The document discusses software engineering and the characteristics of well-engineered software. It defines software engineering as the branch of engineering focused on developing software that satisfies requirements, is delivered on time and on budget, and includes documentation. Well-engineered software is efficient, maintainable, developed on time and within budget, functional for its intended purpose, adaptable to changes, and ensures safety. The document also categorizes different types of software applications and discusses software components.
The document is a software requirements specification for a system to perform record matching over query results from multiple web databases. It describes the purpose, conventions, intended users, product scope, and references. It provides an overall description of the product perspective and functions, describes user classes and characteristics, operating environment, design constraints, and documentation. It outlines external interface requirements including user interfaces, hardware/software interfaces, and communications interfaces. It details system features and other non-functional requirements around performance, safety, security, quality, and business rules.
Big data - ‘Big Data’ is similar to ‘small data’, but bigger in size.
But having data bigger it requires different approaches:Techniques, tools and architecture.
Web development- React.js,angular js,Vue.js
Mobile application development-API in mobile applications (cURL API),Develop in mobile applications (react-native)
elementary OS
Concurrency
The document discusses interface instability in software libraries. It investigates the origin, impact, and costs of changes to public interfaces in libraries. The author analyzes a dataset of Maven library dependencies to study how frequently library interfaces change without warning, the impact of these changes on dependent systems, and how interface changes relate to changes in library functionality. The analysis employs techniques like measuring differences between library versions using compression to quantify functionality changes.
The document discusses functional programming versus object-oriented programming paradigms for developing a human resources management system. It explains that functional programming uses immutable data and focuses on evaluating functions, while object-oriented programming uses mutable data and is based on objects with attributes and behaviors. The document concludes that object-oriented programming is preferred for the HR system since it organizes code around objects and methods, which is suitable when there are many things with few operations like in a HR department.
This dissertation develops a prototype electronic menu (e-menu) application for use on iPads in restaurants. The research employed a case study of a Thai restaurant to gather requirements and test the prototype. Users found the e-menu convenient and able to improve customer service by preventing human errors. Recommendations included following software development processes and a Model-View-Controller design for the e-menu system. The dissertation documents the research process and presents system analysis documents, the prototype, and users' positive perceptions of the e-menu application.
A Practical Introduction To Hardware Software CodesignFelicia Clark
This document provides a preface to the book "A Practical Introduction to Hardware/Software Codesign" by Patrick R. Schaumont. It summarizes the book's organization, intended audience, and changes made for the second edition. The book introduces hardware/software codesign and provides examples to illustrate design methods and modeling languages. It emphasizes hands-on experiments using the GEZEL modeling language and processor simulation.
The document describes a dissertation submitted for a Bachelor of Science degree. It outlines the objectives of creating an interactive web tutorial to inform newly diagnosed diabetics about their condition in a fun way. It details the methodology, which involved designing page layouts, learning Flash and ActionScript for interactivity, and creating a Java game applet. The achievements were successfully meeting the objectives of an informative yet entertaining resource through the implemented system, which utilized HTML, CSS, JavaScript, Flash and Java applets.
This document describes the development of a web scraping tool to extract useful mobile app market data from Appannie's website. The tool automates browsing to Appannie pages using Selenium, scrapes app name, description and version history from individual app pages, and saves the data to CSV files. It iterates through Appannie's top charts from the past year for the US and Chinese markets to build a structured dataset for analysis and to help app developers. The project uses an agile development approach with weekly iterations to expand the tool's functionality and optimize performance over time.
This document provides tutorials and help for using Adobe Photoshop CC. It covers topics such as what's new in Photoshop CC, warping perspective, printing 3D objects, creating smart objects, reducing camera shake, and sharing work on Behance. Additional sections provide tutorials on the Photoshop workspace and workflow, using tools, undo and history, image size and resolution, color modes, blending modes, and more. The document serves as a general help guide for getting started with and learning key features of Photoshop CC.
The document contains several C++ code snippets and functions that demonstrate reading from and writing to files using classes, structures, and other data types. Specifically:
1) It shows how to create a class to store telephone numbers and names, write objects of that class to a file, and read them back.
2) It contains functions that open, read from, and write to files while counting elements like words, lines, and characters within the files.
3) Operations demonstrated include copying files, extracting specific data like words starting with vowels, and converting case (such as uppercase).
This document discusses C and C++ selection statements including if, if-else, and if-else-if. It provides examples of code using these conditional statements and corresponding flowcharts. It also includes exercises for the reader to complete code snippets and answer questions about the flow of execution through the conditional logic.
This document discusses quantification of functional requirements in software system engineering using linear programming problems (LPP). It begins with an introduction to software system engineering and its importance in developing large, complex software. It then discusses requirement analysis and categorizes requirements as functional and non-functional. Functional requirements are further classified into user interface, transaction performance, auditing, and authentication. An example model is provided to represent requirements. The document then discusses using operations research and the assignment problem as an LPP approach to evaluate and optimize functional requirements. Finally, it concludes that taking an iterative approach using LPPs can help effectively elicit and refine requirements.
Quantify the Functional Requirements in Software System EngineeringKarthika Parthasarathy
This document discusses an approach to analyzing and quantifying functional requirements in software system engineering. It begins by introducing system engineering as a process that transforms operational needs into system configurations. Software system engineering applies these principles to the development of large, complex software systems. The paper focuses on categorizing and prioritizing functional requirements during the requirements analysis phase of software development. Analyzing, designing, and organizing system elements according to engineering principles helps produce documentation to guide software development and manage technical functions. This process aims to reduce complexity and improve customer satisfaction.
1) The document proposes using an assignment problem linear programming technique to quantify the technical performance of processes in system engineering. The assignment problem can optimize processes by finding minimum compilation time, execution time, and memory allocation.
2) An example assignment problem is described where jobs are assigned to programmers to minimize time. The technique is applied to quantify a software development process by measuring compilation time, execution time, memory usage, and output of sample programs.
3) The results show that programs developed by two of three programmers optimized the process, with minimum memory usage, execution speed and output values, as identified by the assignment problem modeling.
The .NET Framework provides a common language runtime and class libraries for building and running applications across platforms and languages. It includes features like garbage collection, type safety, exception handling and Just-In-Time compilation. The .NET Framework supports multiple programming languages and allows components written in different languages to interact seamlessly.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
A Visual Guide to 1 Samuel | A Tale of Two HeartsSteve Thomason
These slides walk through the story of 1 Samuel. Samuel is the last judge of Israel. The people reject God and want a king. Saul is anointed as the first king, but he is not a good king. David, the shepherd boy is anointed and Saul is envious of him. David shows honor while Saul continues to self destruct.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
3. Preface
This book reviews important technologies for software development with a particular focus on
Web applications. In reviewing these technologies I put emphasis on underlying principles and
basic concepts, rather than meticulousness and completeness. In design and documentation, if
conflict arises, clarity should be preferred to precision because, as will be described, the key
problem of software development is having a functioning communication between the involved
human parties. The developer should always keep in mind that software is written for people, not
for computers. Computers just run software—a minor point. It is people who understand,
maintain, improve, and use software to solve problems. Solving a problem by an effective
abstraction and representation is a recurring theme of software engineering. The particular
technologies evolve or become obsolete, but the underlying principles and concepts will likely
resurface in new technologies. This text provides background understanding, making it easier to
follow complete and detailed expositions of current technologies that can be found elsewhere.
Audience
This book is designed for upper-division undergraduate and graduate courses in software
engineering. It intended primarily for learning, rather than reference. I also believe that the book’s
focus on core concepts should be appealing to practitioners who are interested in the “whys”
behind the software engineering tools and techniques that are commonly encountered. I assume
that the readers will have some familiarity with programming languages and I do not cover any
programming language in particular. Basic knowledge of discrete mathematics and statistics is
desirable for some advanced topics, particularly in Chapters 3 and 4. Most concepts do not
require mathematical sophistication beyond a first undergraduate course.
Approach and Organization
The first part (Chapters 1–5) is intended to accompany a semester-long hands-on team project in
software engineering. In the spirit of agile methods, the project consists of two iterations. The
first iteration is exploratory and represents the first attempt at developing the proposed software
product. This usually means developing some key functions and sizing the effort to set more
realistic goals for the second iteration. In the second iteration the students should perform the
necessary adjustments, based on what they have learned in the first iteration.
The second part (Chapters 6–8 and most Appendices) is intended for a semester-long course on
software engineering of Web applications. It also assumes a hands-on student team project. The
focus is on the server-side of Web applications and communication between clients and servers. I
omitted the user interface design issues because I feel that proper treatment of this topic requires a
book on its own. I tried to make every chapter self-contained, so that entire chapters can be
i
4. Ivan Marsic Rutgers University ii
skipped if necessary. But you will not benefit the most by reading it that way. I tried to avoid
“botanical” approach, telling you in detail what is here and what is there in software engineering,
so you can start from any point and walk it over in any way. Rather, this book takes an
evolutionary approach, where new topics systematically build on previous topics.
The text follows this outline.
Chapter 2 introduces object-oriented software engineering. It is short enough to be covered in few
weeks, yet it provides sufficient knowledge for students to start working on the first iteration of
their software product. In general, this knowledge may be sufficient for amateur software
development, on relatively small and non-mission-critical projects.
Chapters 3 through 5 offer more detailed coverage of the topics introduced in Chapter 2. They are
intended to provide the foundation for iterative improvement of a software product.
Chapters 6 – 8 provide advanced topics which can be covered selectively, if time permits, or in a
follow-up course dedicated to software engineering of web applications.
This is not a programming text, but several appendices are provided as reference material for
special topics that will inevitably arise in some software projects.
Examples, Code, and Solved Problems
I tried to make this book as practical as possible by using realistic examples and working through
their solutions. I usually find it difficult to bridge the gap between an abstract design and coding.
Hence, I include a great deal of code. The code is in the Java programming language, which
brings me to another point.
Different authors favor different languages and students often complain about having to learn yet
another language. I feel that the issue of selecting a programming language for a software
engineering textbook is artificial. Programming language is a tool and the software engineer
should master a “toolbox” of languages so to be able to choose the tool that best suits the task at
hand.
Every chapter (except for Chapters 1 and 9) is accompanied with a set of problems. Solutions to
most problems can be found on the back of this book, starting on page 429.
Design problems are open-ended, without a unique or “correct” solution, so the reader is welcome
to question all the designs offered in this book. I have myself gone through many versions of each
design, and will probably change them again in the future, as I learn more and think more. At the
least, the designs in this book represent a starting point to critique and improve.
Additional information about team projects and online links to related topics can be found at the
book website: http://www.ece.rutgers.edu/~marsic/books/SE/ .
5. Contents at a Glance
CHAPTER 1 INTRODUCTION .......................................................................................................... 1
CHAPTER 2 OBJECT-ORIENTED SOFTWARE ENGINEERING .............................................................. 52
CHAPTER 3 MODELING AND SYSTEM SPECIFICATION ................................................................... 151
CHAPTER 4 SOFTWARE MEASUREMENT AND ESTIMATION ............................................................. 198
CHAPTER 5 DESIGN WITH PATTERNS ......................................................................................... 227
CHAPTER 6 XML AND DATA REPRESENTATION ........................................................................... 300
CHAPTER 7 SOFTWARE COMPONENTS ....................................................................................... 342
CHAPTER 8 WEB SERVICES ..................................................................................................... 355
CHAPTER 9 FUTURE TRENDS.................................................................................................... 391
APPENDIX A JAVA PROGRAMMING ............................................................................................. 398
APPENDIX B NETWORK PROGRAMMING ...................................................................................... 400
APPENDIX C HTTP OVERVIEW ................................................................................................... 414
APPENDIX D DATABASE-DRIVEN WEB APPLICATIONS ................................................................... 423
APPENDIX E DOCUMENT OBJECT MODEL (DOM) ......................................................................... 424
APPENDIX F USER INTERFACE PROGRAMMING ............................................................................. 427
SOLUTIONS TO SELECTED PROBLEMS ................................................................................................. 429
REFERENCES ........................................................................................................................... 502
ACRONYMS AND ABBREVIATIONS ....................................................................................................... 512
INDEX ........................................................................................................................... 514
iii
6. Ivan Marsic Rutgers University iv
Table of Contents
PREFACE ................................................................................................................................ I
CONTENTS AT A GLANCE ..................................................................................................................... III
TABLE OF CONTENTS .......................................................................................................................... IV
CHAPTER 1 INTRODUCTION .......................................................................................................... 1
1.1 What is Software Engineering? ...................................................................................... 1
1.1.1 Why Software Engineering Is Difficult (1) ................................................................................. 6
1.1.2 Book Organization ................................................................................................................ 7
1.2 Software Engineering Lifecycle ...................................................................................... 7
1.2.1 Symbol Language ............................................................................................................... 10
1.2.2 Requirements Analysis and System Specification .................................................................. 11
1.2.3 Object-Oriented Analysis and the Domain Model.................................................................... 13
1.2.4 Object-Oriented Design ....................................................................................................... 15
1.2.5 Project Estimation and Product Quality Measurement ............................................................. 17
1.3 Case Studies .............................................................................................................. 21
1.3.1 Case Study 1: From Home Access Control to Adaptive Homes................................................ 22
1.3.2 Case Study 2: Personal Investment Assistant ........................................................................ 25
1.4 Object Model .............................................................................................................. 36
1.4.1 Relationships and Communication ........................................................................................ 37
1.4.2 Polymorphism, Inheritance, and Delegation ........................................................................... 38
1.4.3 Example............................................................................................................................. 39
1.4.4 Design of Objects................................................................................................................ 40
1.5 Student Team Projects ................................................................................................ 41
1.5.1 Stock Market Investment Fantasy League ............................................................................. 41
1.5.2 Web-based Stock Forecasters ............................................................................................. 44
1.5.3 Remarks about the Projects ................................................................................................. 46
1.6 Summary and Bibliographical Notes ............................................................................. 49
CHAPTER 2 OBJECT-ORIENTED SOFTWARE ENGINEERING .............................................................. 52
2.1 Software Development Methods ................................................................................... 53
7. Software Engineering Contents v
2.1.1 Agile Development .............................................................................................................. 54
2.1.2 Decisive Methodological Factors .......................................................................................... 56
2.2 Requirements Engineering .......................................................................................... 58
2.2.1 Types of Requirements........................................................................................................ 64
2.2.2 Problem Architecture ........................................................................................................... 65
2.2.3 User Stories for Agile Development ...................................................................................... 70
2.2.4 Requirements Gathering Strategies ...................................................................................... 72
2.3 Use Case Modeling ..................................................................................................... 73
2.3.1 Actors, Goals, and Sketchy Use Cases ................................................................................. 73
2.3.2 System Boundary and Subsystems....................................................................................... 80
2.3.3 Detailed Use Case Specification ........................................................................................... 81
2.3.4 Risk Analysis and Reduction ................................................................................................ 90
2.3.5 Why Software Engineering Is Difficult (2) ............................................................................... 91
2.4 Analysis: Building the Domain Model ............................................................................ 91
2.4.1 Identifying Concepts ............................................................................................................ 92
2.4.2 Concept Associations and Attributes ..................................................................................... 96
2.4.3 Contracts: Preconditions and Postconditions ........................................................................101
2.5 Design: Assigning Responsibilities ............................................................................. 101
2.5.1 Design Principles for Assigning Responsibilities ....................................................................105
2.5.2 Class Diagram ...................................................................................................................111
2.5.3 Why Software Engineering Is Difficult (3) ..............................................................................114
2.6 Software Architecture ................................................................................................ 115
2.7 Implementation and Testing ....................................................................................... 117
2.7.1 Software Implementation ....................................................................................................117
2.7.2 Refactoring: Improving the Design of Existing Code ..............................................................122
2.7.3 Overview of Software Testing ..............................................................................................123
2.7.4 Test Coverage and Code Coverage .....................................................................................125
2.7.5 Practical Aspects of Unit Testing .........................................................................................129
2.7.6 Integration and System Testing ...........................................................................................130
2.8 Summary and Bibliographical Notes ........................................................................... 133
Problems ............................................................................................................................ 137
CHAPTER 3 MODELING AND SYSTEM SPECIFICATION ................................................................... 151
3.1 What is a System? .................................................................................................... 152
3.1.1 World Phenomena and Their Abstractions ............................................................................153
3.1.2 States and State Variables ..................................................................................................157
3.1.3 Events, Signals, and Messages ...........................................................................................162
3.1.4 Context Diagrams and Domains ..........................................................................................164
3.1.5 Systems and System Descriptions .......................................................................................166
8. Ivan Marsic Rutgers University vi
3.2 Notations for System Specification ............................................................................. 167
3.2.1 Basic Formalisms for Specifications .....................................................................................167
3.2.2 UML State Machine Diagrams .............................................................................................174
3.2.3 UML Object Constraint Language (OCL) ..............................................................................177
3.2.4 TLA+ Notation ...................................................................................................................182
3.3 Problem Frames ....................................................................................................... 184
3.3.1 Problem Frame Notation .....................................................................................................185
3.3.2 Problem Decomposition into Frames....................................................................................186
3.3.3 Composition of Problem Frames..........................................................................................189
3.3.4 Models ..............................................................................................................................190
3.4 Specifying Goals ....................................................................................................... 191
3.5 Summary and Bibliographical Notes ........................................................................... 192
Problems ............................................................................................................................ 193
CHAPTER 4 SOFTWARE MEASUREMENT AND ESTIMATION ............................................................. 198
4.1 Fundamentals of Measurement Theory ....................................................................... 199
4.1.1 Measurement Theory .........................................................................................................200
4.2 What to Measure? .................................................................................................... 202
4.2.1 Use Case Points ................................................................................................................203
4.2.2 Cyclomatic Complexity .......................................................................................................212
4.3 Measuring Module Cohesion...................................................................................... 214
4.3.1 Internal Cohesion or Syntactic Cohesion ..............................................................................214
4.3.2 Interface-based Cohesion Metrics........................................................................................216
4.3.3 Cohesion Metrics using Disjoint Sets of Elements .................................................................217
4.3.4 Semantic Cohesion ............................................................................................................218
4.4 Coupling .................................................................................................................. 218
4.5 Psychological Complexity .......................................................................................... 219
4.5.1 Algorithmic Information Content ...........................................................................................219
4.6 Effort Estimation ....................................................................................................... 221
4.6.1 Deriving Project Duration from Use Case Points....................................................................222
4.7 Summary and Bibliographical Notes ........................................................................... 223
Problems ............................................................................................................................ 225
CHAPTER 5 DESIGN WITH PATTERNS ......................................................................................... 227
5.1 Indirect Communication: Publisher-Subscriber ............................................................. 228
5.1.1 Applications of Publisher-Subscriber ....................................................................................235
5.1.2 Control Flow ......................................................................................................................236
5.1.3 Pub-Sub Pattern Initialization ..............................................................................................238
5.2 More Patterns ........................................................................................................... 238
9. Software Engineering Contents vii
5.2.1 Command .........................................................................................................................239
5.2.2 Decorator ..........................................................................................................................242
5.2.3 State.................................................................................................................................243
5.2.4 Proxy ................................................................................................................................245
5.3 Concurrent Programming .......................................................................................... 252
5.3.1 Threads ............................................................................................................................253
5.3.2 Exclusive Resource Access—Exclusion Synchronization .......................................................255
5.3.3 Cooperation between Threads—Condition Synchronization ...................................................257
5.3.4 Concurrent Programming Example ......................................................................................258
5.4 Broker and Distributed Computing .............................................................................. 264
5.4.1 Broker Pattern ...................................................................................................................267
5.4.2 Java Remote Method Invocation (RMI).................................................................................269
5.5 Information Security .................................................................................................. 276
5.5.1 Symmetric and Public-Key Cryptosystems ............................................................................278
5.5.2 Cryptographic Algorithms ....................................................................................................279
5.5.3 Authentication....................................................................................................................281
5.5.4 Program Security ...............................................................................................................281
5.6 Summary and Bibliographical Notes ........................................................................... 283
Problems ............................................................................................................................ 286
CHAPTER 6 XML AND DATA REPRESENTATION ........................................................................... 300
6.1 Structure of XML Documents ..................................................................................... 303
6.1.1 Syntax ..............................................................................................................................303
6.1.2 Document Type Definition (DTD) .........................................................................................309
6.1.3 Namespaces .....................................................................................................................313
6.1.4 XML Parsers .....................................................................................................................315
6.2 XML Schemas .......................................................................................................... 317
6.2.1 XML Schema Basics ..........................................................................................................318
6.2.2 Models for Structured Content .............................................................................................323
6.2.3 Datatypes..........................................................................................................................326
6.2.4 Reuse ...............................................................................................................................333
6.2.5 RELAX NG Schema Language............................................................................................333
6.3 Indexing and Linking ................................................................................................. 334
6.3.1 XPointer and Xpath ............................................................................................................334
6.3.2 XLink ................................................................................................................................335
6.4 Document Transformation and XSL ............................................................................ 336
6.5 Summary and Bibliographical Notes ........................................................................... 339
Problems ............................................................................................................................ 340
10. Ivan Marsic Rutgers University viii
CHAPTER 7 SOFTWARE COMPONENTS ....................................................................................... 342
7.1 Components, Ports, and Events ................................................................................. 343
7.2 JavaBeans: Interaction with Components .................................................................... 344
7.2.1 Property Access.................................................................................................................345
7.2.2 Event Firing .......................................................................................................................345
7.2.3 Custom Methods................................................................................................................346
7.3 Computational Reflection ........................................................................................... 347
7.3.1 Run-Time Type Identification ...............................................................................................348
7.3.2 Reification .........................................................................................................................349
7.3.3 Automatic Component Binding ............................................................................................350
7.4 State Persistence for Transport .................................................................................. 350
7.5 A Component Framework .......................................................................................... 351
7.5.1 Port Interconnections .........................................................................................................351
7.5.2 Levels of Abstraction ..........................................................................................................353
7.6 Summary and Bibliographical Notes ........................................................................... 354
Problems ............................................................................................................................ 354
CHAPTER 8 WEB SERVICES ..................................................................................................... 355
8.1 Service Oriented Architecture .................................................................................... 357
8.2 SOAP Communication Protocol.................................................................................. 358
8.2.1 The SOAP Message Format ...............................................................................................359
8.2.2 The SOAP Section 5 Encoding Rules ..................................................................................364
8.2.3 SOAP Communication Styles ..............................................................................................367
8.2.4 Binding SOAP to a Transport Protocol .................................................................................370
8.3 WSDL for Web Service Description ............................................................................ 371
8.3.1 The WSDL 2.0 Building Blocks ............................................................................................372
8.3.2 Defining a Web Service’s Abstract Interface .........................................................................375
8.3.3 Binding a Web Service Implementation ................................................................................377
8.3.4 Using WSDL to Generate SOAP Binding ..............................................................................378
8.3.5 Non-functional Descriptions and Beyond WSDL ....................................................................379
8.4 UDDI for Service Discovery and Integration ................................................................. 380
8.5 Developing Web Services with Axis ............................................................................ 381
8.5.1 Server-side Development with Axis ......................................................................................381
8.5.2 Client-side Development with Axis .......................................................................................387
8.6 OMG Reusable Asset Specification ............................................................................ 388
8.7 Summary and Bibliographical Notes ........................................................................... 389
Problems ............................................................................................................................ 390
CHAPTER 9 FUTURE TRENDS.................................................................................................... 391
11. Software Engineering Contents ix
9.1 Aspect-Oriented Programming ................................................................................... 392
9.2 OMG MDA ............................................................................................................... 393
9.3 Autonomic Computing ............................................................................................... 393
9.4 Software-as-a-Service (SaaS) .................................................................................... 394
9.5 End User Software Development................................................................................ 394
9.6 The Business of Software .......................................................................................... 397
9.7 Summary and Bibliographical Notes ........................................................................... 397
APPENDIX A JAVA PROGRAMMING ............................................................................................. 398
A.1 Introduction to Java Programming .............................................................................. 398
APPENDIX B NETWORK PROGRAMMING ...................................................................................... 400
B.1 Socket APIs ............................................................................................................. 400
B.2 Example Java Client/Server Application ...................................................................... 405
B.3 Example Client/Server Application in C ....................................................................... 408
B.4 Windows Socket Programming .................................................................................. 411
APPENDIX C HTTP OVERVIEW ................................................................................................... 414
C.1 HTTP Messages ....................................................................................................... 415
C.2 HTTP Message Headers ........................................................................................... 419
C.3 HTTPS—Secure HTTP ............................................................................................. 422
APPENDIX D DATABASE-DRIVEN WEB APPLICATIONS ................................................................... 423
APPENDIX E DOCUMENT OBJECT MODEL (DOM) ......................................................................... 424
E.1 Core DOM Interfaces ................................................................................................ 424
APPENDIX F USER INTERFACE PROGRAMMING ............................................................................. 427
F.1 Model/View/Controller Design Pattern ......................................................................... 427
F.2 UI Design Recommendations ..................................................................................... 427
SOLUTIONS TO SELECTED PROBLEMS ................................................................................................. 429
REFERENCES ........................................................................................................................... 502
ACRONYMS AND ABBREVIATIONS ....................................................................................................... 512
INDEX ........................................................................................................................... 514
12.
13. Chapter 1
Introduction
Contents
“There is nothing new under the sun but there are lots of old 1.1 What is Software Engineering?
things we don’t know.”
1.1.1
—Ambrose Bierce, The Devil’s Dictionary
1.1.2 Why Software Engineering Is Difficult (1)
1.1.3 Book Organization
As with any engineering activity, a software engineer starts
with problem definition and applies tools of the trade to obtain 1.2 Software Engineering Lifecycle
1.2.1 Symbol Language
a problem solution. However, unlike any other engineering, 1.2.2 Requirements Analysis and System
software engineering seems to put great emphasis on Specification
1.2.3 Object-Oriented Analysis and the Domain
methodology or method for obtaining a solution, rather than on Model
tools and techniques. Experts justify this with the peculiar 1.2.4 Object-Oriented Design
1.2.5
nature of the problems solved by software engineering. These
“wicked problems” can be properly defined only after being 1.3 Case Studies
1.3.1 Case Study 1: From Home Access Control
solved. to Adaptive Homes
1.3.2 Case Study 2: Personal Investment
1.4 Object Model
1.4.1 Relationships and Communication
1.4.2 Polymorphism, Inheritance, and
Delegation
1.4.3 Example
1.1 What is Software 1.4.4 Design of Objects
1.4.5
Engineering? 1.5 Student Team Projects
1.5.1 Stock Market Investment Fantasy League
1.5.2 Web-based Stock Forecasters
1.5.3 Remarks about the Projects
“To the optimist, the glass is half full. To the pessimist, the 1.6 Summary and Bibliographical Notes
glass is half empty. To the engineer, the glass is twice as big as
it needs to be.” —Anonymous
“Computer science is no more about computers than astronomy is about telescopes.” —Edsger W. Dijkstra
Most of software engineering books leave you with the impression that software engineering is all
about project management. In other words, it is not about the engineering per se but it is more
about how you go about engineering software, in particular, knowing what are the appropriate
steps to take and how you put them together. Management is surely important, particularly
because most software projects are done by teams, but the engineering aspect of it ends up being
neglected. Here I focus more on the engineering aspects of software engineering. I try to show
that there are interesting intellectual puzzles and exciting solutions, and that software engineering
is not only admonition after admonition, or a logistics and management cookbook.
1
14. Ivan Marsic Rutgers University 2
Setting posts Cutting wood Nailing Painting
Figure 1-1: Illustration of complexity on the problem of scheduling construction tasks.
A computational system (further on called system) is a computer-based system whose purpose is
to answer questions about and/or support human actions in some domain. We say that the system
is about its domain. It incorporates internal structures representing the domain. These structures
include data representing entities and relations in the domain, and a program prescribing how
these data may be manipulated. Computation actually results when a processor (interpreter or
CPU) is executing this program or a part of it.
I hope to convey in this text that software is many parts, each of which is individually easy, but
the problem is that there are too may of them. It is not the difficulty of individual components; it
is the multitude that overwhelms you—you simply lose track of bits and pieces. Let me illustrate
this point on a simple example. Suppose one wants to construct a fence around a house. The
construction involves four tasks: setting posts, cutting wood, painting, and nailing (Figure 1-1).
Setting posts must precede painting and nailing, and cutting must precede nailing. Suppose that
setting posts takes 3 units of time, cutting wood takes 2 units of time, painting takes 5 units of
time for uncut wood and 4 units of time otherwise, and nailing takes 2 units of time for unpainted
wood and 3 units of time otherwise. In what order should these tasks be carried out to complete
the project in the shortest possible time?
It is difficult to come up with a correct solution (or, solutions) without writing down possible
options and considering them one by one (unless one comes with a built-in computer chip). It is
hard to say why this problem is complicated, because no individual step seems to be difficult.
After all, the most complicated operation involves adding small integer numbers. Software
engineering is full of problems like this: all individual steps are easy, yet the overall problem is
overwhelming.
The problem is, for discrete logic, closeness to being correct is not acceptable; one flipped bit can
change the entire sense of a program1. Software developers have not yet found adequate methods
1
Software engineers like to think that their problems are unique for all of engineering or even for broader
humanity problems. But the classical nursery rhyme reminds me that perils of overlooking the details
were known at least as far back as the battle of Bosworth Field and the times of Richard III (1452-1485):
For want of a nail the shoe was lost.
For want of a shoe the horse was lost.
For want of a horse the rider was lost.
15. Chapter 1 Introduction 3
Figure 1-2: The role for software engineering.
to handle such complexity, and this text is mostly dedicated to present the current state of the
knowledge of handling the complexity of software development.
Software engineering is often confused with programming. The role of software engineering is to
capture the customer’s business needs and specify the “blueprints” for the system so that
programmers can implement it (Figure 1-2).
Software engineering relies on our ability to think about space and time, processes, and
interactions between processes and structures. Consider an example of designing a software
system to operate an automatic bank machine, known as Automatic Teller Machine (ATM)
(Figure 1-3). Most of us do not know what is actually going on inside an ATM box; nonetheless,
we could offer a naive explanation of how ATM machines work. We know what that an ATM
machine allows us to deposit or withdraw money, and we can imagine how to split these activities
into simpler activities to be performed by imaginary little “agents” working inside the machine.
Figure 1-4 illustrates how one might imagine what should be inside an ATM to make it behave as
it does. We will call the entities inside the system “concepts” because they are imaginary. As
seen, there are two types of concepts: “workers” and “things.”
For want of a rider the battle was lost.
For want of a battle the kingdom was lost.
And all for want of a horseshoe nail.
16. Ivan Marsic Rutgers University 4
1
7
4
0
8
5
2
9
6
3
Communication link
Bank’s
remote
ATM machine
datacenter
Bank
customer
Figure 1-3: Example: developing software for an Automatic Teller Machine (ATM).
We know that an ATM machine plays the role of a bank window clerk (teller). The reader may
wonder why we should imagine many virtual agents doing a single teller’s job. Why not simply
imagine a single virtual agent doing the teller’s job?! The reason is that this would not help much
is because all we would accomplish is to transform one complicated and inscrutable object (an
ATM machine) into another complicated and inscrutable object (a virtual teller). To understand a
complex thing, one needs to develop ideas about relationships among the parts inside. By
dividing a complicated job into simpler tasks and describing how they interact, we simplify the
problem and make it easier to understand and solve. This is why imagination is critical for
software engineering (as it is for any other problem-solving activity!).
Of course, it is not enough to uncover the static structure of the planned system, as is done in
Figure 1-4. We also need to describe how the system elements (“workers” and “things”) interact
during the task accomplishment. Figure 1-5 illustrates step-by-step interactions.
In a way, software development parallels the problem-solving strategies in artificial intelligence
(AI): represent the goal; represent the current state; and, minimize the differences by means-ends
analysis. As with any design, software design can be seen as a difference-reduction activity,
formulated in terms of a symbolic description of differences. Finally, in autonomic computing,
the goals are represented explicitly in the program that implements the system.
17. Chapter 1 Introduction 5
Domain Model
Transaction
How may I record
help you? Cash
Bookkeeper
Speakerphone Safe
Safe keeper
Phone
Window clerk
Datacenter
liaison
Dispenser
Bank’s
remote
datacenter
Customer
Figure 1-4: Imagined static structure of ATM shows internal components and their roles.
A Enter B C Verify
account
D
your PIN
XYZ
Verify
this
account
Typing in XYZ valid. Account
PIN number Balance: valid.
… $100 Balance:
$100
E How may F Release
G Record
I help $60 $60 less
you?
Dispensing!
Withdraw Dispense
H
$60 $60
Please take
your cash
Figure 1-5: Dynamic interactions of the imagined components during task accomplishment.
18. Ivan Marsic Rutgers University 6
Programming language, like any other formal language, is a set of symbols and rules for
manipulating them. It is when they need to meet the real world that you discover that associations
can be made in different ways and some rules were not specified. A novice all too often sees only
benefits of building a software product and ignores and risks. An expert sees a broader picture
and anticipates the risks. After all, dividing the problem in subproblems and conquering them
piecewise does not guarantee logical rigor and strict consistency between the pieces. Risks
typically include conditions such as, the program can do what is expected of it and then some
more, unexpected capabilities. Another risk is that not all environment states are catalogued
before commencing the program development. Depending on how you frame your assumptions,
you can come up with a solution. The troubles arise if the assumptions happen to be inaccurate,
wrong, or get altered due to the changing world.
We always have: USER COMP.SYS ENVIRONMENT
When developing a system, we are modeling the user and environment in the computer system.
Modeling necessarily involves simplification and abstraction. The purpose of simplification is to
make the development manageable: The system should solve one problem, not all problems.
1.1.1 Why Software Engineering Is Difficult (1)
“Software is like entropy. It is difficult to grasp, weighs nothing, and obeys the second law of
thermodynamics; i.e., it always increases.” —Norman R. Augustine
If you are a civil engineer building bridges then all you need to know is about bridges. Unlike
this, if you are developing software you need to know about software domain (because that is
what you are building) and you need to know about the problem domain (because that is what
you are building a solution for). Some problems require extensive periods of dedicated research
(years, decades, or even longer). Obviously, we cannot consider such problem research as part of
software engineering. We will assume that the problem is either solved (a theoretical solution
exists), or it can be solved in a relatively short amount of time by an informed non-expert.
A further problem is that software is a formal domain, while the real world is informal. Solving
problems in these different domains demands different styles and there is a need to eventually
reconcile these styles. A narrow interpretation of software engineering deals only with
engineering the software itself. This means, given a precise statement of what needs to be
programmed, narrow-scope software engineering is concerned with the design, implementation,
and testing of a program that represents a solution to the stated problem. A broader interpretation
of software engineering includes discovering a solution for a real-world problem. The real-world
problem may have nothing to do with software. For example, the real-world problem may be a
medical problem of patient monitoring, or a financial problem of devising trading strategies. In
broad-scope software engineering there is no precise statement of what needs to be programmed.
Our task amounts to none less than engineering of change in a current business practice.
One could go even further and argue that the second law of thermodynamics works against
software engineers (or anyone else trying to build models of the world), as well. Software
engineering is mainly about modeling the physical world and finding good abstractions. If you
find a representative set of abstractions, the development flows naturally. However, finding
abstractions in a problem domain (also known as “application domain”) involves certain level of
“coarse graining.” This means that our abstractions are unavoidably just approximations—we
19. Chapter 1 Introduction 7
cannot describe the problem domain in perfect detail: after all that would require working at the
level of atomic or even subatomic particles. Given that every physical system has very many
parts, the best we can do is to describe it in terms of only some of its variables. Working with
approximations is not necessarily a problem by itself should the world structure be never
changing. But, the second law of thermodynamics states that the universe tends towards
increasing disorder. We live in a changing world: things wear out and break, organizations go
bankrupt or get acquired or restructured, business practices change, and so on. Whatever order
was captured in those comparatively few variables that we started with, tends to get dispersed, as
time goes on, into other variables where it is no longer counted as order. Our (approximate)
abstractions necessarily become invalid with passing time and we need to start afresh. This
requires time and resources which we may not have available. We will continue discussion of
software development difficulties in Sections 2.3.5 and 2.5.3.
Software development still largely depends on heroic effort of select few developers. Product line
and development standardization are still largely missing, but there are efforts in this direction.
Tools and metrics for product development and project management are the key and will be given
considerable attention in this text.
1.1.2 Book Organization
Chapter 2 offers a quick tour of software engineering. The main focus is on tools, not
methodology, for solving software engineering problems. Chapter 3 elaborates on techniques for
problem specification. Chapter 4 describes metrics for measuring the software process and
product quality. Chapter 5 elaborates on techniques for problem solution, but unlike Chapter 2 it
focuses on advanced tools for software design. Chapter 6 describes structured data representation
using XML. Chapter 7 presents software components. Chapter 8 introduces service-oriented
architectures and Web services.
I adopt an incremental and iterative refinement approach to presenting the material. For every
new topic, we will scratch the surface and move on, only to revisit later and dig deeper.
The hope with metaphors and analogies is that they will evoke understanding much faster and
allow “cheap” broadening it, based on the existing knowledge.
1.2 Software Engineering Lifecycle
The Feynman Problem-Solving Algorithm:
(i) Write down the problem (ii) think very hard, and (iii) write down the answer.
Any product development can be expected to proceed as an organized process that usually
includes the following phases:
Planning / Specification
Design
20. Ivan Marsic Rutgers University 8
Requirements
Design
Implementation
Testing
Waterfall
method Deployment &
Maintenance
Figure 1-6: Waterfall process for software development.
Implementation
Evaluation
So is with software development. The common software development phases are as follows:
1. Specification / Requirements
- Documenting the usage scenarios and deriving the static domain model
2. Design
- Assigning responsibilities to objects and specifying the dynamics of their
interactions under different usage scenarios
3. Implementation
- Encoding the design in a programming language
4. Testing
- Individual classes/components (unit testing) and entire system (integration
testing)
5. Operation and Maintenance
- Running the system; Fixing bugs and adding new features
The lifecycle usually comprises many other activities, some of which precede the above ones,
such as marketing survey to determine the market need for the planned product. This text is
restricted to engineering activities, usually undertaken by the software developer.
The early inspiration for software lifecycle came from other engineering disciplines, where the
above activities usually proceed in a sequential manner (or at least it was thought so). This
method is known as waterfall process because developers build monolithic systems in one fell
swoop (Figure 1-6). It requires completing the artifacts of the current phase before proceeding to
the subsequent one. It civil engineering, this approach would translate to: finish all blueprints
neatly before starting construction; finish the construction before testing it for soundness; etc.
21. Chapter 1 Introduction 9
However, over the years developers realized that software development is unlike any other
product development in these aspects:
Unlike most of other products, software is intangible and hard to visualize. Most people
experience software through what it does: what inputs it takes and what it generates as
outputs
Software is probably the most complex artifact—a large software product consists of so
many bits and pieces as well as their relationships, every single one having an important
role—one flipped bit can change the entire sense of a program
Software is probably the most flexible artifact—it can be easily and radically modified at
any stage of the development process (or, at least it is so perceived)
These insights led to adopting incremental and iterative (or, evolutionary) development methods.
A popular incremental and iterative process is called Unified Process [Jacobson et al., 1999].
Each iteration should involve progressing through the design in more depth. Incremental and
iterative process seeks to get to a working instance2 as soon as possible. Having a working
instance available lets the interested parties to have something tangible, to play with and make
inquiries. Through this experimentation (preferably by end users), unsuspected deficiencies are
discovered that drive a new round of development using failures and the knowledge of things that
would not work as a springboard to new approaches. This greatly facilitates the consensus
reaching and building the understanding of all parties of what needs to be developed and what to
expect upon the completion. So, the key of incremental and iterative methods is to progressively
deepen the understanding or “visualization” of the target product, by both advancing and
retracting to earlier activities to rediscover more of its features. Methods that are even more
aggressive in terms of short iterations and heavy user involvement are characterized as agile.
All lifecycle processes have a goal of incremental refinement of the product design, but different
people hold different beliefs on how is this to be achieved. This has been true in the past and it
continues to be true, and I will occasionally comment on different approaches. Personally, I
enthusiastically subscribe to the incremental and iterative approach, and in that spirit the
exposition in this text progresses in an incremental and iterative manner, by successively
elaborating the software lifecycle phases. For every new topic, we will scratch the surface and
move on, only to revisit later and dig deeper.
A quick review of existing software engineering textbooks reveals that software engineering is
largely about management. Project management requires organizational and managerial skills
such as identifying and organizing the many tasks comprising a project, allocating resources to
complete those tasks, and tracking actual against expected/anticipated resource utilization.
Successful software projects convey a blend of careful objective evaluation, adequate preparation,
continuous observation and assessment of the environment and progress, and adjusting tactics.
It is interesting to compare the issues considered by Brooks [1975] and compare those of the
recent agile methods movement—both put emphasis on communication of the development team
2
This is not necessarily a prototype, because “prototype” creates impression of something to be thrown
away after initial experimentation. Conversely, a “working instance” can evolve into the actual product.
22. Ivan Marsic Rutgers University 10
members. My important goal here is, therefore, to present the tools that facilitate communication
among the developers. The key such tools are:
Modular design: Breaking up the system in modules helps to cope with complexity;
however, the modularization can be done in many ways with varying quality of the
results.
Symbol language: The Unified Modeling Language (UML) is used similar to how the
symbols such as , , , and , are used in mathematics. They abbreviate the exposition
of the material and facilitate the reader’s understanding of the material.
Project and product metrics: Metrics for planning and measuring project progress, and
metrics for measuring the quality of software products are essential for engineering
approach to software development.
Design heuristics: Also known as patterns, they convey the best practices that were
proven in many contexts and projects.
Decomposing a problem into simpler ones, so called divide-and-conquer approach, is common
when dealing with complex problems. In software development it is embodied in modularity: The
source code for a module can be written and maintained independently of the source code for
other modules. As with any activity, the value of a structured approach to software development
becomes apparent only when complex tasks are tackled.
1.2.1 Symbol Language
“Without images we can neither think nor understand anything.” —Martin Luther (1483-1546)
“There are only 10 types of people in this world. Those who know binary, and those who don’t.”
—Unknown
As part of a design process, it is essential to communicate your ideas. When describing a process
of accomplishing a certain goal, person actually thinks in terms of the abbreviations and symbols
as they describe the “details” of what she is doing, and could not proceed intelligently if she were
not to do so. George Miller found in the 1950s that human short-term memory can store about
seven items at a time [Miller, 1957]. The short-term memory is what we use, for instance, to
remember a telephone number just long enough to look away from the paper on which it is
written to dial the number. It is also known as working memory because in it information is
assumed to be processed when first perceived. It has been likened to the RAM (random access
memory) of a computer. Recall how many times you had to look back in the middle of dialing,
particularly if you are not familiar with the area code, which makes the number a difficult 10
digits! It turns out that the Miller’s hypothesis is valid for any seven “items,” which could be
anything, such as numbers, faces, people, or communities—as we organize information on higher
levels of abstraction, we can still remember seven of whatever it is. This is called chunking.
Symbols can be easier chunked into patterns, which are represented by new symbols. Using
symbols and hierarchical abstraction makes it easier for people to think about complex systems.
As can be observed throughout this text, the basic notation is often trivial and can be mastered
relatively quickly. The key is in the skills in creating various models—it can take considerable
amount of time to gain this expertise.
23. Chapter 1 Introduction 11
«interface»
Stereotype
BaseInterface
«» provides
ClassName additional info/
+ operation()
annotation/
# attribute_1 : int explanation
Three common # attribute_2 : boolean
compartments: # attribute_3 : String
1. Classifier name Inheritance
+ operation_1() : void relationship:
+ operation_2() : String Class1Implement Class2Implement
2. Attributes BaseInterface
+ operation_3(arg1 : int) is implemented
+ operation() + operation()
3. Operations by two classes
Software Class
Actor Comment Software Interface Implementation
instance1 : Class1 instance5 : Class2 instance8 : Class3
doSomething()
doSomethingElse()
Interaction Diagram
doSomethingYetElse()
Figure 1-7: Example UML symbols for software concepts.
Our primary symbol language is UML, but it is not strictly adhered to throughout the text. I will
use other notations or an ad-hoc designed one if I feel that it conveys the message in a more
elegant way.
Example UML symbols are shown in Figure 1-7. To become familiar with UML, you can start at
http://www.uml.org, which is the official standard’s website. People usually use different symbols
for different purposes and at different stages of progression. During development there are many
ways to think about your design, and many ways to informally describe it. Any design model or
modeling language has limits to what it can express and no one view of a design tells all. For
example, strict adherence to a standard may be cumbersome for the initial sketches; contrariwise,
documenting the completed design is always recommended in UML.
UML is probably the most widely accepted graphical notation for software design. However, it is
not generally accepted and it is often criticized (e.g., for not being consistent), but everybody
would agree that symbols are useful, so different authors invent their own favorite symbols. Even
in mathematics, the ultimate language of symbols, there are controversies about symbols even for
such established subjects as calculus (cf., Newton’s vs. Leibnitz’s symbols for calculus), lest to
bring up more recent subjects. To sum up, you can invent your own symbols if you feel it
absolutely necessary, but before using them, explain their meaning/semantics and ensure that it is
always easy to look-up the meanings of your symbols.
1.2.2 Requirements Analysis and System Specification
We start with the customer statement of requirements, if the project is sponsored by a specific
customer, or the vision statement, if the project does not have a sponsor. The vision statement is
similar to the customer statement of requirements in that it briefly describes what the envisioned
24. Ivan Marsic Rutgers University 12
system is about, followed by a list of features/services it will provide or tasks/activities it will
support.
Given the customer statement of requirements, the first step in the software development process
is called requirements analysis or systems analysis. During this activity the developer attempts to
expand and amplify the statement of requirements and produce the system specification—the
document that is an exact description of what a planned system is to do. Requirements analysis
delimits the system and specifies the services it offers, identifies the types of users that will
interact with the system, and identifies other systems that interact with ours. The system is at first
considered a black box, its services (“push buttons”) are identified, and typical interaction
scenarios are detailed for each service. Requirement analysis includes both fact-finding about
how is the problem solved in the current practice as well as envisioning how the planned system
might work.
Recall the ATM machine example from Figure 1-3. We identified the relevant players in Figure
1-4. However, this may be too great a leap for a complex system. A more gradual approach is to
start with identifying the external players and their step-by-step interactions. Figure 1-8(a) shows
the players external to the system (called “actors”). What happens inside the system is considered
separately in the design and analysis phases (described in the following sections).
A popular technique for requirements analysis is use case modeling. A set of use cases describes
the elemental tasks a system is to perform and the relation between these tasks and the outside
world. Each use case description represents a dialog between the user and the system, with the
aim of helping the user achieve a business goal. In each dialog, the user initiates actions and the
system responds with reactions. The use cases specify what information must pass the boundary
of the system in the course of a dialog (without considering what happens inside the system).
Because use cases represent recipes for user achieving goals, each use-case name must include a
verb capturing the goal achievement. The key activities are summarized in an artifact called use
case diagram. Given the ATM machine example (Figure 1-3), Figure 1-9 illustrates the flow of
events for the use case “Withdraw Cash.”
25. Chapter 1 Introduction 13
(a)
1
4 2
7 5 3
8 6
0 9
Bank customer System Bank’s remote
(ATM machine) datacenter
Datacenter
(b) Window clerk
liaison
Bookkeeper Safe keeper Dispenser
Speakerphone Telephone Transaction Safe Cash
record
Figure 1-8: Gallery of actors (a) and concepts (b) of the system under discussion. The actors
are relatively easy to identify because they are external to the system and visible; conversely,
the concepts are hard to identify because they are internal to the system, hence
invisible/imaginary.
Use cases are only the beginning of a software engineering process. When we draw and elaborate
a use case diagram of a system, it signifies that we know what the system needs to accomplish,
not how; therefore, it is not just “a small matter of system building” (programming) that is left
after we specify the use cases. Requirements analysis is further detailed in Section 2.2.
1.2.3 Object-Oriented Analysis and the Domain Model
“…if one wants to understand any complex thing—be it a brain or an automobile—one needs to develop
good sets of ideas about the relationships among the parts inside. …one must study the parts to know the
whole.” —Marvin Minsky, The Emotion Machine
Use cases consider the system as a black box and help us understand how the system as a whole
interacts with the outside word. The next step is to model the inside of the system. We do this by
building the domain model, which shows what the black box (the system) encloses. Given a
26. Ivan Marsic Rutgers University 14
A Enter
B Verify
account C How may
your PIN XYZ I help
you?
1
4 2
7 85 6 3 1
4 2
0 9 7 85 6 3
0 9
Typing in XYZ valid. Withdraw
PIN number Balance: $60
… $100
D E XYZ
Please take
your cash withdrew
$60
1
4 2
7 5 3
8 6
0 9
Collecting
cash …
Acknowledged
Figure 1-9: Scenario for use case “Withdraw Cash.” Unlike Figure 1-5, this figure only
shows interactions of the actors and the system.
service description, we can imagine the process of populating the black box with domain
concepts as follows. Note that while uses cases elaborate the system’s behavioral characteristics
(sequence of stimulus-response steps), domain model gives details of the systems structural
characteristics (system parts and their arrangement) that make it possible for the system to
exhibit the behaviors described by its use cases.
It is useful to consider a metaphor in which software design is seen as creating a virtual
enterprise or an agency. The designer is given an enterprise’s mission description and hiring
budget, with the task of hiring appropriate workers, acquiring things, and initiating the
enterprise’s operating process. Unfortunately, what is missing is a list of positions with a job
description for each position.
The designer needs to identify the positions and the accompanying roles and responsibilities and
start filling the positions with the new workers. Recall the ATM machine example from Figure
1-3. We need to identify the relevant players internal to the system (called “concepts”), as
illustrated in Figure 1-8(b).
Imagine you are charged with hiring all people in a newly created enterprise, you are given the
description of services the enterprise will offer and the budget for employee salaries. You start
with defining what positions should be created and then filling these positions with new
employees.
In the language of requirements analysis, the enterprise is the system to be developed and the
employees are the domain concepts. As you would guess, the key step is to hire the right
employees (identify good concepts, or abstractions). Somewhat less critical is to define their
relationships and each individual’s attributes, and this should be done only for those that are
27. Chapter 1 Introduction 15
relevant for the task they are assigned to. I like this metaphor of “hiring workers” because it is in
the spirit of what Richard Feynman considered the essence of programming, which is “getting
something to do something” [Feynman et al., 2000]. It also sets up the stage for the important
task of assigning responsibilities to software objects.
This approach to creating the domain model is somewhat different from that in the current
literature, which usually models the entire problem domain (entities that are both external and
internal to the planned system). I prefer to identify the actors and other external entities during the
requirements analysis phase. During the object-oriented analysis phase, we should is to delimit
the domain to what the target system will envelop. I feel that this is a more gradual and intuitive
approach. However, I want to emphasize that it is hard to sort out software engineering
approaches into right or wrong ones—the developer should settle on the approach that produces
best results for him or her. On the downside of this freedom of choice, choices ranging from the
dumbest to the smartest options can be defended on the basis of a number of situation-dependent
considerations.
The idea for conducting object-oriented analysis in analogy to setting up an enterprise came to me
by looking at the works of Fritz Kahn. In the early 20th century, Kahn produced a succession of
books illustrating the inner workings of the human body, using visual metaphors drawn from
industrial society. His illustrations drew a direct functional analogy between human physiology
and the operation of contemporary technologies—assembly lines, internal combustion engines,
refineries, dynamos, telephones, etc. Kahn’s work is aptly referred to as “illustrating the
incomprehendable” and I think this greatly captures the task faced by a software analyst. The
interested reader should search the web for more information on Kahn.
Object-oriented analysis is further detailed in Section 2.4.
1.2.4 Object-Oriented Design
The key activity in the design phase is assigning responsibilities to the software objects. A
software application can be seen as a set or community of interacting software objects. Each
object embodies one or more roles, a role being defined via a set of related responsibilities. Roles,
i.e., objects, collaborate to carry out their responsibilities. Our goal is to create a design in which
they do it in a most efficient manner. Efficient design contributes to system performance, but no
less important contribution is in making the design easier to understand by humans.
Design is the creative process of searching how to implement all of the customer’s requirements.
It is a problem-solving activity and, as such, is very much subject to trial and error. In the ATM
machine example, we came up with one potential solution for step-by-step interactions, as
illustrated Figure 1-5. The key question for the designer is: is this the best possible way to assign
responsibilities and organize activities of the virtual agents? One could solve the same design
problem with a different list of players and different organization of their step-by-step
interactions. As one might imagine, there is no known way for exactly measuring the optimality
of a design. Creativity and judgment are key for good software design. Knowledge of rules-of-
thumb and heuristics are critical in deciding how good a design is. Luckily, most design work is
routine design, where we solve a problem by reusing and adapting solutions from similar
problems.
28. Ivan Marsic Rutgers University 16
So, what kinds of designs are out there? Two very popular kinds of software designs are what I
would call Maurits Escher3 and Rube Goldberg4 designs. Both are fun to look at but have little
practical value. Escher designs are impossible to implement in reality. Goldberg designs are
highly-complicated contraptions, which solve the problem, but they are very brittle. If anything
changes in the underlying assumptions, they fail miserably.
Information Design Approaches: http://positiveinteraction.com/carleton/2001Design.ppt
* Data-centric: entity-relationship diagram
* Object Oriented: class hierarchy
* Task Oriented: hierarchical task analysis
Merge Tasks and Objects: http://www.cutsys.com/CHI97/Tarby.html
Object-oriented design is further detailed in Section 2.5.
3
Maurits Cornelis Escher (1898-1972) is one of the world’s most famous graphic artists, known for his so-
called impossible structures, such as Ascending and Descending, Relativity, his Transformation Prints,
such as Metamorphosis I, Metamorphosis II and Metamorphosis III, Sky & Water I or Reptiles.
4
Reuben Lucius Goldberg (Rube Goldberg) (1883-1970) was a Pulitzer Prize winning cartoonist, sculptor,
and author. He is best known for his “inventions”—elaborate sets of arms, wheels, gears, handles, cups,
and rods, put in motion by balls, canary cages, pails, boots, bathtubs, paddles, and live animals—that
take simple tasks and make them extraordinarily complicated.
29. Chapter 1 Introduction 17
Figure 1-10: Example for project estimation: Formal hedge pruning.
1.2.5 Project Estimation and Product Quality
Measurement
I will show, on an example of hedge pruning, how project estimation and product quality
measurement work hand in hand with incremental and iterative development. Imagine that you
want to earn some extra cash this summer and you respond to an advertisement by a certain Mr.
McMansion to prune the hedges around his property (Figure 1-10). You have never done hedge
pruning before, so you will need to learn as you go. The first task is to negotiate the compensation
and completion date. The simplest way is to make a guess that you can complete the job in two
weeks and you ask for a certain hourly wage. Suppose that Mr. McMansion agrees and happily
leaves for vacation. After one week, you realize that you are much behind the schedule, so to
catch up you lower the quality of your work. After two weeks, the hedges are pruned and Mr.
McMansion is back from vacation. He will likely find many problems with your work and may
balk at paying for the work done.
Now suppose that you employ incremental and iterative hedge pruning. You notice that there are
several sections of hedges, labeled with encircled numbers to in Figure 1-10. Think of
hedge pruning as traveling along the hedge at a certain velocity (while pruning it). To estimate the
travel duration, you need to know the length of the path (or, path size). That is
Path size
Travel duration (1.1)
Travel velocity
Because you have never pruned hedges, you do not know your velocity, so the best you can do is
to guess it. You could measure the path size using a tape measure, but you realize there is a
problem. Different sections seem to have varying difficulty of pruning, so your velocity will be
30. Ivan Marsic Rutgers University 18
different along different sections. For example, section at the corner of Back and Side Streets,
seems to be much more difficult to prune than section between the garden and Main Street. Let
us assume you assign “pruning points” to different sections to estimate their size and complexity.
Suppose you use the scale from 1 to 10. Because section seems to be the most difficult, so we
assign it 10 pruning points. The next two sections in terms of difficulty appear to be and ,
and relative to section you feel that they are at about 7 pruning points. Next are sections , ,
and , and you give them 4 pruning points. Finally, section gets 3 pruning points and section
gets 2 pruning points. The total for the entire hedge is calculated simply by adding the
individual sizes
N
Total size points - for - section i (1.2)
i 1
Therefore, total for the entire hedge is 10 27 34 3 2 = 39 pruning points. This
represents your size estimate of the entire hedge. It is very important that this is a relative-size
estimate, because it measures how big individual sections are relative to one another. So, a
section estimated at four pruning points is expected to take twice as long as a section estimated at
two pruning points.
How accurate is this estimate? Should section be weighted 3.5 points instead of 3? There are
two parts to this question: (a) how accurate is the relative estimate for each section, and (b) is it
appropriate to simply add up the individual sizes? As for the former issue, instead of eyeballing
the hedges and comparing to one another, you could spend days and count all branches in all
sections and arrive at a much more accurate estimate. You could even measure density of
branches in individual sections, or their length, or hardness, etc. Obviously, there is a point
beyond which only minor improvement in estimation accuracy is brought at a huge cost (known
as the law of diminishing returns). Many people agree that the cost-accuracy relationship is
exponential (Figure 1-11). It is also interesting to note that, in the beginning of the curve, we can
obtain huge gains in accuracy with modest effort investment.
As for the latter issue about equation (1.2), using a linear summation, a key question is if the
work on one section is totally independent on the work on another section. The independence is
equivalent to assuming that every section will be pruned by a different person and each has equal
degree of experience with pruning hedges. I believe there are confounding factors that can affect
the accuracy of the estimate. For example, as you progress, you will learn about hedge pruning
and become more proficient, so your velocity will increase not because the size of some section
became smaller but because you became more proficient. In Section 2.2.3 I will further discuss
the issue of linear superposition in the context of software projects estimation.
31. Chapter 1 Introduction 19
100%
Estimation accuracy
Estimation cost
Figure 1-11: Exponential cost of estimation. Improving accuracy of estimation beyond a
certain point requires huge cost and effort (known as the law of diminishing returns).
All you need now is the velocity estimate, and using equation (1.1) you can give Mr. McMansion
the estimate of how long the entire hedge pruning will take. Say you guess your velocity at 5
pruning points per day. Using equation (1.1) you obtain 40/5 = 8 days. You tell Mr. McMansion
that your initial estimate is 8 days to finish the work, but you may need to adjust this as you go.
Here comes the power of incremental work. You feel that section is the easiest to prune, so
you decide to start with section , which is worth 2 pruning points. You find out that it took you
almost one entire day to complete section . In other words after the first increment you found
that your actual velocity is half of what you originally thought, that is 2.5 pruning points per day.
You go to Mr. McMansion and tell him that your new estimate is that it will take you 15 more
days (or, 15 + 1 = 16 days total) to complete the work. Note that you do not need to adjust your
size estimate of 39 pruning points, because the relative sizes of hedge sections have not changed!
It is important to observe that initially you estimate your velocity, but after the
first increment you use the measured velocity to obtain a more accurate
estimate of the project duration. You may continue measuring your velocity
and re-estimating the total effort duration after each increment, but this
probably will not be necessary, because after the first few increments you will
obtain an accurate measurement of your pruning velocity. The advantage of incremental work is
that you can quickly gain an accurate estimate of the entire effort and do not need to rush in the
middle to complete it on time, while sacrificing product quality.
Speaking about product quality, next we will see how iterative work helps improve product
quality. You may be surprised to find that hedge pruning involves more than simply trimming the
shrub. Some of parameters that characterize the quality of hedge pruning are illustrated in Figure
1-12. Suppose that after you completed the first increment (section ), Mr. McMansion can
examine the work and decide if you need to iterate and work again on section to fix some
deficiencies.
It is much more likely that Mr. McMansion will be satisfied with your work if he is continuously
consulted then if he simply disappeared to vacation after describing the job requirements.
Regardless of how detailed the requirements description, you will inevitably face unanticipated
situations and your criteria of hedge esthetics may not match those of Mr. McMansion. Everyone