object oriented design process. apply design axioms to design classes, their attributes, methods,...
TRANSCRIPT
object oriented design process.
• Apply design axioms to design classes, their attributes, methods, associations, structures and protocols.
• Design the access layer.
• Design the view layer classes
• Iterate and refine the whole design. Reapply the design axioms and if needed repeat the preceding steps.
OBJECT ORIENTED DESIGN AXIOMS
• AN axiom is a fundamental truth that always is observed to be valid and for which is no counterexample or exception.
• A theorem is a proposition that may be self –evident but can be proven from accepted axioms.
• The author has applied Suh’s design axioms to object-oriented design.
•
Corollary
• 1: Uncoupled design with less information content
• Corollary 2: Single purpose
• Corollary 3: Large number of simple classes
• Corollary 4: Strong mapping
• Corollary 5: Standardization
• Corollary 6: Design with inheritance
• Axiom 1 deals with relations between system components and axiom 2 deals with the complexity of design.
• AXIOM 1: THE INDEPENDENCE AXIOM: maintain the independence of the components.
• AXIOM 2: THE INFORMATION AXIOM: minimize the information content of the design.
Clienthost
Serverhost
Clienthost
Part of the rationale
• Specialization:– Clients specialize in user interface– Servers specialize in managing data and
application logic
• Sharing:– Many clients can be supported by few servers– Often data and logic are shared among
applications and users
Client/server
Peer-to-peerServer
“I want to access some information”
“I want to collaborate
with my colleague”
Client
Distinctions
• Client-server– Asymmetric relationship– Client predominately makes requests, server
makes replies
• Peer-to-peer– Symmetric relationship
ClientServer
Client
Email client sends message to server
Message is stored on POP server
Later, recipient’s email client retrieves message from server
Email application
Client
Server
Client
Chat clients send user’s typing to server
Chat server aggregates typing from all users and sends to all clients
Other user’s clients display aggregated typing from chat server
Chat application
Presentation
Applicationlogic
Shareddata
Local-area network
Note: many clients perapplication server, severalapplication servers per data server
Three-tier client/server
Client
Webbrowser
Webserver
Application logic
Databases and DBMS
Commongatewayinterchange
Host architecture
Application partition
Practice in defining tiers
• Online bookseller (e.g. amazon.com)
• Stock trading system (e.g. Schwab or E-trade)
amazon.com
Schwab
Question
• What types of social applications would be appropriate for a client/server architecture?
Departments
Enterprise
CommerceEnterprise-to-enterprise
Consumer
Customers
Consumer Enterprise
Customer-servicedepartment Technical-support
department
software4u.com
Web server
Customer logic
Customeraudit
Softwaredocumentation
Webbrowser
Problemknowledge
base
Databases
Agent logic
Consumerapplication
Enterpriseapplication
Technician logic
Web server
Webbrowser
Web server
Webbrowser
Cus
tom
er c
are
Accounts Products Orders
Customer logic
Databases
Agent logic
Customers Agents Technicians
Technician logic
Book distributioncenters
books4u.comCustomers
Financial institution
Consumer Enterprise Inter-enterprise
Web server
Customer logic
Customers Merchandise
Webbrowser
Orders
Acquirerbank
Bookdistributors
Databases
Outside links
Fullfillment logic
Consumere-commerce
Inter-enterprisee-commerce
Boo
k m
erch
ant
Clients
Customers Merchandise
Acquirerbank
BookdistributorsOrders
Customer logic
Databases
Fullfillment logic
Stock marketstocks4u.com
Customers
Information providers
Consumer Enterprise Inter-enterprise
Web server
Customer logic
Accounts Products
Webbrowser
Orders
Informationproviders
Financialmarkets
Databases
Outside links
Trading logic
Consumere-commerce
Inter-enterprisee-commerce
Sto
ck tr
ader
Clients
Accounts Products
Informationproviders
FinancialmarketsOrders
Customer logic
Databases
Trading logic
Local floristsflowers4u.com
Customers
Financial institution
Consumer Enterprise Inter-enterprise
Web server
Customer logic
Accounts Products
Webbrowser
Orders
Acquirerbank
Databases
Outside link
Fullfillment logic
Consumere-commerce
Inter-enterprisee-commerce
Push client
Push server
Flo
rist
del
iver
y
Accounts Products
Acquirerbank
Orders
Customer logic
Databases
Fullfillment logic
Customers Florists
Shortcomings of client/server
• Departmental solution
• Proliferates non-interoperable technologies and applications
• Hardwired applications lose flexibility
What are some goals and likely characteristics of future enterprise architectures?
Forms and entry windows
• It provide access to data that users can retrieve , display, and change in the application.
Dialog boxes
• It display status information or ask users to supply information or make a decision before continuing with a task.
• Ok or cancel
Application windows
• An application window is a container of application objects or icons. In other words , it contains an entire application with which users can interact.
Guidelines for designing forms and data entry windows
• In general, what kind of information will users work with and why? For eample, a user might want to change inventory information , entry orders or maintain prices for stock items.
• Do users need access to all the information in a table
• In what order do users want rows to appear?• Next identify
• Navigating rows in a table, such as moving forward and backward , and going to first and last record.
• Adding and deleting rows.
• Changing data in rows.
• Saving and abandoning changes.
• Menu push buttons
• Paper form such as a printed invoice, as the starting point for your design.
• Users scan a screen in the same way they read a page of a book, from left to right and top to bottom.
• When information is positioned vertically, align fields at their left edges.
• When entering data, users except to type information from left to right and top to bottom, as if they were using a typewriter.
Guidelines for designing dialog and error messages
• A dialog provides an exchange of information or a dialog between the user and the application.
• Your error message should be positive. For example instead of displaying “ you have typed an illegal date format” display the message “ enter date format mm/dd/yyyy”
Guidelines for the command buttons layout
• Layout out the major command buttons either stacked along the upper-right border of the dialog box or lined up across the bottom of the dialog box.
Guidelines for designing application windows
• A typical application window consists of a frame that defines its extent and a title bar that identifies what is being viewed in the window.
• File menu-new, open , print, save • Edit menu- cut, copy, paste• View menu• Window menu• Help menu
Guidelines for using colors
• For all objects on a window , you can use colors to add visual appeal to the form.
• You can use identical or similar colors to indicate related information. For example , savings account fields might appear in one color.
• For an object background , use a contrasting but complementary color.
Guidelines for using fonts
• Use commonly installed fonts, not specialized fonts that users might not have on their machines.
• Use bold for control labels, so they will remain legible when the object is dimmed.
• Using too many font styles , sizes and colors can be visually distracting and should be avoided.
Prototyping the user interface
• Rapid prototyping encourage the incremental development approach
Guidelines for designing dialog boxes and error messages: -
• 1. Your error message should be positive.
• 2. Your error message should be constructive.
• 3. Your message should be brief and meaningful.
• 4. Orient the controls in the dialog box in the direction people read.
Guidelines for the command buttons layout: -
• 1. Position the most important button• 2. If you see OK and Cancel buttons,
group them together.• 3. If you include a Help command button,
make it the last button in the set• 4. Avoid making this button the default
button • 5. Make buttons a consistent length.
Guidelines for designing application windows: -
• 1. File Menu: this provides an interface for the primary operations that apply to a file.
• 2. Edit Menu: Include general purpose editing commands on the Edit menu.
• 3. View menu and other command menus • 4. Window menu • 5. Help menu – contains commands that provide
access to Help information.• 6. Toolbars and status bars: special interfaces
constructs for managing sets of controls.
Guidelines for using colors: -
• 1. You can use identical or similar colors to indicate related information.
• 2. For an object background, use a contrasting but complementary color.
• 3. You can use dim colors to make other elements less noticeable.
• 4. using too many colors can be visually distracting and will make your application less interesting
• 5. Allow the user to modify the color configuration.
Guidelines for using fonts: -
• 1. Use commonly installed fonts, not specialized fonts that user might not have on their machines.
• 2. Use bold for control labels.• 3. Use fonts consistently within each form and
among all forms in your application• 4. Using too many font styles, sizes and colors
can be visually distracting and should be avoided.