CASE TOOL TO ENHANCE SYSTEM DEVELOPMENT

May 20, 2017 | Autor: Dr. Doaa Samy | Categoria: Software Engineering
Share Embed


Descrição do Produto

CASE TOOL TO ENHANCE SYSTEM DEVELOPMENT Doaa Sami Abou sreaa'1Dr.Mostafa Sami,2 Dr.Hala Abed El-Galil,3 1. Teaching Assistant, CS Department, Collage of Information Technology, Misr University for Science and Technology. 2. Prof. of Computer Science, Faculty of Computers and Information, Helwan University. 3. Dr, of Computer Science, Faculty of Computers and Information, Helwan University.

Abstract This paper is a UML based development research project to build a tool to enhance software system development. One of the main objectives to this research is to design the tool with reusable Design Patterns which is not available in the other commercial tools. The tool focuses on building case tool for code generation that maps the syntax and semantics of a Class Diagram and Package Diagram into multiple High level object-oriented languages such as C++, C#,VBasic.Net and Java . The Tool is planned to be an open source software to facilitate other developers' contributions. For achieving the main objective which is the Code Generation, the paper presents also another two supportive objectives. The first one is the design of a Design Pattern for transforming the information delivered by the developer on these diagrams to reusable design patterns of two of the UML diagrams. Namely the Package diagram and the Class diagram which are the target of the research project. The -1-

second supportive objective is the development of an OCL and MetaInfo based on the OCL specification documents identified by OMG. Keywords: Unified Modeling language, Design pattern

Language,

Object

Constraints

1. Introduction Object oriented approach is the modern paradigm for software development where the main building block of all software systems is the object or class. Most current programming languages and the recent applications are often Object-Oriented. Object-oriented development provides the conceptual foundation for systems development out of components using new technologies such as Java Beans [4]. In that sense, developers are faced with a challenge of capturing the domain semantic for representation in object-oriented paradigm. They are faced with the need to have modeling languages that is expressive enough for building models representing different views. The Unified Modeling Language is the answer for these requirements [7]. Many of the current UML tools have different techniques to store the visualized diagrams. Transforming the information in reusable Design Patterns is not supported in any of them. The idea behind using reusable Design Patterns, in general, is to help in building easy, and nonexpensive interactive Graphical User Interface (GUI) compared to the other UML tools such as Power Designer by Sybase

-2-

Corporation which is a powerful technology for business modeling and UML object modeling

combined [5, 8].

The tool, which is presented in this paper is planned to be an open source software to facilitate other developer's contributions, besides using the wide usage of UML standards. This tool is focusing on implementing two of the UML diagrams, which is the class diagram and the Object diagram. Other diagrams can be added to this tool by following the same procedure applied on the implemented diagrams. The tool is based on the UML 2.1 meta-model and is able to store the visualized diagrams in reusable design patterns. The Design Patterns implemented by the XML language [3, 5, 8]. 2. The tool research project Mapping the UML models to different high-level object-oriented programming languages such as Java, C++, etc is an important requirement for software development [6]. Many commercial UML tools provide this mapping but they have a number of shortcomings; some neglects the constraints on model elements defined by the Object Constraints Language (OCL) that customize the code to be generated. Another shortcoming is that some tools have no ability to maintain UML diagrams elements in Design Patterns for future reuse. Solving these problems will augment and improve the development and implementation of new software systems. The tool is a UML based research project to build a tool for enhancement software development process. There is another project called Al-TOSSE is also a UML based research project to build a tool -3-

for software development. The research has been divided into phases, the first two phases are: -

The first phase is Al-Tosee editor. The editor is capable of drawing and manipulating two of the UML diagrams, these are the Use Case diagram and the Class diagram [1].

-

The second phase of the research is namely, Al-Tosee code generator. The outcome of this research is code generator based on Object Constraint Language (OCL) that maps the syntax and semantics of a Class diagram to an Object-Oriented Programming Language which is Java. So this project can do forward engineering to only one language which is java [2]. The research tool's main design objectives for building and

