Deme Presentation at Stanford Open Source (un)conference '08
description
Transcript of Deme Presentation at Stanford Open Source (un)conference '08
![Page 1: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/1.jpg)
MotivationArchitecture
ImplementationDemo
Deme Architecture
Todd Davies Mike Mintz
Stanford University
Stanford Open Source (un)conference ’08
Davies, Mintz Deme Architecture
![Page 2: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/2.jpg)
MotivationArchitecture
ImplementationDemo
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 3: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/3.jpg)
MotivationArchitecture
ImplementationDemo
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 4: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/4.jpg)
MotivationArchitecture
ImplementationDemo
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 5: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/5.jpg)
MotivationArchitecture
ImplementationDemo
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 6: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/6.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 7: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/7.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 8: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/8.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 9: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/9.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 10: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/10.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 11: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/11.jpg)
MotivationArchitecture
ImplementationDemo
Objectives
Hierarchy of item types with shared functionalityVersioning for every item type
Not just documentsHighly collaborative
Every item type supports discussion
Very granular permissionsEasily ExtensibleEmbedded views
Davies, Mintz Deme Architecture
![Page 12: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/12.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 13: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/13.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is an item?
All persistent data abstracted as itemsE.g., documents, users, settings, etc.
Items are instances of “item types”Item types specify structure of fieldsItems provide values for fields
E.g. “Person” is item type, “Mike” and “Todd” are items ofthat typeFirst Name Last Name
Mike MintzTodd Davies
Davies, Mintz Deme Architecture
![Page 14: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/14.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is an item?
All persistent data abstracted as itemsE.g., documents, users, settings, etc.
Items are instances of “item types”Item types specify structure of fieldsItems provide values for fields
E.g. “Person” is item type, “Mike” and “Todd” are items ofthat typeFirst Name Last Name
Mike MintzTodd Davies
Davies, Mintz Deme Architecture
![Page 15: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/15.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is an item?
All persistent data abstracted as itemsE.g., documents, users, settings, etc.
Items are instances of “item types”Item types specify structure of fieldsItems provide values for fields
E.g. “Person” is item type, “Mike” and “Todd” are items ofthat typeFirst Name Last Name
Mike MintzTodd Davies
Davies, Mintz Deme Architecture
![Page 16: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/16.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Item inheritance
Item types can inherit from other item types“Item” is at top of the hierarchyE.g., Item -> Document -> Comment
Item types inherit existing fields, add additional fieldsItem: name, descriptionDocument: name, description, bodyComment: name, description, body, commented_item
Davies, Mintz Deme Architecture
![Page 17: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/17.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Item inheritance
Item types can inherit from other item types“Item” is at top of the hierarchyE.g., Item -> Document -> Comment
Item types inherit existing fields, add additional fieldsItem: name, descriptionDocument: name, description, bodyComment: name, description, body, commented_item
Davies, Mintz Deme Architecture
![Page 18: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/18.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 19: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/19.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Overview
AgentsCollectionsDocumentsRelationshipsPermissionsURLs
Davies, Mintz Deme Architecture
![Page 20: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/20.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
All Items
All items share metadata structure:Unique IDNameDescriptionCreator / Create TimeUpdater / Update TimeVersionsTrashed?
Davies, Mintz Deme Architecture
![Page 21: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/21.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Agents
AgentsItem that can “do” things
(Given permissions, can appear as creator/updater)
Application user is always a specific AgentSubclasses: Person, AnonymousAgent, Group
GroupsCollection of AgentsMembers can share common permissions
AccountsChannel of authenticationSubclasses: PasswordAccount, OpenId
Davies, Mintz Deme Architecture
![Page 22: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/22.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Agents
AgentsItem that can “do” things
(Given permissions, can appear as creator/updater)
Application user is always a specific AgentSubclasses: Person, AnonymousAgent, Group
GroupsCollection of AgentsMembers can share common permissions
AccountsChannel of authenticationSubclasses: PasswordAccount, OpenId
Davies, Mintz Deme Architecture
![Page 23: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/23.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Agents
AgentsItem that can “do” things
(Given permissions, can appear as creator/updater)
Application user is always a specific AgentSubclasses: Person, AnonymousAgent, Group
GroupsCollection of AgentsMembers can share common permissions
AccountsChannel of authenticationSubclasses: PasswordAccount, OpenId
Davies, Mintz Deme Architecture
![Page 24: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/24.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Collections
ItemSetsArbitrary collection of itemsSubclasses: Folio
FolioEvery group has one folioContains items shared among all members
Davies, Mintz Deme Architecture
![Page 25: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/25.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Collections
ItemSetsArbitrary collection of itemsSubclasses: Folio
FolioEvery group has one folioContains items shared among all members
Davies, Mintz Deme Architecture
![Page 26: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/26.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Documents
Main unit of collaborative workDifferent item types for different formatsSubclasses
TextDocumentHtmlDocumentDjangoTemplateDocumentComment
FileDocumentImageDocument
Comments refer to other ItemsSometimes specific versions and locations
Davies, Mintz Deme Architecture
![Page 27: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/27.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Documents
Main unit of collaborative workDifferent item types for different formatsSubclasses
TextDocumentHtmlDocumentDjangoTemplateDocumentComment
FileDocumentImageDocument
Comments refer to other ItemsSometimes specific versions and locations
Davies, Mintz Deme Architecture
![Page 28: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/28.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Documents
Main unit of collaborative workDifferent item types for different formatsSubclasses
TextDocumentHtmlDocumentDjangoTemplateDocumentComment
FileDocumentImageDocument
Comments refer to other ItemsSometimes specific versions and locations
Davies, Mintz Deme Architecture
![Page 29: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/29.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Relationships
Explicit items for relationships between itemsSubclasses: GroupMembership, ItemsetMembership
Davies, Mintz Deme Architecture
![Page 30: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/30.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Permissions
Specifies who can do what to which itemsAgentAbilityItem
Three levelsDirectGroupwideDefault
RolesCustomizable sets of abilities
Davies, Mintz Deme Architecture
![Page 31: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/31.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Permissions
Specifies who can do what to which itemsAgentAbilityItem
Three levelsDirectGroupwideDefault
RolesCustomizable sets of abilities
Davies, Mintz Deme Architecture
![Page 32: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/32.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Permissions
Specifies who can do what to which itemsAgentAbilityItem
Three levelsDirectGroupwideDefault
RolesCustomizable sets of abilities
Davies, Mintz Deme Architecture
![Page 33: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/33.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Custom URLs
Users can create custom URLs to point to itemsEach domain can have separate namespace of URLs
Davies, Mintz Deme Architecture
![Page 34: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/34.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Custom URLs
Users can create custom URLs to point to itemsEach domain can have separate namespace of URLs
Davies, Mintz Deme Architecture
![Page 35: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/35.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Outline
1 Motivation
2 ArchitectureItem StructureItem OntologyViewers
3 Implementation
4 Demo
Davies, Mintz Deme Architecture
![Page 36: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/36.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is a viewer?
A Django class that processes browser or API requestsURLs that begin with /resource/ are routed to viewersViewers handle items of specific typeViewers inherit from other viewers
Everything ultimately inherits from ItemViewerItemViewer is about 80% of view code
Davies, Mintz Deme Architecture
![Page 37: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/37.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is a viewer?
A Django class that processes browser or API requestsURLs that begin with /resource/ are routed to viewersViewers handle items of specific typeViewers inherit from other viewers
Everything ultimately inherits from ItemViewerItemViewer is about 80% of view code
Davies, Mintz Deme Architecture
![Page 38: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/38.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is a viewer?
A Django class that processes browser or API requestsURLs that begin with /resource/ are routed to viewersViewers handle items of specific typeViewers inherit from other viewers
Everything ultimately inherits from ItemViewerItemViewer is about 80% of view code
Davies, Mintz Deme Architecture
![Page 39: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/39.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
What is a viewer?
A Django class that processes browser or API requestsURLs that begin with /resource/ are routed to viewersViewers handle items of specific typeViewers inherit from other viewers
Everything ultimately inherits from ItemViewerItemViewer is about 80% of view code
Davies, Mintz Deme Architecture
![Page 40: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/40.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
RESTful URLs
Entry actions/resource/<viewer>/<id>/<action>E.g., /resource/person/5/editE.g., /resource/person/5
Collection actions/resource/<viewer>/<action>E.g., /resource/person/newE.g., /resource/personE.g., /resource/person.json
Davies, Mintz Deme Architecture
![Page 41: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/41.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
RESTful URLs
Entry actions/resource/<viewer>/<id>/<action>E.g., /resource/person/5/editE.g., /resource/person/5
Collection actions/resource/<viewer>/<action>E.g., /resource/person/newE.g., /resource/personE.g., /resource/person.json
Davies, Mintz Deme Architecture
![Page 42: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/42.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Authentication
There is always an authenticated agent in a viewer(If user does not log in, it is AnonymousAgent.)
Viewer takes care of checking permissions forauthenticated agent
Davies, Mintz Deme Architecture
![Page 43: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/43.jpg)
MotivationArchitecture
ImplementationDemo
Item StructureItem OntologyViewers
Authentication
There is always an authenticated agent in a viewer(If user does not log in, it is AnonymousAgent.)
Viewer takes care of checking permissions forauthenticated agent
Davies, Mintz Deme Architecture
![Page 44: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/44.jpg)
MotivationArchitecture
ImplementationDemo
Deme is written in Django
Deme is:A collection of Django modelsA system of hierarchical viewers that use Django templatesAdditional components that handle Deme-specific features
VersioningPermissionsCommenting
Davies, Mintz Deme Architecture
![Page 45: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/45.jpg)
MotivationArchitecture
ImplementationDemo
Why Django?
Big developer communityNow supports multi-table inheritance
Davies, Mintz Deme Architecture
![Page 46: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/46.jpg)
MotivationArchitecture
ImplementationDemo
Models –> Item types
A Django model corresponds to an item typeAn item is:
A Django model instanceA row in a table
Davies, Mintz Deme Architecture
![Page 47: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/47.jpg)
MotivationArchitecture
ImplementationDemo
Models –> Item types
A Django model corresponds to an item typeAn item is:
A Django model instanceA row in a table
Davies, Mintz Deme Architecture
![Page 48: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/48.jpg)
MotivationArchitecture
ImplementationDemo
Database Visual
Davies, Mintz Deme Architecture
![Page 49: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/49.jpg)
MotivationArchitecture
ImplementationDemo
Versioning
Every table has a dual version-table
PersonID First Name Last Name1 Mike Mintz
PersonVersionID Version First Name Last Name1 1 Michael Mintz1 2 Mike Mintz
Davies, Mintz Deme Architecture
![Page 50: Deme Presentation at Stanford Open Source (un)conference '08](https://reader035.fdocuments.us/reader035/viewer/2022062511/54b74f334a795967588b45f0/html5/thumbnails/50.jpg)
MotivationArchitecture
ImplementationDemo
Demo time!
Davies, Mintz Deme Architecture