1. Trang chủ
  2. » Công Nghệ Thông Tin

Tài liệu Less05- Identify Design Mechanisms doc

23 459 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 23
Dung lượng 233 KB

Nội dung

Object Oriented Analysis and Design Using the UML Module 5: Identify Design Mechanisms Rational Objectives: Identify Design Mechanisms  Understand the purpose of the Identify Design Mechanisms activity and understand when in the lifecycle it is performed  Explain what Design and Implementation Mechanisms are and how they map from Analysis Mechanisms  Understand some key mechanisms that will be utilized in the case study Rational Identify Design Mechanisms in Context Identify Design Mechanism Architect s Rational Identify Design Mechanisms Overview Supplementary Specifications Analysis Classes Design Guidelines Software Architecture Document Identify Design Mechanisms Design Model Design Model Rational Identify Design Mechanisms: Steps  Categorize clients of analysis mechanisms  Document architectural mechanisms Rational Identify Design Mechanisms: Steps  Categorize clients of analysis mechanisms  Document architectural mechanisms Rational Identify Design Mechanisms: Steps  Pattern  A common solution to a common problem in a context  Analysis/Design Pattern  A solution to a narrowly-scope technical problem  A fragment of a solution, or a piece of the puzzle  Framework  Defines the general approach to solving the problem  Skeletal solution, whose details may be analysis/design patterns Rational What Is A Design Pattern A design pattern provides a scheme for refining the subsystems or components of a software system, or the relationships between them It describes a commonly-recurring structure of communicating components that solves a general design problem with a particular context - Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides 1994.“Design Patterns – Elements of Reusable Object-Oriented Software” Rational Review: Why Use Analysis Mechanisms? Oh no! I found a group of classes that has persistent data How am I supposes to design these things if I don’t even know what database we are going to be using? That is why we have a persistence analysis mechanism We don’t know enough yet, so we can bookmark it and come back to it later Analysis mechanisms are used during analysis to reduce the complexity of analysis, and to improve its consistency by providing designers with a short-hand representation for complex behavior Rational Categorize Analysis Mechanisms  Purpose  To refine the information gathered on the analysis mechanisms  Steps  Identify the clients of each analysis mechanism  Identify characteristic profiles for each analysis mechanism  Group clients according to their use of characteristic profiles  Proceed bottom-up and make an inventory of the implementation mechanisms that you have at your disposal Rational 10 Identify Design Mechanisms: Steps  Categorize clients of analysis mechanisms  Documentation architectural mechanisms Rational 11 Design and Implementation Mechanisms Analysis Design Implementation Mechanism Mechanism Mechanism (Conceptual) (Concrete) (Actual) Legacy Data Persistency RDBMS JDBC New Data Persistency Distribution Analysis Rational ObjectStore OODBMS Remote Method Invocation (RMI) Design Java 1.2 from Sun Implementation 12 Review: Documenting Architectural Mechanisms  Architectural Mechanisms can be treated as patterns (i.e., stereotyped parameterized collaboration) Template Parameters Pattern Name Behavioral Aspect Structural Aspect Documented in Design Guidelines Rational 13 Review: Course Registration Analysis Mechanisms     Persistence Distribution Security Legacy Interface Rational 14 Design Mechanisms: Persistency: RDBMS: JDBC  Persistence characteristics  Granularity  Volume  Duration  Access mechanism  Access frequency (creation/deletion, update, read)  Reliability Note: JDBC is the standard Java API for taking to a SQL database Rational 15 Example: Persistency: RDBMS: JDBC PersistencyClient (from SamplePersistency Client) Roles to be filled by the designer applying the mechanism PersistentClassList (from SamplePersistentClass) new() add(c: PersistentClass) DBClass create() : PersistentClass read(searchCriteria : string) : PersistentClassList update(c : PersistentClass) delete(c : PersistentClass) * PersistentClass (from SamplePersistentClass) getData() setData() command() new() DriverManager (from java.sql) ResultSet Statement Connection (from java.sql) (from java.sql) (from java.sql) getString() : string Rational getConnection(url, user, pass) : Connection executeQuery(sql : String) : ResultSet executeUpdate(sql : String) : int createStatement() : Statement 16 Example: Persistency: RDBMS: JDBC: Initialize : DBClass : DriverManager getConnection(url, user, pass) Rational 17 Example: Persistency: RDBMS: JDBC: Create : PersistencyClient : DBClass : PersistentClass : Connection create( ) 1.1 New() 1.2 getData( ) 1.3 createStatement( ) 1.4 executeUpdate(String) Rational 18 : Statement Example: Persistency: RDBMS: JDBC: Read : PersistencyClient : DBClass : Connection : Statement returns a Statement read(string) : PersistentClassList 1.2 executeQuery(string) Create a list to hold all retrieved data 1.3 new( ) 1.4 new() Repeat these operations for each element returned from the executeQuery() command The PersistentClassList is loaded with the data retrieved from the database 1.5 getString( ) 1.6 setData( ) called for each attribute in the class 1.7 add(PersistentClass) Add the retrieved course offering to the list to be returned Rational : PersistentClass The SQL statement built by the DBClass using the given criteria is passed to executeQuery() 1.1 createStatement( ) The criteria used to access data for the persistent class : ResultSet 19 Example: Persistency: RDBMS: JDBC: Update : PersistencyClient : DBClass : PersistentClass : Connection : Statement update(PersistentClass) 1.1 getData( ) 1.2 createStatement( ) 1.3 executeUpdate(string) Rational 20 execute SQL statement Example: Persistency: RDBMS: JDBC: Delete : PersistencyClient : DBClass : Connection : Statement delete(PersistentClass) 1.1 createStatement( ) execute SQL statement 1.2 executeUpdate(string) Rational 21 Incorporating JDBC: Steps  Provide access to the class libraries needed to implement JDBC  Provide java.sql package  Create the necessary DBClasses  One DBClass per persistent class  Incorporate DBClasses into the design  Allocate to package/layer  Add relationships from persistency clients  Create/Update interaction diagrams that describe:  Database initialization  Persistent class access: Create, Read, Update, Delete Rational 22 Deferred Example: Incorporating JDBC Sample Persistency Client Package java.sql DriverManager Connection (from java.sql) (from java.sql) Statement Rational ResultSet (from java.sql) (from java.sql) 23 ... Design Mechanisms Overview Supplementary Specifications Analysis Classes Design Guidelines Software Architecture Document Identify Design Mechanisms Design Model Design Model Rational Identify Design. .. Analysis Mechanisms  Understand some key mechanisms that will be utilized in the case study Rational Identify Design Mechanisms in Context Identify Design Mechanism Architect s Rational Identify Design. .. Design Mechanisms: Steps  Categorize clients of analysis mechanisms  Document architectural mechanisms Rational Identify Design Mechanisms: Steps  Categorize clients of analysis mechanisms  Document

Ngày đăng: 25/01/2014, 11:20

TỪ KHÓA LIÊN QUAN

w