developing such a tool from scratch is to overcome some of the shortcomings of the current tools, mainly the no inclusion of the OCL, Meta-Model, and unavailability of reusable design patterns. Another objective is to design the tool with an easy interface that is not available in the other UML known tools. The research has been divided into two phases: - The first phase is building the reusable design patterns. These patterns are capable of drawing and manipulating two of the UML diagrams instead of relational database used in al-tosee project to achieve the idea of reusability; these are the package diagram and the Class diagram [3]. - The second phase of the research is to integrate the Object Constraint Language (OCL) and Meta-Model to generate -4-

customized code that maps the syntax and semantics of a Class diagram

and

package

diagram

to

an

Object-Oriented

Programming Language like Java, C++, C#.net and VBasic and the tool also can make reverse engineering to translate the high level programming language which are supported in the tool to the two used diagrams in the tool again, this operation called reverse engineering [7]. The case tool is capable of do forward and reverse engineering to multiple high level languages. The tool is planned to be Open Source Software to the object-oriented community in order to be enhance by the contributions of other researchers and developers, besides supporting the wide usage of UML standards. 3. Design patterns In software engineering, a design pattern is a general reusable solution to common problem may be faced by the software designer. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Design patterns can speed up the development process by providing tested, proven development

paradigms.

Effective

software

design

requires

considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues -5-

that can cause major problems, and it also improves code readability for coders and architects who are familiar with the patterns [3]. 4 The proposed requirements of the tool Requirement analysis defines the characteristics that have to be represented in the tool. The ability of the tool to meet these requirements

allows

it

to

be

distinguished

amongst

other

commercially available tools. While the code generation is the main requirement for automatic mapping of the class diagram and package diagram into a high-level programming language taking into account the OCL constraints and Meta-Model which is the most important characteristic in the tool; there are a set of other characteristics to be achieved such as Applying Standards, Reusability, Integration, friendly Graphical User Interface, Documentation and Comments, Deployment Environment, Error Detection and Throwing exceptions; besides it is an Open Source . For simplifying requirements collection, presentation, and defining the scope of the tool a use case model is used as the basic concept to represent requirements in different iterations of the product life cycle. Figure (1) illustrates the main use case model of the tool; including actors and their interactions with system use cases.

-6-

Figure 1 Use case model for the tool

-7-

Each use case may have more than one scenario and other use cases. These scenarios will be discussed in the next section. 5. The tool analysis Each use case has at least one scenario. These scenarios describe the different behaviors of that use case. The following subsections represent a sample of the main use cases scenarios (workflows) using the UML activity diagram.

5.1 The "edit diagram" use case: Edit Diagram contains Adding classes or interfaces, single aggregation, multi aggregation, Creates (single), creates (multi), references(single), references(multi)

as seen in figure (2) and its

description in table (1). This case allows the end user to edit, draw or delete diagram components and it has three extended use cases:  Edit component  Delete Component  Draw Component

-8-

Table (1): The "edit diagram" use case description

Criteria

Details

Name of Use case Edit diagram Precondition

The end user must open the editor tool and create a project and inside it create a project component 

Adding a new diagram from the tool box to the drawing panel.

 Normal flow of events

Specifying the name and a short summary for the documentation of the diagram.



Edit a diagram details by using the details withered, these edits include, adding, editing or deleting fields.



The

user

can

remove

undesired

components. Exception or

You must specify the Component name.

Errors flow of

The component name is already exists.

events Activity Diagram Presented in the figure Notes (optional)

The user can create the diagram using the toolbox without needing the menu bar.

-9-

Figure 2 Activity diagram for the "Edit Diagram" use case

5.2 The "code generator dll" use case The code generator is a tool that translate the diagrams into a high level languages such as C#, this process is handled by a dynamic linked library (DLL) called code Generator.Dll. This use case contains the constraints and rules of the high level language as seen in figure (3) and its description in table (2).

- 10 -

Table (2): The "code generator dll" use case description

Criteria Name of Use

Details Generate Code

case The end user must construct a project then Precondition

components then diagrams. The user must choose a language. 

