Deme Presentation at Stanford Open Source (un)conference '08
Upcoming SlideShare
Loading in...5
×
 

Deme Presentation at Stanford Open Source (un)conference '08

on

  • 1,047 views

 

Statistics

Views

Total Views
1,047
Views on SlideShare
1,045
Embed Views
2

Actions

Likes
2
Downloads
4
Comments
0

2 Embeds 2

http://localhost 1
http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Deme Presentation at Stanford Open Source (un)conference '08 Deme Presentation at Stanford Open Source (un)conference '08 Presentation Transcript

  • Motivation Architecture Implementation Demo Deme Architecture Todd Davies Mike Mintz Stanford University Stanford Open Source (un)conference ’08 Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Objectives Hierarchy of item types with shared functionality Versioning for every item type Not just documents Highly collaborative Every item type supports discussion Very granular permissions Easily Extensible Embedded views Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is an item? All persistent data abstracted as items E.g., documents, users, settings, etc. Items are instances of “item types” Item types specify structure of fields Items provide values for fields E.g. “Person” is item type, “Mike” and “Todd” are items of that type First Name Last Name Mike Mintz Todd Davies Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is an item? All persistent data abstracted as items E.g., documents, users, settings, etc. Items are instances of “item types” Item types specify structure of fields Items provide values for fields E.g. “Person” is item type, “Mike” and “Todd” are items of that type First Name Last Name Mike Mintz Todd Davies Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is an item? All persistent data abstracted as items E.g., documents, users, settings, etc. Items are instances of “item types” Item types specify structure of fields Items provide values for fields E.g. “Person” is item type, “Mike” and “Todd” are items of that type First Name Last Name Mike Mintz Todd Davies Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Item inheritance Item types can inherit from other item types “Item” is at top of the hierarchy E.g., Item -> Document -> Comment Item types inherit existing fields, add additional fields Item: name, description Document: name, description, body Comment: name, description, body, commented_item Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Item inheritance Item types can inherit from other item types “Item” is at top of the hierarchy E.g., Item -> Document -> Comment Item types inherit existing fields, add additional fields Item: name, description Document: name, description, body Comment: name, description, body, commented_item Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Overview Agents Collections Documents Relationships Permissions URLs Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo All Items All items share metadata structure: Unique ID Name Description Creator / Create Time Updater / Update Time Versions Trashed? Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Agents Agents Item that can “do” things (Given permissions, can appear as creator/updater) Application user is always a specific Agent Subclasses: Person, AnonymousAgent, Group Groups Collection of Agents Members can share common permissions Accounts Channel of authentication Subclasses: PasswordAccount, OpenId Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Agents Agents Item that can “do” things (Given permissions, can appear as creator/updater) Application user is always a specific Agent Subclasses: Person, AnonymousAgent, Group Groups Collection of Agents Members can share common permissions Accounts Channel of authentication Subclasses: PasswordAccount, OpenId Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Agents Agents Item that can “do” things (Given permissions, can appear as creator/updater) Application user is always a specific Agent Subclasses: Person, AnonymousAgent, Group Groups Collection of Agents Members can share common permissions Accounts Channel of authentication Subclasses: PasswordAccount, OpenId Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Collections ItemSets Arbitrary collection of items Subclasses: Folio Folio Every group has one folio Contains items shared among all members Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Collections ItemSets Arbitrary collection of items Subclasses: Folio Folio Every group has one folio Contains items shared among all members Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Documents Main unit of collaborative work Different item types for different formats Subclasses TextDocument HtmlDocument DjangoTemplateDocument Comment FileDocument ImageDocument Comments refer to other Items Sometimes specific versions and locations Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Documents Main unit of collaborative work Different item types for different formats Subclasses TextDocument HtmlDocument DjangoTemplateDocument Comment FileDocument ImageDocument Comments refer to other Items Sometimes specific versions and locations Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Documents Main unit of collaborative work Different item types for different formats Subclasses TextDocument HtmlDocument DjangoTemplateDocument Comment FileDocument ImageDocument Comments refer to other Items Sometimes specific versions and locations Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Relationships Explicit items for relationships between items Subclasses: GroupMembership, ItemsetMembership Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Permissions Specifies who can do what to which items Agent Ability Item Three levels Direct Groupwide Default Roles Customizable sets of abilities Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Permissions Specifies who can do what to which items Agent Ability Item Three levels Direct Groupwide Default Roles Customizable sets of abilities Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Permissions Specifies who can do what to which items Agent Ability Item Three levels Direct Groupwide Default Roles Customizable sets of abilities Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Custom URLs Users can create custom URLs to point to items Each domain can have separate namespace of URLs Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Custom URLs Users can create custom URLs to point to items Each domain can have separate namespace of URLs Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo Outline 1 Motivation 2 Architecture Item Structure Item Ontology Viewers 3 Implementation 4 Demo Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is a viewer? A Django class that processes browser or API requests URLs that begin with /resource/ are routed to viewers Viewers handle items of specific type Viewers inherit from other viewers Everything ultimately inherits from ItemViewer ItemViewer is about 80% of view code Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is a viewer? A Django class that processes browser or API requests URLs that begin with /resource/ are routed to viewers Viewers handle items of specific type Viewers inherit from other viewers Everything ultimately inherits from ItemViewer ItemViewer is about 80% of view code Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is a viewer? A Django class that processes browser or API requests URLs that begin with /resource/ are routed to viewers Viewers handle items of specific type Viewers inherit from other viewers Everything ultimately inherits from ItemViewer ItemViewer is about 80% of view code Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo What is a viewer? A Django class that processes browser or API requests URLs that begin with /resource/ are routed to viewers Viewers handle items of specific type Viewers inherit from other viewers Everything ultimately inherits from ItemViewer ItemViewer is about 80% of view code Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo RESTful URLs Entry actions /resource/<viewer>/<id>/<action> E.g., /resource/person/5/edit E.g., /resource/person/5 Collection actions /resource/<viewer>/<action> E.g., /resource/person/new E.g., /resource/person E.g., /resource/person.json Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo RESTful URLs Entry actions /resource/<viewer>/<id>/<action> E.g., /resource/person/5/edit E.g., /resource/person/5 Collection actions /resource/<viewer>/<action> E.g., /resource/person/new E.g., /resource/person E.g., /resource/person.json Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo 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 for authenticated agent Davies, Mintz Deme Architecture
  • Motivation Item Structure Architecture Item Ontology Implementation Viewers Demo 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 for authenticated agent Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Deme is written in Django Deme is: A collection of Django models A system of hierarchical viewers that use Django templates Additional components that handle Deme-specific features Versioning Permissions Commenting Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Why Django? Big developer community Now supports multi-table inheritance Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Models –> Item types A Django model corresponds to an item type An item is: A Django model instance A row in a table Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Models –> Item types A Django model corresponds to an item type An item is: A Django model instance A row in a table Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Database Visual Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Versioning Every table has a dual version-table Person ID First Name Last Name 1 Mike Mintz PersonVersion ID Version First Name Last Name 1 1 Michael Mintz 1 2 Mike Mintz Davies, Mintz Deme Architecture
  • Motivation Architecture Implementation Demo Demo time! Davies, Mintz Deme Architecture