Speciffing: Object-Oriented
Speciffing: Object-Oriented
Speciffing: Object-Oriented
Abstract. Design patterns provide good solutions for problems occurred in the design stage. Using
design patterns in the software development processes helps improve productivity and quality of
software products. Pattern Oriented Analysis and Design Process has fow steps related to patterns,
namely the acquaintance with design patterns in the pattern library, the retrieval of the pattem
candidate, the selection ofsuitable patterns and the application ofselected patterns. It is necessary
to have a method to specify pattems in a machine understandable form to automate the above four
steps. Some works have hied to specify the sbuctural aspects of design patterns by ontology. We
add the specification ofthe behavior aspects into design pattern ontology so that this ontology can
be used to automate steps in the Pattern Oriented Analysis and Design Process.
t
Kel,words: design pattern, OWL, Ontology'
In the naditional way, to carry out the kr this paper, we propose a method to
acquaintance and the retrieval activities, all specifu both the structural aspects and the
patterns need to be read and the intent section behavior aspects of pattems using OWL. Our
and the applicability section in document are idea is speciffing the applicability context of
focused. Identiffing and retrieving set of design patterns in the form of object model to
pattern candidates are performed manually. compare the application requirements with the
These activities take much time and effort. So, applicability section of design pattems
it is necessary to automate these activities. If automatically. This technique can therefore
the retrieval step is automated then the assist in retrieving pattern candidates.
.
acquaintance step isn't necessary in POAD. The rest of this paper is organized as
To retrieve set of pattern candidates for a follows. Section 2 introduces an overview of
software system automatically, we need a Ontology and OWL. Section 3 and section 4
technique that allows comparing automatically represent our contribution, a method to specifu
the requirement specification of the software patterns and rehieve the pattern candidates from
system with the context in which pattems ontology. We also illustrate in these sections
should be applied (the applicability context of our approach's implementation and an example
patterns). However, the comparison depends on of retrieving the pattern candidates from our
the specification method for the software ontology to be used in refining Customer-
requirements and the applicability context of Account management system. The last section
patterns. gives some perspectives and concludes the
There were some specification methods for paper.
Design Pattems (Pattems). Gamma et al
described twenty three patterns using text and
IJML [2]. Maplesden introduced a set of graph 2. Ontology and OWL
notations to model patterns t3]. These
specifications assist us in understanding Ontology defines a common vocabulary for
patterns. researchers who need to share information in a
Most of the elements of an OWL ontology We can use some of languages to develop
concern classes, properties, instances of classes ontology such as LOOM, LISP, XML, SHOE,
(individuals), and relationships between these OIL, DAM+OIL, RDF, RDFS, OWL' In this
instances. research, we use OWL to build"the design
pattern OntologY.
The data described by an OWL ontology is
interpreted as a set of "individuals" and a set of
"property assertions" which relate individuals to 3.l.Developing the design patterils ontologt
one another. An OWL ontology consists of a set using OW
of axloms which place constraints on sets of
individuals (called "classes") and the types of The design pattern ontology is defined with
relationships permitted between them' These classes, namely DesignPattern, Catalog,
axioms provide semantics by allowing systems Participant, Operation and ApplicationClass'
to infer additional information based on the data The class Catalog classifies a pattern according
explicitly provided. to different categories. The class Participant
OWL is the semantic web mark-uP specifies information about participants in
language. A big advantage of it is openness' patterns. Methods of these participants are
Therefore, we can share }nowledge in the OWL specified by the class Operation' The class
ontology via internet and new knowledge can Participant and the class Operation represent the
also be added easilY. collaboration of participants and therefore
represent the behavior aspect of pattems' The
3. The Design Pattern OntologY ' class ApplicationClass describes the conte4t
where patterns should be applied. Attributes of
We develop the design pattern ontology to
classes in ontology are shown in the table 1'
share design patterns and to share experience in
using design Patterns.
Table I . Properties of classes in DP Ontology
Attributes of Value
Intent DataTlpeProPertY Text
InCata The class
In the pattern document, the context is and the collaboration of these objects' For
described by text. However, in our approach, example, the specification of the applicability
applicability contexts of design patterns are context of Composite paltern is presented
specified visually by a set of objects and visually by the class diagram in the figure 1'
collaborations among them. The applicability There are whole class (e.g' PICTURES) and
partial classes (e.g' LINES and CIRCLES)' The
context of design pattems is specified by
objects which are instances of the class Class relationship among these classes is composite
92 V.D. Huong et al. I lrl{Il lournal of Science, Natural Sciences andTechnology 25 (2070) 8g-g4
MAu thiiSt k6 cung cip cdc gi6i ph6p ttit cho chc viln dO ndy sinh trong giai do4n thi6t ki5 hQ th6ng.
Ti6n trinh phAn tich, thi6t k6 huong m5u @OAD) ld tiiin trinh phdn mAm hucmg di5n mpc ti6u tdng khd
ndng srl dgng mlu thi6t t6. POAD c6 b6n bu6c lin quan diSn mdu: Idm quen vdi c6c miu trong thu
viQn m6u, ldy ra c6c miu ring vin phir hqp v6i hQ thdng hiQn t4i,lqa chpn mdu phir hqp nh6t trong
danh s6ch mAu rlmg vi6n, sf dung cdc miu dd chon di5 thi6t k6 hQ th6ng. HiQn t4i, chring ta v6n thgc
hin b6n budc ndy bing tay. D tg ttQng ho6 c6c budc ndy, chfng ta c6n c6 m6t phuong ph6p d[c td
c6c m6u theo c6ch md m6y tinh c6 tne ni6u clugc d6 n6 c6 th6 trq gitp chtng ta thgc hiQn c6c ho4t
<tQng v6i c6c miu. Trong nghiOn c{ru niry, chring t6i sri dgng OWL - ng6n ngii sri dpng ttd xdy dgng
ontology trn web, aC aAc td cd khia c4nh c6u tr0c vd hdnh vi cria c6c m6u d6 chring ta c6 thiS ty dQng
ho6 c6c bu6c trong POAD.