Select the tools menu, engineering then choose code generators then specify the path in which the code will be stored.

Normal flow of

Adding a plug-in is optional (another

events

code generator). 

Choose a language from the available list of high level languages.

Exception or

There are no Diagrams.

Errors flow of

No code generator specified.

events Activity

The user did not select a language Presented in the figure

Diagram

- 11 -

Figure 3 Code generator activities

Figure 4 Create project activities

- 12 -

5.3 The "create project" use case Create sub project by providing its name, author and summary as seen in figure (4) and its description in table (3).

Table (3): The "create project" use case description Criteria Name of Use case Precondition

Details Create project Select new project from menu item. 

Select new project from the menu item.

Normal flow of events

Exception or Errors



specify the project name



specify the author name (optional)



Write a summary (optional)

There is a duplicate project name.

flow of events Activity Diagram Notes(optional)

Presented in the figure The user can create the project using the toolbox without needing the menu bar.

5.4 The "create component" use case Create sub project by providing its name, author and summary as seen in figure (5) and its description in table (4).

- 13 -

Table (4): The "create component" use case description Criteria

Details Create component

Name of Use case

Select new component from menu item.

Precondition

 Select new component from the menu item.  specify the component name

Normal flow of

 specify the author name (optional)

events 

Write a summary (optional)

Exception or Errors There is a duplicate component name. flow of events Activity Diagram Notes(optional)

Presented in the figure The user can create the component using the toolbox without needing the menu bar.

Figure 5 Create component activities - 14 -

5.5 The "remove component" use case Allows the end user to exclude the undesired previously created components from the project as seen in figure (6) and its description in table (5). Table (5): The "Remove component" use case description Criteria Name of Use case Precondition Normal flow of events

Details Remove component A component must be created first. 

Select component from the diagram.



Select remove component



Confirm deletion

Exception or

If the component is connected to another

Errors flow of

two components without any other link

events Activity Diagram

between them will throw Presented in the figure

Figure 6 Remove component use case activity diagram - 15 -

5.6 The "save diagram" use case This use case allows the end user to save the created or edited diagrams as an XML format or just a picture (screen shoot) on the secondary storage device as seen in figure (7) and its description in table (6).

Table (6): The "Save diagram" use case description

Criteria Name of Use case Precondition

Details Save Diagram First the diagram must be activated. The extension must be specified. 

While the diagram is active Select save from the menu items.

Normal flow of events



Specify the path.



Specify the name and extension of the file

Exception or Errors flow of events Activity Diagram Notes(optional)

 If there exist the same diagram name with the same location will throw Duplicate Diagram name.  There is no active Diagram or project. Presented in the figure The user can save the diagram using the toolbox without needing the menu bar. - 16 -

Figur7 save use case activity diagram

5.7 The "open diagram" use case The open is the reverse process of the save in which it retrieve the diagram structure from the XML files saved earlier by the save command as seen in figure (8) and its description in

- 17 -

table (7).

Table (7): The "Open diagram" use case description Criteria Name of Use case Precondition Normal flow of events

Details Open Diagram Close or Save the active diagram if it exists. Select open file and then browse for the target file.

Exception or Errors The file is not an XML file flow of events Activity Diagram Notes(optional)

Presented in the figure The user can save the diagram using the toolbox without needing the menu bar.

Figure 8 Open use case activity diagram - 18 -

5.8 The "open plug-in" use case Allows the end user to open samples or using them to update the active diagram by appending the plug-in in the active diagram and its description in table (8). Table (8): The "Open plug-in" use case description Criteria Name of Use case Normal flow of events Exception or Errors

Details Open plug-in Diagram Select open plug-in file and then browse for the target file. The plug-in file is not an XML file

flow of events Activity Diagram

Presented in the figure The user can open the plug-in diagram

Notes(optional)

using the toolbox without needing the menu bar.

6. The proposed requirements of the tool Based on requirements analysis represented through use case and different scenarios, the design discipline will produce the overall architecture and specifications that can be efficiently implemented. The tool classes are grouped into packages. Some of these groups of classes are identified in the analysis model. Each group of classes has to be closely related, so that resulting package has a clear and welldefined purpose. The tool identifies six distinct types of classes which are: - 19 -



