Open event (Drupalcamp Sunderland 2015)

82
Open Event Empowering culture and art organizations everywhere July 2015 (v4.3) Jorge Lopez-Lago

Transcript of Open event (Drupalcamp Sunderland 2015)

Page 1: Open event (Drupalcamp Sunderland 2015)

Open EventEmpowering culture and art organizations everywhere

July 2015 (v4.3)Jorge Lopez-Lago

Page 2: Open event (Drupalcamp Sunderland 2015)

Who am I?What have I done so far?

Page 3: Open event (Drupalcamp Sunderland 2015)

Engineer

Page 4: Open event (Drupalcamp Sunderland 2015)

Drupaleer

Page 5: Open event (Drupalcamp Sunderland 2015)

Onload Ltd

Page 6: Open event (Drupalcamp Sunderland 2015)

Onload Ltd

Page 7: Open event (Drupalcamp Sunderland 2015)

Geekdad

Page 8: Open event (Drupalcamp Sunderland 2015)

The problemWhere everything started

Page 9: Open event (Drupalcamp Sunderland 2015)

Southbankcentre.co.uk

Page 10: Open event (Drupalcamp Sunderland 2015)

The glass box

Page 11: Open event (Drupalcamp Sunderland 2015)

Open process

Page 12: Open event (Drupalcamp Sunderland 2015)

Open designs

Page 13: Open event (Drupalcamp Sunderland 2015)

Open data

Page 14: Open event (Drupalcamp Sunderland 2015)

Open use

Page 15: Open event (Drupalcamp Sunderland 2015)

Open platform

Page 16: Open event (Drupalcamp Sunderland 2015)

Open platform

Page 17: Open event (Drupalcamp Sunderland 2015)

Open platform

Page 18: Open event (Drupalcamp Sunderland 2015)

So we ended up developing open source code :)

Page 19: Open event (Drupalcamp Sunderland 2015)

Open Event in one sentence

Page 20: Open event (Drupalcamp Sunderland 2015)

Open Event in one sentence

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

Page 21: Open event (Drupalcamp Sunderland 2015)

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.

Page 22: Open event (Drupalcamp Sunderland 2015)

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.

Page 23: Open event (Drupalcamp Sunderland 2015)

Open Data Model

Page 24: Open event (Drupalcamp Sunderland 2015)

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)

Page 25: Open event (Drupalcamp Sunderland 2015)

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

What is the ODM?

Page 26: Open event (Drupalcamp Sunderland 2015)

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

Page 27: Open event (Drupalcamp Sunderland 2015)

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

Page 28: Open event (Drupalcamp Sunderland 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.

Page 29: Open event (Drupalcamp Sunderland 2015)

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.

Page 30: Open event (Drupalcamp Sunderland 2015)

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

Page 31: Open event (Drupalcamp Sunderland 2015)

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)

Page 32: Open event (Drupalcamp Sunderland 2015)

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

Page 33: Open event (Drupalcamp Sunderland 2015)

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

Page 34: Open event (Drupalcamp Sunderland 2015)

Technical stackclosedprivate

closedpublic

openpublic

closedprivate

closedpublic

openpublic

Page 35: Open event (Drupalcamp Sunderland 2015)

SC example architecture

Page 36: Open event (Drupalcamp Sunderland 2015)

Schema.org types included

⇒ Event⇒ Person⇒ Place⇒ Organization

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

Page 37: Open event (Drupalcamp Sunderland 2015)

Schema.org (sub)types included

⇒ ImageObject⇒ PostalAddress⇒ GeoCoordinates⇒ OpeningHoursSpecification

Page 38: Open event (Drupalcamp Sunderland 2015)

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

Page 39: Open event (Drupalcamp Sunderland 2015)

Entity relationship diagram

Page 40: Open event (Drupalcamp Sunderland 2015)

API

Page 41: Open event (Drupalcamp Sunderland 2015)

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)

