Open event (Drupalcamp Sunderland 2015)

Post on 16-Aug-2015

18 views 0 download

Tags:

Transcript of Open event (Drupalcamp Sunderland 2015)

Open EventEmpowering culture and art organizations everywhere

July 2015 (v4.3)Jorge Lopez-Lago

Who am I?What have I done so far?

Engineer

Drupaleer

Onload Ltd

Onload Ltd

Geekdad

The problemWhere everything started

Southbankcentre.co.uk

The glass box

Open process

Open designs

Open data

Open use

Open platform

Open platform

Open platform

So we ended up developing open source code :)

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?

ODM implementation

The Open Event Drupal distribution is a technical implementation of the ODM: just add water™.

Other implementations are possible and desirable.

ODM website coming soon* to make the ODM visible.

(*) Possibly

DistributionVersion 7.x-0.7 released yesterday (23/7/2015)

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 of Schema types modeled as a single Drupal field are embedded in the 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 and pinched code)

(*) Coming soon

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⇒ PostalAddress⇒ GeoCoordinates⇒ 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

API

Concept

⇒ Automatic read only API

⇒ Self documented API

⇒ Self explanatory API paths (content type)

⇒ Install and go

⇒ Rest-ish

⇒ More control over RestWS (expose bundles and control over fields - choose, custom label and format)

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: [

{

@type: "ImageObject",

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 descriptionShameless copy of api_doc contrib module

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⇒ Drupal 7.37+

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

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.

Developers motivation was much higher than in closed source projects. Everyone learnt and enjoyed much more.

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.

What did we learn?

Open Source can be developed as part of a private/closed project.

It is an excellent way to contribute back after using open source code in closed projects.

Now what?

Now what?

⇒ Use it⇒ Improve it⇒ Expand it⇒ Create critical mass⇒ Drupal 8! (see you in Barcelona!)

Implementations

Southbankcentre.org*⇒ Data sharing via JSON API⇒ Headless front end (Angular)⇒ Modular CMS⇒ Elastic search⇒ Import and manage data from backend data

applications (Artifax, Tessitura)

(*) In development

Route Map (D7)

⇒ Move it to git.drupal.org (mirror to github)⇒ Improve documentation⇒ Refactor custom profile modules into contrib

modules⇒ Refactor features in contrib modules⇒ Add taxonomy classification*

(*) It depends on the ODM working group

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

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