Open event presentation.3 2

Post on 14-Aug-2015

132 views 0 download

Tags:

Transcript of Open event presentation.3 2

Open EventEmpowering culture and art organizations everywhere

July 2015 (v3.2)

Who am I?What have I done so far?

Engineer

Drupaleerclass DrupalCore{

public function __construct() { $this->god = new God();

}public function hack() {

$this->god->kill_kitten();}

}

class God {public function kill_kitten() {

$shelter = new Shelter(); $lightning = new Lightning(); $shelter->get_kitten->apply($lightning);

}}

Entrepreneur

The problemWhere everything started

The glass box

Open process

Open designs

Open data

Open use

Open platform

Open platform

Open platform

Ready to share!

Open Event in one sentence

Open Event in one sentence

Open Event CMS is a foundation for any cultural organisation wanting to manage and publish their events online.

Open Event in one sentence

Open Event CMS is a Drupal distribution that directly represents an Event Open Data Model and automatically publishes data through a self-documented API.

Open Event in one sentence

Open Event CMS is a Drupal distribution that directly represents an Event Open Data Model and automatically publishes data through a self-documented API.

Open Data Model

What is the ODM?

Our mandate is to make the arts available to everyone.

To fulfill this we should be actively opening up all our information and data in a way that it can be accessed, joined up, understood and re-used.

Rob Gethen Smith (Southbank Centre CIO)

CollaborationEvent Model (Ontology)Schema.orgClassification (Taxonomy)Single source (COPE)Future standard?

What is the ODM?

SC Website Strategy

The SC Website strategy is structured around three areas:

1) Open Data ⇒ ODM2) Open Source Code3) Open Process

Open Event addresses (1) and (2)

3) Open Process

2) Open Source Code

1) Open Data

Southbank Centre

Website

Logical model: Event

Distribution

Contribution

It is released as Open Source software with two levels of contribution possible:

1) A Drupal distribution for final users (it works out of the box).

2) A Github repository for developers, to contribute to the way the distribution is built.

Concept

As Open Software it has been developed with minimal assumptions about how it may be used or extended and it doesn’t force any custom views of the world or the data it manages.

It is built with flexibility and extensibility in mind.

Concept

⇒ Custom JSON output (Schema.org structure)⇒ Each content type is automatically mapped as a

Schema.org type⇒ Only fields with Schema.org mapping are outputed⇒ RestWS standard mapping still available (remove?)⇒ Granular/simple events (one date per event)⇒ Decent editorial experience out of the box

Concept

⇒ Minimize the requirement for entities to model references (eg: images)

⇒ Complex mappings inline with main type (not referenced)

What is in it? For end users

⇒ Download, install and use: distribution

⇒ Extensible and adaptable as any Drupal 7 site

⇒ Just add water read-only API approach

⇒ Create Once Publish Everywhere

Useful

What’s in it?

⇒ Drupal 7 (inc. Drupal 8 upgrade path)⇒ ODM & Schema.org⇒ Shared* ontologies (and taxonomy*)⇒ RestWS (API)⇒ Drupal Features⇒ Magic Glue! (custom code)

(*) Work in progress

Technical stackclosedprivate

closedpublic

openpublic

closedprivate

closedpublic

openpublic

SC example architecture

Schema.org types included

⇒ Event⇒ Person⇒ Place⇒ Organization

http://openevent.southbank.local/node/add

Schema.org (sub)types included

⇒ ImageObject⇒ DateTime⇒ PostalAddress⇒ GeoCoordinates⇒ Map⇒ OpeningHoursSpecification

Schema.org relations included

⇒ Event to Event⇒ Event to Person⇒ Event to Organization⇒ Event to Place⇒ Place to Place⇒ Person to Organization⇒ Organization to Place

Entity relationship diagram

Contrib modules: usual suspects

⇒ ctools⇒ date⇒ entity⇒ features⇒ strongarm⇒ token

Contrib modules: event

⇒ field_validation⇒ link⇒ relation⇒ relation_add

http://openevent.southbank.local/node/add/event

Contrib modules: person (and org.)

⇒ auto_entitylabel⇒ email⇒ Standard fields used for name components (given

name, family name, etc)

http://openevent.southbank.local/node/add/person http://openevent.southbank.local/node/add/organization

Contrib modules: place

⇒ addressfield⇒ geolocation⇒ geolocation_googlemaps⇒ office_hours

http://openevent.southbank.local/node/add/place

Contrib modules: utility

⇒ better_formats⇒ field_group⇒ filefield_sources⇒ taxonomy_access_fix

Features⇒ oe_components⇒ oe_event⇒ oe_organization⇒ oe_place⇒ oe_person

⇒ oe_relationship_location⇒ oe_relationship_performer

http://openevent.southbank.local/admin/structure/features

Editorial experience

Utility modules mainly used to improve the default editorial experience:⇒ Fields in tabs⇒ Field validations⇒ Taxonomy permissions⇒ Text formats⇒ File sources

