Your SlideShare is downloading. ×
0
ShowcaseDavy Van Den Bremt
What will you learn today?• What CultuurNet does• How and where they use Drupal• How the reusable Drupal solution is built...
For the Drupal geeksThis talk is about Drupal sites where the content         and users live outside of Drupal.     So no ...
Who I am• Davy Van Den Bremt• More than 5 years Drupal• Involved in development of multiple CultuurNet  solutions over 3 y...
What Cultuurnet does      ... that’s relevant to this talk
Gather events   (in Flanders)   ...
Distribute these events ...
... by region ...
... by target audience ...
... on multiple platforms ...
iPhone
Mobile web
Android
Philips TV
Distribute everywhere• On own platforms• On other people’s platforms
Create an experience     ... around that content
Enrich content
Building a central user profile
Let people express what they like and go to
Recommend events and users
The platform
Widgets     Drupal websites    Drupal modules               Custom                                iPhone, Android, ...    ...
Widgets     Drupal websites    Drupal modules               Custom                                iPhone, Android, ...    ...
UiTdatabank API• Rest API• XML or JSON response• Slice of content based on API key
UiTdatabank API• Get events• Get actors• Get productions• Get reports• Get static values (cities, categories, ...)
/events/search?key=1
/events/search?key=1&q=madonna&city=gent
/event/[CDBID]?key=1
/events/report?key=1&city=gent
Widgets     Drupal websites    Drupal modules               Custom                                iPhone, Android, ...    ...
UiTid API (CultureFeed)• Rest API• XML or JSON response• OAuth authentication
UiTid API (CultureFeed)• Gebruikers opvragen• Gebruikers beheren• Acties doen• Aanbevelingen opvragen• ...
createUserupdateUserdeleteUsergetUsersearchUsersgetSimilarUsersuploadUserDepictionresendMboxConfirmationForUserupdateUserP...
/user/search   (OAuth tokens!!!)
Other systems• Tracking(has API and JS suite)• Enrichments   (has API)• Media indexer• Agents
So, where’s Drupal ?
Media sites                      Media Indexer            Youtube        Wikipedia       Resto.be   Cobra CultureFeed     ...
The Drupal solution
Module suites     CNApi   CultureFeed
Module suites vision• Layered • Each layer adds functionality • Only use what you need• Plug & play • It’s possible to get...
CNAPIDrupal module suite for UiTdatabank API
The CNApi suite modules• API layer (cnapi)• UI layer(cnapi_ui)• Browse, search and filter UI elements                      ...
API layer (cnapi)•   (Drupal) PHP   implementation for UiTdatabank API• Results parsed in array structures• Caching implem...
API layer : Example calls   // List events UiT met kinderen in Leuven$query = array(city => Leuven,heading => 179);$result...
API layer : Example result
UI layer (cnapi_ui)• Provides result pages (context concept)• Provides detail pages• Provides RSS feeds• Provides Drupal t...
UI layer (cnapi_ui)• SEO Optimised • URL redirects • canonical and noindex   • cnapi_ui_preprocess_link   • hook_url_(in/o...
Browse, search and filter UI elements   (cnapi_browse)
Some extra UI elements (cnapi_extras)
Shadow nodes (cnapi_snode)
Why create them?• A lot of functionality is available that works on   nodes  • Rating  • Comments  • Sharing
What are shadow nodes?  CDBID      Create node when used first time     NID                                               D...
Why not sync all details?• There’s a lot of details• There’s a lot of data• That can change• Syncing is hard (how to detec...
How it was done
CultureFeedDrupal module suite for UiTid API
The CultureFeed suite modules• PHP Class library• API layer (culturefeed)• UI layer(culturefeed_ui)
PHP Class library• Usable outside of Drupal  context• Object oriented• Results parsed as typed  objects
Example usage
Implements complete API
API layer (culturefeed)• Provides singleton object to make calls without  caring about keys, secrets, ... and ask Drupal  ...
Example usage
Implements OAuth authentication
UI layer (culturefeed_ui)• Provide login block• Provides pages to administer account• Provides blocks with recommendation,...
Lessons learned
Use SEO as a performance     optimisation tool
Creating a userprogrammatically is heavy
Learn custom url rewriting
Pay attention to block caching
Lazy content loading (1)• Some pages have a lot of API calls to fetch all  info.• Fetch info using Ajax. • Not possible by...
Lazy content loading (2)
Lazy content loading (3)
Lazy content loading (3)
Get the code•   http://github.com/davyvandenbremt/cnapi•   http://github.com/davyvandenbremt/culturefeed
Questions?
Davy Van Den Bremtdavy@krimson.bedavyvandenbremt.be
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
CultuurNet showcase
Upcoming SlideShare
Loading in...5
×

CultuurNet showcase

1,960

Published on

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,960
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "CultuurNet showcase"

  1. 1. ShowcaseDavy Van Den Bremt
  2. 2. What will you learn today?• What CultuurNet does• How and where they use Drupal• How the reusable Drupal solution is built and works• Some stuff we learned down the road
  3. 3. For the Drupal geeksThis talk is about Drupal sites where the content and users live outside of Drupal. So no nodes and no Drupal users.
  4. 4. Who I am• Davy Van Den Bremt• More than 5 years Drupal• Involved in development of multiple CultuurNet solutions over 3 years• Working at Krimson
  5. 5. What Cultuurnet does ... that’s relevant to this talk
  6. 6. Gather events (in Flanders) ...
  7. 7. Distribute these events ...
  8. 8. ... by region ...
  9. 9. ... by target audience ...
  10. 10. ... on multiple platforms ...
  11. 11. iPhone
  12. 12. Mobile web
  13. 13. Android
  14. 14. Philips TV
  15. 15. Distribute everywhere• On own platforms• On other people’s platforms
  16. 16. Create an experience ... around that content
  17. 17. Enrich content
  18. 18. Building a central user profile
  19. 19. Let people express what they like and go to
  20. 20. Recommend events and users
  21. 21. The platform
  22. 22. Widgets Drupal websites Drupal modules Custom iPhone, Android, ... API APIUiTdatabank UiTid
  23. 23. Widgets Drupal websites Drupal modules Custom iPhone, Android, ... API APIUiTdatabank UiTid
  24. 24. UiTdatabank API• Rest API• XML or JSON response• Slice of content based on API key
  25. 25. UiTdatabank API• Get events• Get actors• Get productions• Get reports• Get static values (cities, categories, ...)
  26. 26. /events/search?key=1
  27. 27. /events/search?key=1&q=madonna&city=gent
  28. 28. /event/[CDBID]?key=1
  29. 29. /events/report?key=1&city=gent
  30. 30. Widgets Drupal websites Drupal modules Custom iPhone, Android, ... API APIUiTdatabank UiTid
  31. 31. UiTid API (CultureFeed)• Rest API• XML or JSON response• OAuth authentication
  32. 32. UiTid API (CultureFeed)• Gebruikers opvragen• Gebruikers beheren• Acties doen• Aanbevelingen opvragen• ...
  33. 33. createUserupdateUserdeleteUsergetUsersearchUsersgetSimilarUsersuploadUserDepictionresendMboxConfirmationForUserupdateUserPrivacygetUserServiceConsumersrevokeUserServiceConsumerupdateUserOnlineAccountdeleteUserOnlineAccountcreateActivityupdateActivitydeleteActivitysearchActivitiessearchActivityUsersgetTopEventsgetRecommendationsForUsergetRecommendationsForEventevaluateRecommendationgetUrlAddSocialNetworkgetUrlChangePasswordgetUrlLogoutgetServiceConsumerscreateServiceConsumerupdateServiceConsumer
  34. 34. /user/search (OAuth tokens!!!)
  35. 35. Other systems• Tracking(has API and JS suite)• Enrichments (has API)• Media indexer• Agents
  36. 36. So, where’s Drupal ?
  37. 37. Media sites Media Indexer Youtube Wikipedia Resto.be Cobra CultureFeed UitDatabank Enrichments TrackingUiT in Vlaanderen UiT in Vlaanderen iPhone Android Philips TV Widgets MobileUiT met Vlieg UiT in Gent UiT in Vlaams-Brabant
  38. 38. The Drupal solution
  39. 39. Module suites CNApi CultureFeed
  40. 40. Module suites vision• Layered • Each layer adds functionality • Only use what you need• Plug & play • It’s possible to get a full site out of the box• Implements what’s used on most sites
  41. 41. CNAPIDrupal module suite for UiTdatabank API
  42. 42. The CNApi suite modules• API layer (cnapi)• UI layer(cnapi_ui)• Browse, search and filter UI elements (cnapi_browse)• Some extra UI elements (cnapi_extras)• Tracking (cnap_trackingi)• Shadow nodes (cnapi_snode)• View 3 integration (cnapi_views)
  43. 43. API layer (cnapi)• (Drupal) PHP implementation for UiTdatabank API• Results parsed in array structures• Caching implemented• Removes quirks
  44. 44. API layer : Example calls // List events UiT met kinderen in Leuven$query = array(city => Leuven,heading => 179);$result = cnapi_get_events($query);// List actors in Limburg$query = array(regio => Provincie Limburg);$result = cnapi_get_actors($query);// List productions in Bioscoop$query = array(locationtype => 8.9.1.0.0, type => 0.50.6.0.0);$result = cnapi_get_productions($query);// Detail eventobject Pukkelpop 2011$result = cnapi_get_event(96f4401d-800a-49ca-8c74-5d6e49b131b3);// Detail actorobject Ancienne Belgique$result = cnapi_get_actor(3b98fcf8-81e4-4cb0-a95a-50ee637a2b91);// Detail productionobject Cars 2: World Grand Prix$result = cnapi_get_production(c6efbab4-5e64-4f96-a26f-c00aa997a0ba);// Bovenstaande functies zijn wrappers rond cnapi_get$request = array(action => list_detail, type => event, query =>array(cityid => 9000_GENT));$result = cnapi_get($request);// Rubrieken$result = cnapi_get_headings();
  45. 45. API layer : Example result
  46. 46. UI layer (cnapi_ui)• Provides result pages (context concept)• Provides detail pages• Provides RSS feeds• Provides Drupal templates• Implements tracking• Provides helper functions to work with requests
  47. 47. UI layer (cnapi_ui)• SEO Optimised • URL redirects • canonical and noindex • cnapi_ui_preprocess_link • hook_url_(in/out)bound_alter
  48. 48. Browse, search and filter UI elements (cnapi_browse)
  49. 49. Some extra UI elements (cnapi_extras)
  50. 50. Shadow nodes (cnapi_snode)
  51. 51. Why create them?• A lot of functionality is available that works on nodes • Rating • Comments • Sharing
  52. 52. What are shadow nodes? CDBID Create node when used first time NID DrupalAPI object node Fetch info (in real time) Full when node is viewed CDBID details
  53. 53. Why not sync all details?• There’s a lot of details• There’s a lot of data• That can change• Syncing is hard (how to detect changes?)
  54. 54. How it was done
  55. 55. CultureFeedDrupal module suite for UiTid API
  56. 56. The CultureFeed suite modules• PHP Class library• API layer (culturefeed)• UI layer(culturefeed_ui)
  57. 57. PHP Class library• Usable outside of Drupal context• Object oriented• Results parsed as typed objects
  58. 58. Example usage
  59. 59. Implements complete API
  60. 60. API layer (culturefeed)• Provides singleton object to make calls without caring about keys, secrets, ... and ask Drupal specific questions DrupalCultureFeed::doSomething()• Implements caching layer• Provides OAuth authentication callbacks
  61. 61. Example usage
  62. 62. Implements OAuth authentication
  63. 63. UI layer (culturefeed_ui)• Provide login block• Provides pages to administer account• Provides blocks with recommendation, related users, ...
  64. 64. Lessons learned
  65. 65. Use SEO as a performance optimisation tool
  66. 66. Creating a userprogrammatically is heavy
  67. 67. Learn custom url rewriting
  68. 68. Pay attention to block caching
  69. 69. Lazy content loading (1)• Some pages have a lot of API calls to fetch all info.• Fetch info using Ajax. • Not possible by Drupal out of the box.
  70. 70. Lazy content loading (2)
  71. 71. Lazy content loading (3)
  72. 72. Lazy content loading (3)
  73. 73. Get the code• http://github.com/davyvandenbremt/cnapi• http://github.com/davyvandenbremt/culturefeed
  74. 74. Questions?
  75. 75. Davy Van Den Bremtdavy@krimson.bedavyvandenbremt.be
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×