cs 160: software engineering october 8 class meeting department of computer science san jose state...

25
CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak www.cs.sjsu.edu/~ mak

Upload: piers-oliver

Post on 28-Dec-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

CS 160: Software EngineeringOctober 8 Class Meeting

Department of Computer ScienceSan Jose State University

Fall 2014Instructor: Ron Mak

www.cs.sjsu.edu/~mak

Page 2: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

2

Midterm Review

What is software engineering?

Complexity and change Collaboration, communication, and coordination

Processes and methodologies_

Page 3: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

3

Midterm Review

Web application architecture

Client-server Static and dynamic web pages

Web development tools and technologies

Tomcat and NetBeans Servlets, JSPs, and JavaBeans MySQL relational database manager

_

Page 4: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

4

Midterm Review, cont’d

Servlets

Application logic Redirection to other servlets or to JSPs

JavaServer Pages (JSP)

Translated to servlets by Tomcat_

Page 5: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

5

Midterm Review, cont’d

Deploying web applications (.war files)

Manual deployment to Tomcat Tomcat web application manager Development and deployment with NetBeans

_

Page 6: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

6

Midterm Review, cont’d

Project phases

Waterfall model

Agile software development_

Page 7: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

7

Midterm Review, cont’d

Requirements

Elicitation Functional and nonfunctional

Use cases

UML use case diagrams Use case descriptions

_

Page 8: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

8

Midterm Review, cont’d

Version control system

Git File states Clone, push, pull Add, commit Conflict resolution GitHub SmartGit

Page 9: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

9

Midterm Review, cont’d

Conceptual design

Problem statement Product objectives and features Major modules

_

Page 10: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

10

Midterm Review, cont’d

Analysis model

Functional model Analysis object model Dynamic model

System design

Subsystem decomposition, partitioning, and layering Framework classes and the initial thread of control Loose coupling vs. high cohesion

Page 11: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

11

Midterm Review, cont’d

Model-View-Controller architecture

Controller (servlets) View (JSPs) Model (JavaBeans) objects Loose coupling and parallel development

Page 12: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

12

Midterm Review, cont’d

Server-side architecture

Multilayered Data access layer

Unified Modeling Language (UML)

Package, class, and sequence diagrams Aggregations, compositions, and inheritance Attributes and methods

Page 13: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

13

Midterm Review, cont’d

Data repository

Data independence, redundancy, inconsistency, access, disparity, concurrency, security, and integrity

Data modeling

Conceptual, logical, and physical models Entities and relationships One-to-one, one-to-many, many-to-many Normalization: 1NF and 2NF ER diagrams

Page 14: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

14

Midterm Review, cont’d

MySQL relational database management system (RDBMS) Command-line interface

SQL

Create and drop databases and tables Query tables Joining tables Insert, update, and delete record

Page 15: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

15

Midterm Review, cont’d

MySQL Workbench

View and manipulate table data EER diagrams Forward and reverse engineering

_

Page 16: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

16

Midterm Review, cont’d

JDBC Java connection to a database

connection pool

Statements and prepared statements Query, insert, update, delete records

Result sets Object-relational mapping

JavaBeans

Page 17: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

17

Example Midterm Questions

Briefly describe the contents of each of the following:

Requirements specification Software prototype Conceptual design Design document

Page 18: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

18

Example Midterm Questions, cont’d

Consider the use case where a user moves a file from one directory into another within the file system. Suppose you implemented it with a graphical user interface (GUI) based on the model-view-controller (MVC) architecture. The user does the file move by dragging the image of a document on the screen with the mouse from one folder image into another. Identify the model, the view, and the controller objects. Draw a UML sequence diagram of the interaction

described by this use case.

Page 19: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

19

Example Midterm Questions, cont’d

Model

File system components Physical files and directories that exist on disk

View

GUI objects Folders and documents as shown on the screen

_

Page 20: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

20

Example Midterm Questions, cont’d

Controller

The interface (“bridge”) between the GUI and the file system.

The code that translates the GUI actions to operations on the underlying file system._

Page 21: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

21

Example Midterm Questions, cont’d

User

SourceFolder

GUI-FSBridge

FileSystem

DestinationFolder

select document

send move commandwith source file path anddestination directory path

confirm file move

confirm selection

end dragsend destination folder info

detach documentfrom source folder

send source folder and source document infostart drag

confirm file movedisplay document in destination folder

Page 22: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

22

Example Midterm Questions, cont’d

Suppose a teaching assistant for this CS 160 class wanted to build a relational database to keep track of the project teams. His first attempt at the database consists of a single table, as shown in the ER diagram.

Page 23: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

23

Example Midterm Questions, cont’d

For each of the following queries, either write the SQL statement to perform the query based on this database, or explain why the query would be difficult to do.

What are the name and URL of team Alpha’s product?

SELECT product_name, product_URLFROM teamWHERE team_name = ‘Alpha’

Page 24: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

24

Example Midterm Questions, cont’d

Who’s on team Beta?

Which team is Mary Jones on and what is her project grade?

Difficult (tedious, at least) to do because of the repeated student fields. Each first name/last name pair would need to be listed separately in the SELECT clause.

Also difficult to do because the test for Mary Jones would have to be duplicated for each student in the row and then OR’d together.

Page 25: CS 160: Software Engineering October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak mak

Computer Science Dept.Fall 2014: October 8

CS 160: Software Engineering© R. Mak

25

Example Midterm Questions, cont’d Normalize to 2NF the project

team database. Remember that each student on a particular project team will receive the same project grade.

PK

FK

PK

FK