計算機專業課程dissertationAccording To Christopher Alexander Computer Science
www.mythingswp7.com
06-27, 2015
計算機專業課程dissertationAccording To Christopher Alexander Computer Science
克里斯托弗·亞歷山大設計模式,是關于建筑和計算機科學領域的一種設計模式,它是一個在特定的專業領域解決設計問題時,記錄一個解決方案的正式方式”。換句話說,在面向對象的系統中,設計模式自動分類,描述和評估一些重要的和多次出現的設計。
至從面向對象語言被開發人員選為實現FDView應用程序的一個技術,使用設計模式是使代碼能夠重用和可讀的最好的方法。設計模式幫助開發者推廣解耦和解決問題,通過應用基本的面向對象概念,如繼承、多態、成分、代表團以及FDView設計的封裝性。
根據“四人組設計模式”書上的記載,設計模式分為三組:創建型模式、結構模式和行為模式。
According to Christopher Alexander A design pattern in architecture and computer science is a formal way of documenting a solution to a design problem in a particular field of expertise". In other word, a design pattern automatically classifies, describes and evaluates a significant and a repeating design in object-oriented systems.
Since, an object-oriented language is chosen by developer to implement FDView application, using design patterns can be best way to make code reusable and readable. Design patterns help the developer to promote decoupling and solve problems by applying basic OO concepts such as inheritance, polymorphism, composition, delegation and encapsulation in FDView design.
Based on" Gang of Four" book, design patterns are categorized into three groups: creational patterns, structural patterns, and behavioral patterns.
Referring to intent and applicability of 23 patterns those were defined by GOF authors, the following are selected by developer: Factory Method, Prototype and Command patterns.
工廠模式—Factory Method
According to Gang of Four- Design Patterns , Elements of Reusable Object-Oriented Software, the intent of factory pattern is "Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses".(p.96)
Applying this creational pattern in FDView design lets the users to object instantiating at run time and isolates them from the constructor call of an object.
Next UML class diagram illustrates an implementation of the factory method pattern in FDView design. Three type of classes is seen in this diagram:
Factory: FactoryTool class is a factory class that will generate new objects .
ProductBase : Tool Object class is an abstract or base class for all drawing tools that the factory can create.
ConcreteProduct: ToolLinne, ToolText, ToolColumn1, ToolVessel3, ToolTanks4 and all derived classes from ToolObject are Multiple subclasses of the Product class and drawing tool objects can be generated by drawing method in FactoryTool.#p#分頁標題#e#
To see large scale of factory diagram, refer to appendix ?
Factory Pattern in FDView Design ( UML)
系統指令—Command
According to Gang of Four- Design Patterns , Elements of Reusable Object-Oriented Software, the intent of command pattern is " Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations".(p.199)
This behavioural pattern is applicable when:
An user interface includes GUI menu items and buttons
An application support Undo & Redo actions
Activities needs to execute in multi level
Since, FDView has considered as a rich client application with GUI menus and some functions like Undo, Redo, Move, Add and Delete are essential actions for users, applying the command pattern can be an appropriate pattern which make component constructing easy to sequence and execute.
To design command pattern in FDView system, developer is using the article "The Command Pattern" by David Veeneman available in CodeProject website and "Draw Tools" code available in Google Developers website.
Next UML class diagram shows an implementation of the command pattern in FDView design. There are five type of classes:
CommandBase: Command class is base for all command objects. Two abstract methods (Undo & Redo) are defined in this class to execute commands by Undomanager class.
ConcreteCommand: CommandDelete , CommandChangeState, CommandAdd and CommandDeleteAll are derived classes from Command class and support two basic actions: Undo to returns drawing area to the state before executing this command, and Redo to executes this command again. Implementation of the Execute() method is different in each ConcreteCommand classes which are linked to GraphicsList class.
Invoker: The UndoManager class askes CommandDelete , CommandChangeState, CommandAdd and CommandDeleteAll classes to respond to user request.
Receiver: GraphicList class is a receiver class which has Add(), Insert(), DeleteSelection(), Replace(), RemoveAt(), DeleteLastObject() , MovetoBack(), MovetoFront() methods. These methods are executed when one or more commands are invoked.
Client: FDV.DrawArea is client side which creates Command objects and set those to GraphicList object.Command Pattern in FDView Design (UML)
設計模式的原型—Prototype
According to Gang of Four- Design Patterns , Elements of Reusable Object-Oriented Software, the intent of prototype pattern is " Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype".(p.122)
This creational pattern is applicable when:#p#分頁標題#e#
Complex systems those are expensive to creating a new object
Considering FDView application as a complex drawing system which is required to instantiate drawing tool objects frequently, using prototype can be a total success which bring the following advantages in system :
Adding and removing drawing objects at run-time
Permits users to modify drawing objects without altering the original
Cloning is a cost-saving way to instantiate objects
Next UML class diagram describes an implementation of the prototype pattern in FDView design. Two type of classes are identified:
Prototype: DrawObject class is an abstract and base class for the drawing tool object which can be added and cloned. Clone() method is a virtual method that returns a drawing tool object.
ConcretePrototype: DrawValve1, DrawVessel1, DrawVessel2, DrawTank1, Drawline, DrawText and other derived classes inherit from the Drawobject class and Clone method are overridden in all of them to implement the duplication of their properties. To implement extra functionality, these derived classes contain extra required method such as Draw().
CommandDelete, CommandDeleteAll, CommandAdd and CommandChangeState are client classes to ask for drawing tool objects clone.
Prototype Pattern in FDView Design
界面設計和人機互動—Interface Design and Human Computer Interaction
By analyzing the results of interview and questionnaire and comparing competitive softwares, the potential problems have been identified and target users are considered as the expert and intermediate users who have knowledge of computer interaction.
Based on these facts, the chosen usability goals to optimize interface design and content, and achieve a fit between users, computer, and tasks in new design, are "Error" , "Efficiency", "User satisfaction" and "Effectiveness".
程序錯誤—Error
As the majority of users are defined as the expert users who use the application frequently, so an error tolerant program is required to prevent errors caused by the user's interaction, and to help the user in recovering from any errors that do occur. For example, provide a saving dialogue box before closing the application is crucial.
The ultimate goal is a system which has no errors. But, the developer is human, and computer systems are far from perfect, so errors may occur . In order to design FDView with minimum error rate, below are the design principles that are used:
反饋意見—Feedback
UI Feedback simply consists in having the System visually respond to user action. if user selects an equipment, he/she needs to see that equipment is selected.#p#分頁標題#e#
Here are some of feedback actions to be made:
Highlighting the buttons when mouse over.
Changing colour of selected tab in a tab control
Displaying a selected object in rectangle shape.
Show feedback message in certain action ( e.g. when objects other than line are selected to change colour or pen width, etc)
約束條件—Constraint
The design concept of constraining refers to determining ways of restricting the kind of user interaction that can take place at a given moment. (Preece et al, 2002). To prevent errors or doing unnecessary possible actions that can be performed, following are some of the constraint that should be applied in FDView application:
Using dropdown lists to prevent of entering wrong data such as font and datasheet's name.
Allow just numeric values to be typed in text boxes in calculation part.
功效—Efficiency
An efficient interface design enables users to accomplish tasks without wasting their time or require them to do extraneous procedures than is strictly necessary. In achieving the Efficiency goal for FDView system, below are the design principles that are used:
操作簡易—Simplicity
If things are simple they will be easy to understand, learn and remember. Here are some of actions to should be considered to make FDView interface more simple and efficient:
Using progressive disclosure (show the user only what is necessary)
Grouping Related option together in menu
可見性—Visibility
Designing for visibility means that just by looking, users can see the possibilities for action. Here are some of visibility actions to be made
Use the appropriate font size for buttons and labels.
Keeping the most commonly used options for a task visible (and the other options easily accessible).
Writing descriptions that are clear, factual and free of excessive superlative.
一致性—Consistency
Place screen components in consistent increases users ability to remember and predict outcomes and processes. To strive to be consistent, FDView application will contain the following points:
Graphically and interactively consistent from tab page to tab page, section to section.
Consistency principles can be applied to color coding, Icon style, button placement and interactive icons, in the same terminology and the same organization of actions throughout the application.
Follow the platform conventions.
精通熟練—Familiarity
#p#分頁標題#e#
By applying familiarity concept in FDView design, users enable to recognizes interface components more easily. User-interface metaphors can be widely used to create FDView menus more familiar and efficient.
暗喻—Metaphor
Metaphor is a conceptual model that has been developed to be similar in some way to the aspects of a physical entity. Following are some of the metaphor can be applied FDView :
Using New, Open and Save metaphors in File menu.
Using Delete, Clear, Undo, Redo and Select All metaphors in Edit menu.
Using Rotate, Pointer and other metaphors in home tab page .
Using Page setup, Print Preview and Print in Report tab page.
有效性—Effectiveness
Since FDView is a rich client application with high functionality , reaching Effectiveness goal, can fulfil user's needs by placing required functions in FDView system. Following design principles are applied to FDView interface to make this design more effective :
實用性—Utility
Utility is providing a proper set of functions that allow users to get their tasks complete in the way they want. To provide high utility, all required functions by users, must be developed : Drawing, Editing, Inserting, Rotating, Exporting, calculating and other functions
靈活性—Flexibility
A flexible tool can be used in multiple environments and may address diverse needs. If a design has a high degree of flexibility, it will prove more useful than a design that involves a low degree of this factor. Here are some of Flexibility actions should be made:
Create Flow diagrams , print publishing
Export images in diverse format
Drawing, Calculating and Opening Datasheet at the same
客戶滿意度—User satisfaction
Satisfaction refers to the users' overall emotional experience when using the system. To achieve this goal by using FDView, user satisfactions are viewed in the context of:
滿意度—Satisfying
The goals of designing interactive products to be pleasurable and supportive are concerned primarily with the user experience. This means the interaction with the system feels like to the users.
The interfaces match the users task in as natural a way as possible.
Good graphic design is important to present a simple and natural interaction.
Provide shortcut keys the users can select when using FDView.
Making information appear in a natural and logical order.
有幫助的—Helpful
To provide an informative and helpful design, following actions should be considered in FDView application:#p#分頁標題#e#
Provide description for Equipments
Provide the Tool tips for every button
Provide Help Menu
Use plain language
如果您有論文代寫需求,可以通過下面的方式聯系我們
點擊聯系客服