Page 42: Open event (Drupalcamp Sunderland 2015)

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.

Page 43: Open event (Drupalcamp Sunderland 2015)

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?

Page 45: Open event (Drupalcamp Sunderland 2015)

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."

},

Page 46: Open event (Drupalcamp Sunderland 2015)

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."

},

Page 47: Open event (Drupalcamp Sunderland 2015)

Image in event

Page 48: Open event (Drupalcamp Sunderland 2015)

API documentation

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

Fields listFields descriptionShameless copy of api_doc contrib module

Page 49: Open event (Drupalcamp Sunderland 2015)
Page 50: Open event (Drupalcamp Sunderland 2015)
Page 51: Open event (Drupalcamp Sunderland 2015)
Page 52: Open event (Drupalcamp Sunderland 2015)

What is missing?

Page 53: Open event (Drupalcamp Sunderland 2015)

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+

Page 54: Open event (Drupalcamp Sunderland 2015)

Implementation and use

Page 55: Open event (Drupalcamp Sunderland 2015)

Digital Officer

I could build you a website in a day!

Basic implementation

Page 56: Open event (Drupalcamp Sunderland 2015)

Front End Design/Dev

Digital Officer

A separate presentation layer is so cool*!

(*) Powerful and flexible.

Add a presentation layer

Page 57: Open event (Drupalcamp Sunderland 2015)

Digital Officer

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

Front End Design/Dev

Publish to other apps

Page 58: Open event (Drupalcamp Sunderland 2015)

Digital Officer

Front End Design/Dev

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

Publish to the internet

Page 59: Open event (Drupalcamp Sunderland 2015)

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

Page 60: Open event (Drupalcamp Sunderland 2015)

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

Page 61: Open event (Drupalcamp Sunderland 2015)

⇒ Search⇒ Caching⇒ E-commerce⇒ Microdata

CMS Developer

Front End Design/Dev

Database Officer

Bells and whistles

Digital Officer

Page 62: Open event (Drupalcamp Sunderland 2015)

What did we learn?

Page 63: Open event (Drupalcamp Sunderland 2015)

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.

Page 64: Open event (Drupalcamp Sunderland 2015)

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.

Page 65: Open event (Drupalcamp Sunderland 2015)

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.

Page 66: Open event (Drupalcamp Sunderland 2015)

Now what?

Page 67: Open event (Drupalcamp Sunderland 2015)

Now what?

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

Page 68: Open event (Drupalcamp Sunderland 2015)

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

Page 69: Open event (Drupalcamp Sunderland 2015)

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

Page 70: Open event (Drupalcamp Sunderland 2015)

Give it a go!

Page 71: Open event (Drupalcamp Sunderland 2015)

Requirements

⇒ Web server

⇒ PHP 5.6

⇒ Database (supported by Drupal)

⇒ Drush

⇒ Git (optional for developers)

Page 72: Open event (Drupalcamp Sunderland 2015)

Download and install

(1) Fetch the code from Drupal.org:

$:> drush dl openevent

Page 73: Open event (Drupalcamp Sunderland 2015)

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

Page 74: Open event (Drupalcamp Sunderland 2015)

Build and install

(1) Fetch the code from Github:

$:> git clone [email protected]:Southbank-Centre/OpenEvent.git www/drupal/profiles/openevent

Page 75: Open event (Drupalcamp Sunderland 2015)

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

Page 76: Open event (Drupalcamp Sunderland 2015)

Build and install

(3) Install the distribution:

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

Page 77: Open event (Drupalcamp Sunderland 2015)

References

Page 78: Open event (Drupalcamp Sunderland 2015)

References

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

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

Page 79: Open event (Drupalcamp Sunderland 2015)

References

Schema.org:http://schema.org

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

Page 80: Open event (Drupalcamp Sunderland 2015)

Credits

Page 81: Open event (Drupalcamp Sunderland 2015)

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

Page 82: Open event (Drupalcamp Sunderland 2015)

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