Presentation 4

Download Report

Transcript Presentation 4

Design 2: System Architecture
CS406 Tivoli 1
Overview






Refined use cases
Functionality
Components
Classes
System Behavior
Prototype
Refined Use Cases

Convert Scripts
- Without a GUI the user only has one
interaction with the system
Component Overview

XML parser

Intermediate Script Representation

Component Generator

Script Converters
XML Parser

Third party component

Many free implementations available


IBM, GNU, SUN, …
We will wrap the component to produce
blocks instead of tags

<BR> Tag

<A> Block </A>
XML Parser Class Diagram
XML Parser
-Internal Parser
setFile(fileName:String)
getBlock():String
This is the third party
component that we
will wrap.
Intermediate Script
Representation

Designed and provided by us

Provides us a generic way to deal with
scripts internally

Script Component class implements Visitor
design pattern
Intermediate Script
Representation class
diagram
Database Script
-scriptComponents
Script Component
visit(producer:ScriptProducer)
addComponent(component:
ScriptComponent)
getComponents():Vector
Drop Table
-tableName:String
Component Generator

Designed and provided by us

Takes XML blocks

Produces Script Components

Abstract Factory Design Pattern

Singleton
Component Generator Class
Diagram
Component Generator
generateComponent(block:String)
:ScriptComponent
Script Converter

Takes a intermediate representation and
converts to text scripts

Abstract base class which will be inherited
from for each database platform
Script Converter Class
Diagram
Script Converter
addBlock(block:Block)
outputFile()
#dropTable(name:String)
#… many script elements
System Behavior: XML Parser
SpecifyFile
(fileName)
SetFile(fileName)
:ScriptGenerator
:XMLParser
System Behavior: Specify
Database Platforms
SpecifyPlatforms
1:Create(dbType:text)
(platforms:text)
:ScriptGenerator
:ScriptConverter
System Behavior: Internal
Script Build
:ScriptGenerator
2 create()
1*block:=[for each block]getBlock()
:XMLParser
3 addBlock(block)
:ScriptConverter
2.1 create()
3.1*comp:=generateComponent(block)
:Script
2.1.1 create()
:Component
:Component
Generator
3.1.1 create()
:Component
System Behavior: Internal
Script Build
:ScriptGenerator
2 create()
1*block:=[for each block]getBlock()
3 addBlock(block)
4 writeScript()
4.2.1 dropTable(string)
:XMLParser
4.3 write(string)
:File
:ScriptConverter
2.1 create()
3.2 addComponent(comp)
4.1*:[for each component]comp::getComponent()
:Script
2.1.1 create()
3.2 add (comp)
:Component
4.2 visit(this)
:Component
System Behavior: View Errors
1:createReport()
2:populateReport()
3:displayReport()
:ScriptGenerator
:Reports
Prototype Functionality

DB2, Oracle, SQL Server Script
Converters

XML Parser Wrapper

Component Converter (block>Component)

Components for many script operations:

Create Table, Drop Table, Create View, etc…
Our Status

Continuing to revise design

Starting with high level code

Considering some general implementation
details
Finally
Questions For Us?