Pattern identification classes: Stores the different pattern designs



Code Generators: It contains the following group: a) Code generator interface layer: contains the form which the end user chooses the generator desired. b) Language generator: It contains the OCL classes for the following object oriented language: C++, C#. Java and VB.NET. c) Interfaces: It handles or stores the interfaces of the code generator class Group.



Graphical User interface and drawings: The classes in this group encapsulate the Graphical interface needed to interact with the user for drawing the models. These classes work together to construct the tool's layout. Each class of The GUI Group has its own structure and functionality and it also handles drawing UML diagrams.



Plug-in definitions classes: This group handles the opening, editing and appending samples and plug-ins on the system.



Reverse Engineering classes: This group handles the .NET assembles reverse Engineering in which it constructs a UML diagram from a C# code.



Themes classes: Handles the drawings shapes and coloring.

- 20 -

7. Conclusion This paper presents a UML tool which capable of visualizing two of the UML diagrams, namely, the Class Diagram and the Package Diagram [8], and generates thee into High Level Language Code. It was claimed that by mapping the UML class diagram and package diagram to any object-oriented programming language is speeding up the process of developing new software systems. The design of the tool is based on creating a customizable tool that can be extended and enhanced. The tool is a free of charge open source to the objectoriented community to facilitate the interested developers to develop and enhance the tool capabilities and map of the UML diagrams to a complete object-oriented code. The design of the tool overcomes some of the drawbacks mentioned early, namely, the inclusion of UML standard notations, and the ability to get the drawing notations from Design Patterns instead of having a relational Database. The tool goes through three steps which are: Step (1): The development of Design Patterns to visualize the elements of two of the UML diagrams (Package and class diagrams). Step (2): The development of an OCL rules which plugged in the Design patterns with syntactical checks for two types of constraints; the invariant constraints applied on the class, and the pre/post constraints applied on a class’s operations. Step (3): The development of the tool generator that retrieves all class’s elements from the Design patterns including the OCL constraints and generates valid High level language code. - 21 -

The tool research project will continue to evolve. This paper presents the processes of gathering requirements, analysis, and architecture design of the tool research project, namely case tool to enhance system development. The implementation issues and the achieved functions of the tool will be introduced in a separate future article. Because of the UML extendibility, the tool design may be developed to support the diagrams of the recent version of UML. As a result of adding these new diagrams into new Design Patterns to visualize the new notations of these diagrams. Future work Throughout this thesis there are some suggested topics for future work to develop the functionality of the editor. In this subsection, there are several issues which could be raised. The UML casetool may be extended in several areas: 

Implementing additional UML2.1 Diagrams In addition to the class diagram and package diagram, the casetool may be modified to draw the rest of the 13 UML2.1 diagrams. Because of UML extendibility, the casetool may extend to include several features of the coming versions of the UML.



Improve the graphical user interface The UML casetool's GUI has set the standard to where the functionality is placed in the GUI, and the possibility of adding additional functionality without too many changes in the code and GUI. Also, adding some preferred features to the casetool - 22 -

like increasing the error checking tips to help the user when an illegal operation is occurred and implementing some error prevention actions like the "undo" action to enable the user to go back. 

Multi-user environment. The case tool may be improved to be used in a distributed environment.



A complete translation of the OCL constraints Improve the generated code with providing a complete translation of the different OCL expressions, collections, and stereotypes. So there is a need for reengineering of the OCL classes to validate these expressions. These classes have to be available for free to the object-oriented community in order to encourage the use of OCL with UML modelers.



Creating other high-level language code generators The UML code generator architecture could be restructured to implement new code generators for high-level programming languages, like XML.

- 23 -

