17
15.1.2003 Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each step of software development. Typically integrated with a design data repository / design data base

15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

Embed Size (px)

Citation preview

Page 1: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

1

CASE Tools

• CASE = Computer-Aided Software Engineering• A set of tools to (optimally) assist in each step of

software development.• Typically integrated with a design data repository /

design data base

Page 2: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

2

CASE-supported tasks

• Business systems planning• Analysis & Design• Project management• Data definition• Program development (program generation)• Round-trip engineering• Prototyping• Simulation• Integration• Testing

Page 3: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

3

Program generation

• Generating source code based on- Functional specifications,- Data specifications,- Coding standards,…

Page 4: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

4

What do tools generate

• Templates for things like classes based on design (e.g. generation of Java source files without method implementation from a class diagram – Fujaba).

• Forms and code to run them• Source code to do routine tasks such as access

data in the database or in a form.

Page 5: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

5

CASE Data Repository / Data Base

• The heart of the CASE tool• Will be used by different tools• Key to tool integration• Ideally provides concurrent access to design data

Page 6: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

6

This year at our course

• We do not have commercial tools.• Will be using a simple tool to generate Java classes

to access database data (”Dbswtool”)• The tool needs descriptions of the database and it

will produce classes for retrieving and storing data in the database (one class per relation).

• The tool can also be used to create classes to execute queries and access their results.

Page 7: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

7

Motivation – 3rd assignment

• Choose one use case of the use cases in your previous assignment.

• The use case should be such that it needs to make a query to the database retrieving data from more than one relation.

• You are to write and test a program, which executes that use case.

• The program is to read the user input from a file or terminal (no graphical user interface).

Page 8: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

8

3rd assignment - continued

• As the use case is based on a straightforward user story, you do not need to prepare for lots of different cases or execution paths - if something goes wrong then just an error message and stopping program execution will be enough.

• Write a test plan for your program. The test plan includes information on - what data you are going to use to test the program and - what is the desired outcome of your program.

• Having written your program, test it. Create a test report of your program.

• If you need to run the tests several times, then make a test report for each individual execution.

Page 9: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

9

3rd assignment – data base access

• Your program needs to access a database• An example program will be provided for an

example database, which has some data in it.• You are to use the Dbswtool (to be discussed in

this lecture) to access the data in the data base.

Page 10: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

10

3rd assignment documentation

• How to install the program• How to use the program• How to remove the installation• How to maintain the program (class diagram, short

explanation,…?)• How to test the program (test material, test plan,

instructions on how to run the test)• Test reports• Configuration files for Dbswtool

Page 11: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

11

Dbswtool input

• Description of attributes• Description of relations• Description of queries

Page 12: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

12

Dbswtool output

• For each relation/query, a ”Db” class containing the data to access the database data.

• For each ”Db” class, a class extending the ”Db” class – this is the class where the developer may add his/her extra functionality.

Page 13: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

13

Db classes for relations

• Set and check data in the object using an input string

• Access the data object in the Db class object• Insert the object’s data in the database• Modify the object’s data in the database• Delete the object’s data from the database (based

on key attribute values)• Retrieve the object’s data from the database

(based on key attribute values)

Page 14: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

14

Db classes for queries

• A method for executing the predefined query with possibly extra conditions (which is ”and”ed to the end of the predefined condition).

• A method for stepping through the answer row by row.

• Methods for retrieving the objects (for classes of relations) in the current answer row.

Page 15: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

15

Why to use the tool?

• To keep the data definitions in data base and Java classes synchronised.

• To reduce the number of errors.• To automate a routine (and boring) part of

programming.• To provide consistency in data management.

Page 16: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

16

Complications

• The Java classes for JDBC (SQL) data objects are much different from each other in terms of the services they give.

• The tool comes with a set of classes (SQL Data Types) for wrapping the JDBC Java classes – this is to provide uniform services and aid in program generation.

Page 17: 15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 CASE Tools CASE = Computer-Aided Software Engineering A set of tools to (optimally) assist in each

15.1.2003 Software Engineering 2003Jyrki Nummenmaa

17

Getting started

• Download the stuff fromhttp://www.cs.uta.fi/~jyrki/se03/dbswtool-download

• Read README.txt and follow the instructions given.• The data base will be provided by next week (9.4.),

when the demo is continued.• Anyway, it is a good idea to try out the software

already before that, although you can not actually execute the programs on the database.