activetm - a topic maps - object mapper

Post on 24-Jan-2015

1.023 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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.

TRANSCRIPT

1

2

ActiveTMA Topic Maps – Object Mapper

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

3

Schedule

What was?

What is?

What will be?

4

What we have

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

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

6

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

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

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/

10

What we need

11

12

13

14

15

Schedule

What was?

What is?

What will be?

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

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]

18

ActiveTM

• ActiveTMML• the modeling language

• ActiveTM• a prototypical implementation• using Ruby and RTM

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

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

20

How is it used?

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

21

Can I use it?

No.Not yet.Sorry.

22

Schedule

What was?

What is?

What will be?

23

What will be?

• depends on what we do...

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

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

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

27

28

29

What we do

• create domain-specific portals

30

31

What we do

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

32

33

What we do

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

34

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

36

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

38

Schedule

What was?

What is?

What will be?

39

40

kthxbai!

Images: bigfoto.com

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

top related