References: [1] Ahmed Reda Dawood, Mostafa Samy, and Ali Abd-Elkhalik, AlTosee, A UML development Tool, Al-Azhar University Engineering Journal (AUEJ), Vol. 8, No. 10, April 2005, pp217235. [2] Ahmed Reda Dawood, Mostafa Samy, and Mohammed mostafa, developing an engine for mapping UML diagram, Arab Academy for Science, Technology, and Maritime Transport. [3] Galal H. Galal-Edeen, Mohamed Osama Khozium, Reham Adel Ali, Towards Using Patterns for User Interface Design, February 2008. [4] Joey F. George et al, Object-Oriented Analysis and Design, Prentice-Hall, December 2003. [5] Kai Blankenhorn, A UML Profile for GUI Layout, Master's Thesis at the Department of Digital Media of the University of Applied Sciences Furtwangen in the summer term 2004. http://www.bitfolge.de/pubs/thesis/. [6] Martin Fowler, UML Distilled: A Brief Guide to the Standard Object Modeling Language, Third Edition, Addison Wesley, 15 September , 2003. [7] Stephen C. Perry, Core C# and .NET, Prentice Hall PTR. [8] Welie, M. a. T., H. (2000). "Interaction Patterns in User Interfaces." PLOP2000 conference, Illinois, USA.

- 24 -

‫الملخص‬ ‫تعددل ل دددم ال ملمددم الم دددل ‪ )UML‬هدددل الع مددس الماددد يل الددلي عتمدددل يل ددد‬ ‫مط ري البرامج فل ت ل ل ت ث ق ال مد ل لب د ن مد ت تمتدع بدبعض الخد اص الا مدم مثدس‬ ‫اآلم ن ق بل م التط ر الثب ت ي ل التش س ‪.‬‬ ‫تد فر‬

‫ل د فددل اد ق البرمم د ت بعددض البرمم د ت التددل تم ددن المطد ر ن مددن‬

‫ت ب ن هله ال م ل الفع لم إلى برامج تق ت بتطب ق‬ ‫ب ن م ل ل م ال ملمم الم ل‬ ‫المق س التل أقرتا ممم يم إلار ال ئن ‪. )OMG‬‬ ‫أهت م ؤخل فدل اعيتبد ر أن تتادت امادم المادتخلت المرئ دم ‪ )GUI‬الخ صدم‬ ‫باددله الب درامج ب لبا د طم ل ددل تم ددن الماددتخلت مددن راددت الرم د ا الخ صددم بل ددم ال ملمددم‬ ‫الم دددل بادددا لم ادددر ل دددن ه ددد ا بعدددض المع قددد ت التدددل تقددد أمددد ت المادددتخلت ي دددل‬ ‫ااتخلات هله البرامج م ا أن بعض هله البرامج قل تامس بعض الرم ا األا ا م الخ صم‬ ‫بل م ال ملمم الم ل ‪.‬‬ ‫قل تت اخت ر ألا لت ا ن تط ر مت البرمم ت ه مشر ع ال‬

‫إلى تطد ر‬

‫م ت برمم ت ت ح بإم م ب ن ال م ل الخ صم بل م ال ملمدم الم دل أ ضد إم دم‬ ‫ت ددس ال مد ل المرئ ددم إلددى العل ددل مددن ل د ت البرممددم الشد ئ م ‪)Code Generation‬‬ ‫اادددتخلات الل دددم الشدددرط م لل ددد ئن ‪ )OCL‬التدددل هدددل مدددن أهدددت خصددد ئص ل دددم ال ملمدددم‬ ‫الم ددل تت د س هددله اللرااددم ب د ن م د لم ن مددن م د ل ل ددم ال ملمددم الم ددل هم د‬ ‫م د ل ال د ئن ‪ )Class Diagram‬م د ل ال امددم ‪ )Package Diagram‬م د‬ ‫تعرض األلا بعض الخص ئص التل لت تت لا بعض البرامج المت دم فدل األاد اق د‬ ‫أن األلا تق ت بتخا ن ااترم ع ال م ل من أ م ط تصم م ت م ها إلي ل اعاتخلات فل‬ ‫أي ألا أخرى ‪.‬‬

‫‪- 25 -‬‬

Lihat lebih banyak...

Comentários

Copyright © 2017 DADOSPDF Inc.