Top Banner
1
41

ActiveTM - A Topic Maps - Object Mapper

Jan 24, 2015

Download

Technology

tmra

Currently, the most common way to programmatically access Topic Maps data is the use of a Topic Maps API, like TMAPI. Another approach, besides the use of a query language like TMQL, is the encapsulation of the Topic Maps related code in domain-specific model classes. This concept is similar to object-relational mapping (ORM) which encapsulates access to a relational database inside the model classes. These techniques decouple the data store specific code from the business logic. For ORM, there are several prevalent design patterns, most notable the Active Record pattern by Fowler. For Topic Maps, no such pattern is established. This paper introduces Active Topic Maps, a pattern for topic maps -- object mapping, the domain-specific language ActiveTMML to define such a mapping and a prototypical implementation, called ActiveTM. ActiveTM is based on Ruby Topic Maps and also supports the generation of web-formulars based on ActiveTMML definitions. This full-featured software stack greatly improves the development productivity of Topic Maps based portals compared to other solutions.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ActiveTM - A Topic Maps - Object Mapper

1

Page 2: ActiveTM - A Topic Maps - Object Mapper

2

ActiveTMA Topic Maps – Object Mapper

Benjamin Bockhttp://rtm.rubyforge.orgTMRA 2008Leipzig, 2008-10-17

Page 3: ActiveTM - A Topic Maps - Object Mapper

3

Schedule

What was?

What is?

What will be?

Page 4: ActiveTM - A Topic Maps - Object Mapper

4

What we have

• TMDM• TMAPI (old and new)• TMO• BSCPL• AR

Page 5: ActiveTM - A Topic Maps - Object Mapper

5

The Challenge

• TMDM offers ontological flexibility• TMAPI provides interface to TMDM

• It’s not domain-specific• We need to get closer to the

business

Current development approachesare too slow

Page 6: ActiveTM - A Topic Maps - Object Mapper

6

Page 7: ActiveTM - A Topic Maps - Object Mapper

7

What has been done before?

• Most of us were just using someTMAPI-like interface

• NetworkedPlanet made Topic Map Objects

• Bogachev had some concepts... ...but did not implement them

Page 8: ActiveTM - A Topic Maps - Object Mapper

8

What are others doing?

• Holidays• Traveling• Object-Relational Mapping

• Active Record

• Throw more programmers at the problem (and that doesn‘t scale)

We have a problem

Page 9: ActiveTM - A Topic Maps - Object Mapper

9

Every programming problem can be solved with another layer of abstraction,except the problemof too many layers of abstraction.

“”

Source: documentation of Ick, http://ick.rubyforge.org/

Page 10: ActiveTM - A Topic Maps - Object Mapper

10

What we need

Page 11: ActiveTM - A Topic Maps - Object Mapper

11

Page 12: ActiveTM - A Topic Maps - Object Mapper

12

Page 13: ActiveTM - A Topic Maps - Object Mapper

13

Page 14: ActiveTM - A Topic Maps - Object Mapper

14

Page 15: ActiveTM - A Topic Maps - Object Mapper

15

Schedule

What was?

What is?

What will be?

Page 16: ActiveTM - A Topic Maps - Object Mapper

16

Domain Modeling

• investigate the domain of the customer

• find out what is important for the use case

• define domain model by stating• all subject types• their characteristics• and associations to other subjects

Page 17: ActiveTM - A Topic Maps - Object Mapper

17

After modeling...

• ideally, you should have some administrative CRUD interface now

• add domain-specific shapes for theend-user portal

[Not covered here: the dynamic perspective]

Page 18: ActiveTM - A Topic Maps - Object Mapper

18

ActiveTM

• ActiveTMML• the modeling language

• ActiveTM• a prototypical implementation• using Ruby and RTM

• Some assorted scripts which generate• Migrations, AR-Models, ...

Page 19: ActiveTM - A Topic Maps - Object Mapper

19

What does it look like?

class Person < ActiveTM::Base topic_map "http://psi.example.com/" psi "http://psi.example.com/ontology/person"

name :firstname names :middlenames name :lastname occurrence :age, :datatype => "xsd:integer" has_one :country, "inhabitant", "country-

inhabitant", :class => :Country

def fullname "#{firstname} #{lastname}" endend

Page 20: ActiveTM - A Topic Maps - Object Mapper

20

How is it used?

p = Person.create("johndoe")p.firstname = "John"p.add_middlename "George"p.lastname = "Doe"p.age = 25p.save

Page 21: ActiveTM - A Topic Maps - Object Mapper

21

Can I use it?

No.Not yet.Sorry.

Page 22: ActiveTM - A Topic Maps - Object Mapper

22

Schedule

What was?

What is?

What will be?

Page 23: ActiveTM - A Topic Maps - Object Mapper

23

What will be?

• depends on what we do...

Page 24: ActiveTM - A Topic Maps - Object Mapper

24

What we do

• write research proposal• do market research• do interviews

• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal

We‘re about here

Page 25: ActiveTM - A Topic Maps - Object Mapper

25

• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal

Page 26: ActiveTM - A Topic Maps - Object Mapper

26

• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal• write research proposal

Page 27: ActiveTM - A Topic Maps - Object Mapper

27

Page 28: ActiveTM - A Topic Maps - Object Mapper

28

Page 29: ActiveTM - A Topic Maps - Object Mapper

29

What we do

• create domain-specific portals

Page 30: ActiveTM - A Topic Maps - Object Mapper

30

Page 31: ActiveTM - A Topic Maps - Object Mapper

31

What we do

• create domain-specific portals• using context-specific Shapes

Page 32: ActiveTM - A Topic Maps - Object Mapper

32

Page 33: ActiveTM - A Topic Maps - Object Mapper

33

What we do

• create domain-specific portals• using context-specific Shapes• generate administration interfaces

Page 34: ActiveTM - A Topic Maps - Object Mapper

34

Page 35: ActiveTM - A Topic Maps - Object Mapper

35

What we do

• create domain-specific portals• using context-specific Shapes• generate administration interfaces• using just the list of characteristics

we want to have in list, show, and edit-view

Page 36: ActiveTM - A Topic Maps - Object Mapper

36

Page 37: ActiveTM - A Topic Maps - Object Mapper

37

What we doWhat will be?

• It‘s already in production (sort of...)• It‘s not pure Topic Maps, yet• But we‘re working on it

Page 38: ActiveTM - A Topic Maps - Object Mapper

38

Schedule

What was?

What is?

What will be?

Page 39: ActiveTM - A Topic Maps - Object Mapper

39

Page 40: ActiveTM - A Topic Maps - Object Mapper

40

kthxbai!

Images: bigfoto.com

Page 41: ActiveTM - A Topic Maps - Object Mapper

41

kthxbaiVariation of ‘kthxbye’– the internet bastardization of “OK, thank you, goodbye”.

source: http://www.urbandictionary.com/

see also:http://icanhascheezburger.com/

Images: bigfoto.com