API

Concept

⇒ Automatic read API

⇒ Self documented API

⇒ Self explanatory API paths

⇒ Install and go

⇒ Rest-ish

Contrib modules: API

⇒ restws⇒ schemaorg

Custom code: core

⇒ oe_rest_api_doc⇒ oe_schemaorg_rest⇒ oe_schemaorg_relation

Custom code: special mappings

⇒ oe_schemaorg_rest_address⇒ oe_schemaorg_rest_date⇒ oe_schemaorg_rest_duration⇒ oe_schemaorg_rest_geo⇒ oe_schemaorg_rest_image⇒ oe_schemaorg_rest_link⇒ oe_schemaorg_rest_office_hours⇒ oe_schemaorg_rest_taxonomy

Image in event

From schema.org/Thing

image: URL or ImageObject An image of the item. This can be a URL or a fully described ImageObject.

Image in event

If URL is used we lose a lot of information.

Where does the URL point to? An image file or an ImageObject?

Image in event (restws)

http://openevent.southbank.local/node/24.json field_image: [

{

file: {

uri: "http://openevent.local/file/34",

id: "34",

resource: "file"

},

alt: "alt string here.",

title: "title string here."

},

Image in event (openevent)

http://openevent.southbank.local/api/person/24.json image: [

{

contentUrl: "http://openevent.local/sites/default/files/imagefield_9aNBjg.gif",

alternateName: "alt string here.",

caption: "title string here."

},

Image in event

API documentation

http://openevent.southbank.local/api/doc/json

Fields listFields description

What is missing?

What is missing?

⇒ Drupal tests⇒ XML output⇒ RDF output⇒ API Create, Update, Delete (write queries)⇒ More Schema.org types⇒ Drupal 8 version

What did we learn?

Motivation

We standardized and abstracted the core functionality and released it as Open Source.

And then we built our CMS on top of it.

What did we learn?

It is a challenge to think and develop openly.

It is easy to simply share.

It is difficult to share openly.

It is worth the extra effort.

Implementation and use

Digital Officer

I could build you a website in a day!

Basic implementation

Front End Design/Dev

Digital Officer

A separate presentation layer is so cool*!

(*) Powerful and flexible.

Add a presentation layer

Digital Officer

The API can publish the data in the CMS to any application

Front End Design/Dev

Publish to other apps

Digital Officer

Front End Design/Dev

The API publishes open data in Schema.org format for other people to use

Publish to the internet

Database Officer

Digital Officer

Front End Design/Dev

The CMS now gets its content efficiently and accurately

Data can be automatically aggregated from any source

Integrate data sources

CMS Developer

Front End Design/Dev

I can extend the CMS to hold all the other content my organisation needs to publish

Database Officer

Customise the CMS

⇒ Search⇒ Caching⇒ E-commerce⇒ Microdata

CMS Developer

Front End Design/Dev

Database Officer

Bells and whistles

Digital Officer

Give it a go!

Requirements

⇒ Web server

⇒ PHP 5.6

⇒ Database (supported by Drupal)

⇒ Drush

⇒ Git (optional for developers)

Download and install

(1) Fetch the code from Drupal.org:

$:> drush dl openevent

Download and install

(2) Install the distribution:

$:> cd openevent

$:> drush si openevent --account-name=siteuser --account-pass=sitepass --db-url=mysql://dbuser:dbpass@localhost/dbname -y

Build and install

(1) Fetch the code from Github:

$:> git clone git@github.com:Southbank-Centre/OpenEvent.git www/drupal/profiles/openevent

Build and install

(2) Fetch the contrib code from Drupal.org and assemble the distribution:

$:> cd www/drupal

$:> cp profiles/openevent/local-openevent.make .

$:> drush make local-openevent.make -y

Build and install

(3) Install the distribution:

$:> drush si openevent --account-name=siteuser --account-pass=sitepass --db-url=mysql://dbuser:dbpass@localhost/dbname -y

Now what?

Now what?

⇒ Use it⇒ Improve it⇒ Expand it⇒ Create critical mass⇒ Drupal 8!

References

References

Drupal distribution:https://www.drupal.org/project/openevent

Github repository:https://github.com/Southbank-Centre/OpenEvent

References

Schema.org:http://schema.org

Protractor:http://angular.github.io/protractor

Credits

Credits

Jorge Lopez-Lago (Tech Lead at Onload)

Alex Bridge (Developer at Cogapp)

Dave Vernon (Developer at Southbank Centre)

Sam Murray (Developer at Southbank Centre)

Tassos Koutlas (Developer at Cogapp)

Southbank Centre

Sources

Some content and images shamelessly copied from Rob Gethen Smith’s “Open Event CMS June 2015” presentation (http://www.slideshare.net/RobGethenSmith/open-event-cms-june-2015)

Avatar images by Freepik.com

Questions?

Fancy some in depth tinkering after the session?

Thank you!