SlideShare a Scribd company logo
Introductie Drupal 
INTEC Brussel – 30 sept 2014
Agenda
p. 3 
Overzicht 
 Over Fedict 
 LAMP stack 
 Drupal algemeen 
 Overzicht, community 
 Drupal 6 / 7 
 Opbouw, modules en distributies, talen 
 Drupal 8, vooruitblik 
 Sites en modules testen
Over Fedict
Federale Overheidsdienst voor ICT 
 E-Gov componenten en diensten 
 Netwerk tussen gebouwen / internet (FedMAN) 
 Gegevensuitwisseling (Federal Service Bus) 
 Authenticatie (Federal Authentication Service) 
 Website platform en service (Drupal OpenFed) 
 Elektronische identiteitskaart 
 http://www.fedict.belgium.be/nl/service_catalogue 
 ICT medewerkers via Fedict Select 
p. 5 
 http://www.fedictselect.be
LAMP stack
Linux, Apache, MySQL, PHP 
p. 7 
MySQL 
PHP 
Linux 
Apache
 Open source besturingssysteem 
 Begonnen als hobbyproject in 1991 
 Alternatief voor dure Unix systemen 
 Van kleine tot grote systemen 
 Modem / routers (BeBox) 
 Smartphones / tablets (Android) 
 PCs 
 Supercomputers 
p. 8 
Linux 
Larry Ewing, http://commons.wikimedia.org/wiki/File:Tux-shaded.svg
p. 9 
Apache HTTPd 
 Open source webserver 
 Serie patches NCSA in 1995 
 Draait op Linux, Windows, BSD, OS X, ... 
 Ooit door 70% van alle sites gebruikt (nu 30%) 
 Erg veelzijdige server 
 Allerlei modules: proxy, beveiliging, scripts, logging, … 
 Deel van Apache Software Foundation
MySQL 
 Open source relationele database 
 Ontstaan in 1995 
 Draait op Linux, Windows, BSD … 
 C, Java, .Net, PHP, Python, Ruby … connectors 
 Firma gekocht door Sun (nu Oracle) in 2008 
 Product blijft open source... 
 … daarnaast ontstaan varianten zoals MariaDB, Drizzle 
p. 10 
 WebScaleSQL 
 Facebook, Twitter, LinkedIn (Google)
 Script taal voor webpagina's 
 Begonnen in 1995 (“Personal Home Page”) 
 Draait op Linux, Windows, BSD … 
 Joomla, WordPress, phpMyAdmin, phpBB, ... 
 Nu meer aandacht voor performantie 
 APC, Zend Opcache / Optimizer+ … opcode cache 
 Facebook HipHop / HHVM compiler 
p. 11 
PHP
Drupal: overzicht
Drupal site: voorbeeld 
p. 13
Drupal 
 (Web) Content Management Systeem 
p. 14 
 Ontstaan in 2001 
 Open source (GPL) 
 1000-en modules 
 Workflow, integratie, beheer, e-shop, ... 
 Meestal op LAMP 
 Draait soms ook op BSD, MacOS X, MS-Windows 
 … op nginx, IIS webserver 
 … Postgres, MS SQL Server / Azure database
Sterke punten 
 Actieve gebruikersgroepen 
 Geen licentiekosten 
 Veel documentatie 
p. 15 
 Handboeken, online 
 Zeer veel mogelijkheden 
 Uitbreiden functionaliteit, wijzigen lay-out 
 Zeer populair 
 Veel kleine en grotere Drupal-bedrijven
 100-en overheidssites in België 
 ZuinigMetStraling, OFO-IFA, HRJ, Civiele Veiligheid ... 
 Overheidssites in het buitenland 
 WhiteHouse.gov, maar ook in Australië, Frankrijk, ... 
 StuBru, Vier, VTM, Kinepolis 
 Amnesty Int, UNICEF.be, Greenpeace UK 
 Carrefour, Essent, Tesla Motors 
p. 16 
Zeer populair
 Standaard zoekmotor is beperkt 
 Geen autocomplete, wildcard, search in documenten 
 => Oplossing is Apache Solr / Lucene + Tika (Java) 
 Meerdere talen op 1 site is soms lastig 
 Extra modules en configuratie nodig 
 => Eindelijk “out-of-the-box” in Drupal 8 
 Mix van content- / configuratiebeheer 
 Zeer moeilijk om enkel content / config te kopiëren 
 => Drupal 8 
p. 17 
Zwakke punten
 Elke major release heeft andere API 
 Modules moeten vaak opnieuw ontwikkeld worden 
 Niet bedoeld voor documentbeheer 
 Wel integratie met bijvoorbeeld Alfresco mogelijk 
p. 18 
Zwakke punten (2)
Voorbeelden integraties 
p. 19 
 Documentbeheer 
 Alfresco (via CMIS module) 
 Multimedia 
 Youtube, Vimeo (Media module) 
 Sociale Media 
 Twitter, Facebook (AddThis, ShareThis...) 
 Statistieken 
 GoogleAnalytics
Drupal en Solr search 
File (extractie PDF,...) 
p. 20 
Solr server 
(Java) 
Drupal 
(PHP) 
Apache Solr 
Modules 
Tika 
Lucene 
(index) 
Content
p. 21 
Snel van start 
 Website 
 http://drupal.org 
 Online site bouwen (gratis maar wat beperkt) 
 http://simplytest.me/ 
 http://www.drupalgardens.com/ 
 http://www.acquia.com/acquia-cloud-free
Snel van start (eigen machine) 
 Oracle VirtualBox (desktop) 
 Open source virtualisatie 
 MacOS X, Linux, MS-Windows 
 https://www.virtualbox.org/ 
p. 22 
 Virtuele machines 
 http://www.turnkeylinux.org/ 
 LAMP stack voor MacOS / Windows / Linux 
 Goed voor development, niet voor productie 
 https://www.apachefriends.org/index.html
© Fedict 2014. All rights reserved 
Drupal: community
Beheer op drupal.org, voordelen 
 “Project” voor themes, modules, ... 
 Referentie (klanten / werkgevers) 
 Gratis + bespaart werk 
 Automatisch aanmaken downloads 
 Bij correct gebruik: link bug ticket naar fix in code 
 Automatische tests mogelijk 
 Statistieken aantal sites die module gebruiken 
 Enkel sites die “Update” module hebben geactiveerd 
 Enkel totalen, geen gedetailleerde lijst van sites 
p. 24
Projectpagina: voorbeeld 
p. 25
Projectpagina: functies 
p. 26 
 Algemene informatie 
 Beschrijving, lijst ontwikkelaars, downloads 
 Statistieken, laatste activiteit 
 Eventueel link naar gelijkaardige projecten, documentatie 
 Issue tracker 
 Bugs, vragen, aanvraag nieuwe functies 
 Iedereen mag commentaar geven / patches sturen
 Ontwikkeld door Linus Torvalds 
 Oorspronkelijk om versies Linux kernel te beheren 
 Beschikbaar voor Linux, Windows, MacOS X... 
 “Wie” heeft “wat” “wanneer” gewijzigd 
 Terugkeren naar vorige versie is mogelijk 
 Commentaar toevoegen “waarom” 
 Link met projectpagina op Drupal.org 
 Git “Issue #12345 ...” wordt gelinkt aan ticket 12345 
p. 27 
Git versiebeheer
Projectpagina: git commits 
p. 28
Zelf project maken drupal.org 
 Iedereen kan sandbox project aanmaken 
 Projectpagina, git, … 
 (Nog) geen unieke projectnaam (enkel nummer) 
 Full projects door “goedgekeurde” developers 
 Unieke naam op drupal.org 
 “Promotie” sandbox => full is mogelijk 
 Mogelijkheid om anderen toegang te geven 
 Beheren tickets, beheren projectpagina, ... 
p. 29
Eenmalige developer / code review 
 Niet vereist om patches op te sturen 
 Voor wie zelf modules... op d.o. wil beheren 
 Doel: verhogen kwaliteit modules 
 Eenmalige review door andere drupal.org developers 
 Nakijken correct gebruik Drupal API, documentatie... 
 Kan helaas weken / maanden duren (vrijwilligers) 
 Nadien onbeperkt aanmaken projecten 
p. 30
Marketplace 
 Lijst van Drupal-bedrijven 
 Training, hosting, ontwikkeling, … 
 Gekoppeld aan activiteiten / projecten op d.o. 
p. 31 
 Lijst van Drupal-boeken
© Fedict 2014. All rights reserved 
Drupal 6 / 7: opbouw
Module Module Profile Theme Library 
Module Module Theme 
p. 33 
Distributie 
Van module tot distributie 
Module Module Theme 
Core 
Module Module 
Library
p. 34 
Themes 
 Layout 
 2 000+ gratis themes 
 Mix van HTML / CSS / Javascript en/of PHP 
 Subthemes mogelijk 
 Gebaseerd op / variant van bestaand theme 
 Sneller te ontwikkelen, vaak al “mobile”, “responsive” 
 Populaire “base themes”: Zen, Omega
Modules 
 Core modules (standaard in Drupal) 
p. 35 
 Blog, Page, ... 
 Contrib modules 
 25 000+ gratis modules 
 Wisselende kwaliteit en ondersteuning 
 Verbetering functies / extra mogelijkheden 
 Integratie Google / Facebook / Twitter … diensten 
 Workflow, eCommerce, beheer content / gebruikers, ...
Libraries 
 Geschreven in PHP en/of Javascript 
 Visuele effecten / opmaak 
p. 36 
 Jquery Cycle, SuperFish, ... 
 Integratie met andere diensten 
 OpenLayers, MailChimp, ... 
 Online HTML editor 
 Zit niet standaard in D6 / D7 (wel in D8) 
 CKEditor, TinyMCE
(Installation) profiles en distributies 
p. 37 
 Installation profiles 
 Keuze (enkel) bij installatie 
 Verzameling modules, themes, libraries 
 Gescripte configuratie van deze modules 
 800 distributies 
 Core + installation profile(s), modules, themes … 
 Commerce Kickstart, OpenFed, Acquia Commons, ...
© Fedict 2014. All rights reserved 
Drupal 6 / 7: modules
Goeie informatici zijn lui 
http://commons.wikimedia.org/wiki/File:Lazzaro1.jpg 
p. 39
Zelf een module bouwen ? 
p. 40 
Bestaat 
er al een 
module ? 
Actieve 
ontwikkeling 
(Co-) 
maintainer 
worden ? 
Patch 
mogelijk ? 
Eigen module 
J 
N 
J 
N N 
N 
J 
Patch 
J
Bestanden van een module 
p. 41 
 <module>.info 
 Naam, versie van module, afhankelijkheden 
 <module>.install 
 Code installatie / upgrade / verwijderen module 
 <module>.module / <module>.inc 
 Eigenlijke module en include files 
 <module>.test 
 SimpleTest bestanden
p. 42 
.info voorbeeld 
name = Date 
description = Makes date/time fields available. 
project = "date" 
version = "7.x-2.8" 
package = Date/Time 
core = 7.x 
Php = 5.2 
dependencies[] = date_api 
files[] = date.migrate.inc 
files[] = tests/date_api.test 
files[] = tests/date.test
Drupal API 
 Lijst van Drupal functies, constanten 
 Form API / builder 
p. 43 
 Formulieren 
 Hooks 
 Installatie / verwijderen module 
 Toevoegen / verwijderen content / gebruikers / menu's 
 Menu's, fields, ...
Menu hook voorbeeld 
p. 44 
/** 
* Implements hook_menu(). 
*/ 
function devel_menu() { 
... 
$items['devel/settings'] = array( 
'title' => 'Devel settings', 
'description' => 'Helper functions, pages', 
'page callback' => 'drupal_get_form', 
'page arguments' => array('devel_admin_settings'), 
'access arguments' => array('administer site configuration'), 
'file' => 'devel.admin.inc', 
'menu_name' => 'devel', 
); 
... 
return system_settings_form($form); 
}
© Fedict 2014. All rights reserved 
Drupal 6 / 7: distributies
Wanneer een distributie bouwen ? 
 Veel sites op zelfde platform 
 Voordelen: 
 Sneller beginnen met sites te ontwikkelen 
 Makkelijker te onderhouden (bij strikt beheer) 
p. 46 
 Nadelen: 
 Beetje configuratiewerk 
 Minder flexibel
Drush tool 
 Command line (php) tools 
 Modules (des)activeren, backups, … 
 Uitbreidbaar met eigen commando's 
p. 47 
 Drush make 
 Bundelen core, modules, patches, themes... 
 Bij voorkeur exacte versienummers gebruiken
p. 48 
Makefile voorbeeld 
libraries[colorbox][download][type] = "get" 
libraries[colorbox][download][url] = 
"https://github.com/jackmoore/colorbox/archive/1.5.13.zip" 
libraries[colorbox][directory_name] = "colorbox" 
libraries[colorbox][type] = "library" 
projects[admin_language][download][type] = git 
projects[admin_language][download][branch] = "7.x-1.x" 
projects[admin_language][download][revision] = 6f0a6e5 
projects[admin_language][subdir] = contrib 
projects[i18n][version] = "1.11" 
projects[i18n][subdir] = contrib 
projects[i18n][patch][2250501] = "http://drupal.org/files/issues/i18n-node_ 
edit-2250501-8.patch"
Licenties 
 Open source =/= zonder licentiebepalingen 
 Beperkingen / verplichtingen 
 Verschillende licenties niet altijd compatibel 
p. 49 
 Drupal: GPL v2 of later 
 Code beschikbaar stellen aan gebruiker 
 Gebruikers mogen code doorgeven 
 Drupal: whitelist compatibele componenten 
 Alle drupal.org modules / themes … 
 Enkele externe modules / libraries ...
Distributie op drupal.org 
 Projectpagina etc zoals bij module 
 Gecontroleerde drush make file 
 Enkel “full” modules / themes van drupal.org 
 Beperkte lijst toegestane libraries 
 https://drupal.org/project/drupalorg_whitelist 
p. 50
© Fedict 2014. All rights reserved 
Drupal 6 / 7: meertaligheid
p. 52 
Meertaligheid 
http://commons.wikimedia.org/wiki/File:Br%C3%BCssel_%28Ortstafel%29.jpg
 Labels, foutboodschappen ... 
 Standaard mails, site slogan, ... 
 Navigatie / menu's 
 Drop-down lijsten / taxonomies 
 Inhoud pagina's 
p. 53 
Vertalingen
 (Veel) extra modules nodig 
 i18n, i18nviews, entity translation 
 Vertaling niet altijd 1-op-1 
 Vb: NL + FR site met beperkte vertaling naar EN + DE 
 Wat met menu's ? Pagina's die enkel in 1 taal bestaan ? 
 Vertaling gebeurt op verschillende plaatsen 
 Ook verschillende rechten nodig 
p. 54 
Aandachtspunten
Vertaling van inhoud 
p. 55 
 Drupal 6 
 Vertaling per “node”, elke vertaalde node een andere ID 
 => wat met bijvoorbeeld “likes” (vertaalde of alle nodes ?) 
 “Synchroon” houden auteur, datum … ? (i18nsync) 
 Drupal 7 
 Vertaling per node, zoals in D6 
 Of per veld (entity translation) 
 => zelfde ID, maar werkt niet altijd met alle modules
© Fedict 2014. All rights reserved 
Sites en modules testen
Simpletest module 
 Standaard in D7 (“Testing”) module 
p. 57 
 Aparte module in D6 
 Testen van functies tijdens ontwikkeling 
 Niet verplicht, wel sterk aan te raden 
 Testen kunnen ook automatisch draaien op d.o.
Simpletest voorbeeld 
p. 58 
<?php 
public function setUp() { 
parent::setUp('simpletest_demo'); 
$this->privileged_user = $this->drupalCreateUser( 
array('create simpletest_demo', 'edit own simpletest_demo')); 
$this->drupalLogin($this->privileged_user); 
} 
public function testSimpleTestDemoCreate() { 
$edit = array(); 
$edit['title'] = 'SimpleDemo'; 
$edit['body'] = $this->randomName(80); 
$this->drupalPost('node/add/simpletest-demo', $edit, t('Save')); 
$this->assertText(t('SimpleDemo has been created.')); 
} 
?>
p. 59 
Simpletest rapport
Hulpmiddelen 
 Automatische code review 
 http://pareview.sh 
 Documentatie, correct gebruik API, naamgeving... 
 Tips ivm veiligheid en performantie 
 Eigen te schrijven unit tests (SimpleTest) 
 https://drupal.org/simpletest 
p. 60 
 Development module 
 https://drupal.org/project/devel
 Automatiseren testen via browser 
 Aansturen IE, Firefox, Chrome, … via script / code 
 Java, Python, C#, Ruby, (PHP) 
 http://www.seleniumhq.org 
 Nabootsen wat gebruiker doet / ziet 
 Klikken, uploaden files, invullen formulieren 
 Aanvulling (geen vervanging) unit testen 
 Staat los van Drupal (wel module beschikbaar) 
 Opstellen kan wat moeite kosten 
p. 61 
Selenium
Selenium voorbeeld (python) 
from selenium import webdriver 
p. 62 
… driver = webdriver.Firefox() 
driver.get("http://www.google.com") 
inputElement = driver.find_element_by_name("q") 
inputElement.send_keys("cheese!") 
inputElement.submit() 
try: 
WebDriverWait(driver, 10).until(EC.title_contains("cheese!")) 
print driver.title 
finally: 
driver.quit()
Vagrant 
 Scripten installatie devlopment-omgeving 
 Virtuele Machine 
p. 63 
 VMWare, VirtualBox, … 
 Provision tools 
 Shell scripts, Chef, Puppet, ... 
 https://www.vagrantup.com
© Fedict 2014. All rights reserved 
Drupal 6 / 7: Varia
Drupal 7: Entities 
 D6: Content Construction Kit 
 Enkel op Nodes (Content Types) 
p. 65 
 D7: Entity Types 
 Nodes, Comments, Taxonomy, Users 
 => extra velden, vertalingen (Entity Translation) 
 => Views, Rules 
 Entity API
 Uitschakelen niet-gebruikte modules 
 Drupal caching 
 Page cache / Block cache 
 Views query results cache 
 Eigen code: &drupal_static(__FUNCTION__) 
 CSS / Javascript aggregation (1 bestand) 
 PHP versie 
 Memcache 
p. 66 
Performantie
Drupal 8: vooruitblik
Gebaseerd op Symfony 2 
 Release: eind 2014 ?? 
 Hergebruik PHP framework 
 http://symfony.com/blog/symfony2-meets-drupal-8 
 http://cipix.nl/understanding-drupal-8-part-1-general-structure-framework 
p. 68 
 Voordelen 
 Interessanter voor niet-Drupal (PHP) developers 
 Laat toe om nieuwe functies sneller te ontwikkelen 
 Nadelen 
 Leercurve voor ervaren Drupal developers 
 Herschrijven modules en themes
Grote verbeteringen 
 Configuration Management 
 Gescheiden houden content en inhoud 
p. 69 
 (REST) Web Services 
 Makkelijker om feeds te maken / data binnen te halen 
 Meer functionaliteit standaard aanwezig 
 Meertaligheid, HTML Editor, Views 
 HTML5 / Mobile / Accessibility 
 Geen ondersteuning meer voor IE8
Gebruiksvriendelijke UI 
p. 70
Configuration Management 
 Configuration API 
 Uitwisselen via YAML files 
 Vb: van development naar productie-omgeving 
 (Oorspronkelijk niet in database, sinds kort wel) 
p. 71
p. 72 
Andere APIs 
 Validation API 
 Niet enkel meer voor formulieren (vb ook voor REST) 
 Voorbeeld: controle maximum waarde 
 State API 
 Niet verwarren met Configuration API 
 Voorbeeld: laatste keer dat cron uitgevoerd werd 
 In D6 / D7 meestal bijgehouden in Variable 
 Tour API 
 Gebaseerd op Joyride.js
p. 73 
Twig themes 
 Voordelen 
 Niet Drupal-specifiek 
 Ontwikkeld door de makers van Symfony 2 
 Leesbaarder 
 Geen PHP code meer in templates (= veiliger) 
 Nadeel 
 Leercurve voor ervaren Drupal themers
p. 74 
Twig voorbeeld 
{# 
This is a comment 
#} 
<div>{{ 'List'|t }}</div> 
<ul> 
{% for choice in menu %} 
<li>{{ choice.name }}</li> 
{% endfor %} 
</ul>
Wat met bestaande Drupal sites ? 
 Drupal 7 blijft ondersteund 
 Drupal 6 ? 
 Ondersteuning eindigt 3 maanden na release D8 
 https://www.drupal.org/node/2288521 
 Heel wat sites draaien nog op Drupal 6 ! 
 Upgrade naar D7 / D8 kan lastig zijn 
 Niet alle modules al beschikbaar / stabiel 
 => (betalende) ondersteuning door Drupal-bedrijven 
p. 75 
 “Backdrop” fork ?
 https://drupal.org/drupal-8.0 
 https://www.drupal.org/update/modules/7/8 
 https://www.acquia.com/blog/d8migrate 
 https://groups.drupal.org/core/twidc 
 https://www.drupal.org/node/2127611 
p. 76 
Meer informatie
Vragen ?
Bedankt ! 
Bart Hanssens / Fedict 
WTC III, Simon Bolivarlaan 30 
1000 Brussel, België 
@BartHanssens 
bart.hanssens [at] fedict.be | www.fedict.belgium.be

More Related Content

Viewers also liked

KOGK - Wat is drupal? - Baris Wanschers
KOGK - Wat is drupal? - Baris WanschersKOGK - Wat is drupal? - Baris Wanschers
KOGK - Wat is drupal? - Baris Wanschers
CrossLang / CrossCheck / CrossCast
 
Drupal introductie voor beheerders
Drupal introductie voor beheerdersDrupal introductie voor beheerders
Drupal introductie voor beheerders
Bèr Kessels
 
Michael jordan
Michael jordanMichael jordan
Michael jordanskuryan
 
Drupal workshop 10-03-2011
Drupal workshop 10-03-2011Drupal workshop 10-03-2011
Drupal workshop 10-03-2011
Hoppinger
 
Introduction to Drupal Distributions
Introduction to Drupal DistributionsIntroduction to Drupal Distributions
Introduction to Drupal Distributions
Amplexor
 
Hello Drupal!
Hello Drupal!Hello Drupal!
Hello Drupal!Acquia
 
Drupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: LaunchingDrupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: LaunchingAcquia
 
Drupal for Marketers
Drupal for MarketersDrupal for Marketers
Drupal for MarketersAcquia
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
Suzanne Dergacheva
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
Acquia
 
Drupal 7 vs. Drupal 8: A Contrast of Multilingual Support
Drupal 7 vs. Drupal 8: A Contrast of Multilingual SupportDrupal 7 vs. Drupal 8: A Contrast of Multilingual Support
Drupal 7 vs. Drupal 8: A Contrast of Multilingual Support
Acquia
 
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
Acquia
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
Tobias Ratschiller
 
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
Acquia
 

Viewers also liked (16)

De Nieuwe Antwerpenaar
De Nieuwe AntwerpenaarDe Nieuwe Antwerpenaar
De Nieuwe Antwerpenaar
 
KOGK - Wat is drupal? - Baris Wanschers
KOGK - Wat is drupal? - Baris WanschersKOGK - Wat is drupal? - Baris Wanschers
KOGK - Wat is drupal? - Baris Wanschers
 
Drupal introductie voor beheerders
Drupal introductie voor beheerdersDrupal introductie voor beheerders
Drupal introductie voor beheerders
 
Michael jordan
Michael jordanMichael jordan
Michael jordan
 
Drupal workshop 10-03-2011
Drupal workshop 10-03-2011Drupal workshop 10-03-2011
Drupal workshop 10-03-2011
 
Introduction to Drupal Distributions
Introduction to Drupal DistributionsIntroduction to Drupal Distributions
Introduction to Drupal Distributions
 
Hello Drupal!
Hello Drupal!Hello Drupal!
Hello Drupal!
 
Drupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: LaunchingDrupal for Project Managers, Part 3: Launching
Drupal for Project Managers, Part 3: Launching
 
Drupal for Marketers
Drupal for MarketersDrupal for Marketers
Drupal for Marketers
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
 
Drupal 7 vs. Drupal 8: A Contrast of Multilingual Support
Drupal 7 vs. Drupal 8: A Contrast of Multilingual SupportDrupal 7 vs. Drupal 8: A Contrast of Multilingual Support
Drupal 7 vs. Drupal 8: A Contrast of Multilingual Support
 
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
Business Benefits of Drupal 8: Empower Digital Innovation with the Newest Ver...
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
Acquia Cloud Extend: une offre exclusive pour héberger vos sites Drupal en Fr...
 

Similar to Introductie Drupal development

Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
Drupal + Open Atrium bij de Vlaamse ErfgoedbibliotheekDrupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
David Coppoolse
 
Lucius Drupal Development Cursus
Lucius Drupal Development CursusLucius Drupal Development Cursus
Lucius Drupal Development CursusLuciuswebsystems
 
Drupal Cursus Hans Rossel
Drupal Cursus Hans RosselDrupal Cursus Hans Rossel
Drupal Cursus Hans RosselHans Rossel
 
Drupal opleiding
Drupal opleidingDrupal opleiding
Drupal opleidingHans Rossel
 
Lucius Websystems Drupal Startersdag
Lucius Websystems Drupal StartersdagLucius Websystems Drupal Startersdag
Lucius Websystems Drupal Startersdag
Luciuswebsystems
 
Drupal Uitgebreide Starters Training
Drupal Uitgebreide Starters TrainingDrupal Uitgebreide Starters Training
Drupal Uitgebreide Starters TrainingLuciuswebsystems
 
Oplijsting mogelijkheden open source
Oplijsting mogelijkheden open sourceOplijsting mogelijkheden open source
Oplijsting mogelijkheden open sourceguesta83c7d
 
oplijsting_mogelijkheden_open_source
oplijsting_mogelijkheden_open_sourceoplijsting_mogelijkheden_open_source
oplijsting_mogelijkheden_open_sourceguesta83c7d
 
Eduvision - Webinar drupal: gratis online cursus Drupal
Eduvision - Webinar drupal: gratis online cursus DrupalEduvision - Webinar drupal: gratis online cursus Drupal
Eduvision - Webinar drupal: gratis online cursus Drupal
Eduvision Opleidingen
 
WSO2 Mashup Server
WSO2 Mashup ServerWSO2 Mashup Server
WSO2 Mashup Server
Nils Breunese
 
Plone add-on packages uit Nederland - Fred van Dijk
Plone add-on packages uit Nederland - Fred van DijkPlone add-on packages uit Nederland - Fred van Dijk
Plone add-on packages uit Nederland - Fred van Dijk
Zest Software
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
Bart De Waele
 
Drupal intro 2010
Drupal intro 2010Drupal intro 2010
Drupal intro 2010
Hans Rossel
 
Open eGo, innovatie in eGovernment
Open eGo, innovatie in eGovernmentOpen eGo, innovatie in eGovernment
Open eGo, innovatie in eGovernment
Bart Gysens
 
Open eGo 20090910
Open eGo 20090910Open eGo 20090910
Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010
Wytze Koopal
 
Drupal koba-nov2013
Drupal koba-nov2013Drupal koba-nov2013
Drupal koba-nov2013Hans Rossel
 
Drupal 7 Architectuur
Drupal 7 ArchitectuurDrupal 7 Architectuur
Drupal 7 Architectuur
Maikel Mardjan
 

Similar to Introductie Drupal development (20)

Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
Drupal + Open Atrium bij de Vlaamse ErfgoedbibliotheekDrupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
 
Lucius Drupal Development Cursus
Lucius Drupal Development CursusLucius Drupal Development Cursus
Lucius Drupal Development Cursus
 
Drupal Cursus Hans Rossel
Drupal Cursus Hans RosselDrupal Cursus Hans Rossel
Drupal Cursus Hans Rossel
 
Drupal opleiding
Drupal opleidingDrupal opleiding
Drupal opleiding
 
Lucius Websystems Drupal Startersdag
Lucius Websystems Drupal StartersdagLucius Websystems Drupal Startersdag
Lucius Websystems Drupal Startersdag
 
Drupal Uitgebreide Starters Training
Drupal Uitgebreide Starters TrainingDrupal Uitgebreide Starters Training
Drupal Uitgebreide Starters Training
 
Oplijsting mogelijkheden open source
Oplijsting mogelijkheden open sourceOplijsting mogelijkheden open source
Oplijsting mogelijkheden open source
 
oplijsting_mogelijkheden_open_source
oplijsting_mogelijkheden_open_sourceoplijsting_mogelijkheden_open_source
oplijsting_mogelijkheden_open_source
 
Eduvision - Webinar drupal: gratis online cursus Drupal
Eduvision - Webinar drupal: gratis online cursus DrupalEduvision - Webinar drupal: gratis online cursus Drupal
Eduvision - Webinar drupal: gratis online cursus Drupal
 
WSO2 Mashup Server
WSO2 Mashup ServerWSO2 Mashup Server
WSO2 Mashup Server
 
Plone add-on packages uit Nederland - Fred van Dijk
Plone add-on packages uit Nederland - Fred van DijkPlone add-on packages uit Nederland - Fred van Dijk
Plone add-on packages uit Nederland - Fred van Dijk
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Ict Bijscholing
Ict BijscholingIct Bijscholing
Ict Bijscholing
 
Drupal intro 2010
Drupal intro 2010Drupal intro 2010
Drupal intro 2010
 
Open eGo, innovatie in eGovernment
Open eGo, innovatie in eGovernmentOpen eGo, innovatie in eGovernment
Open eGo, innovatie in eGovernment
 
Open eGo 20090910
Open eGo 20090910Open eGo 20090910
Open eGo 20090910
 
Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010Presentatie saMBO~ICT 2010
Presentatie saMBO~ICT 2010
 
Software anno 2009
Software anno 2009Software anno 2009
Software anno 2009
 
Drupal koba-nov2013
Drupal koba-nov2013Drupal koba-nov2013
Drupal koba-nov2013
 
Drupal 7 Architectuur
Drupal 7 ArchitectuurDrupal 7 Architectuur
Drupal 7 Architectuur
 

More from Bart Hanssens

OpenFed, a Drupal distribution
OpenFed, a Drupal distributionOpenFed, a Drupal distribution
OpenFed, a Drupal distribution
Bart Hanssens
 
Open Summer of Code in Belgium
Open Summer of Code in BelgiumOpen Summer of Code in Belgium
Open Summer of Code in Belgium
Bart Hanssens
 
Open Belgium 2022: Prepare To Code
Open Belgium 2022: Prepare To CodeOpen Belgium 2022: Prepare To Code
Open Belgium 2022: Prepare To Code
Bart Hanssens
 
Werkgroep metadata: INSPIRE - DCAT-AP mapping
Werkgroep metadata: INSPIRE - DCAT-AP mappingWerkgroep metadata: INSPIRE - DCAT-AP mapping
Werkgroep metadata: INSPIRE - DCAT-AP mapping
Bart Hanssens
 
Overzicht DCAT-AP
Overzicht DCAT-APOverzicht DCAT-AP
Overzicht DCAT-AP
Bart Hanssens
 
Quarkus, Jib én OpenJ9
Quarkus, Jib én OpenJ9Quarkus, Jib én OpenJ9
Quarkus, Jib én OpenJ9
Bart Hanssens
 
Open Data at the Federal Level 2021
Open Data at the Federal Level 2021Open Data at the Federal Level 2021
Open Data at the Federal Level 2021
Bart Hanssens
 
Open Data workshop Agoria ICT
Open Data workshop Agoria ICTOpen Data workshop Agoria ICT
Open Data workshop Agoria ICT
Bart Hanssens
 
Atelier Open Data / Agoria ICT
Atelier Open Data / Agoria ICTAtelier Open Data / Agoria ICT
Atelier Open Data / Agoria ICT
Bart Hanssens
 
Open Source and Open Data
Open Source and Open DataOpen Source and Open Data
Open Source and Open Data
Bart Hanssens
 
Données ouvertes
Données ouvertesDonnées ouvertes
Données ouvertes
Bart Hanssens
 
Open Data
Open DataOpen Data
Open Data
Bart Hanssens
 
Open Community Projects
Open Community ProjectsOpen Community Projects
Open Community Projects
Bart Hanssens
 
From webform to API using microframeworks
From webform to API using microframeworksFrom webform to API using microframeworks
From webform to API using microframeworks
Bart Hanssens
 
Linked Data: Introductie
Linked Data: IntroductieLinked Data: Introductie
Linked Data: Introductie
Bart Hanssens
 
JavaVMs en GraalVM
JavaVMs en GraalVMJavaVMs en GraalVM
JavaVMs en GraalVM
Bart Hanssens
 
Open data, what's cooking at the federal level 2020
Open data, what's cooking at the federal level 2020Open data, what's cooking at the federal level 2020
Open data, what's cooking at the federal level 2020
Bart Hanssens
 
BOSA DG DT: opendata et intégrateur de services
BOSA DG DT: opendata et intégrateur de servicesBOSA DG DT: opendata et intégrateur de services
BOSA DG DT: opendata et intégrateur de services
Bart Hanssens
 
Local and Regional digital transformation in Belgium
Local and Regional digital transformation in BelgiumLocal and Regional digital transformation in Belgium
Local and Regional digital transformation in Belgium
Bart Hanssens
 
Voordeel halen uit zoekmachines en semantic web
Voordeel halen uit zoekmachines en semantic webVoordeel halen uit zoekmachines en semantic web
Voordeel halen uit zoekmachines en semantic web
Bart Hanssens
 

More from Bart Hanssens (20)

OpenFed, a Drupal distribution
OpenFed, a Drupal distributionOpenFed, a Drupal distribution
OpenFed, a Drupal distribution
 
Open Summer of Code in Belgium
Open Summer of Code in BelgiumOpen Summer of Code in Belgium
Open Summer of Code in Belgium
 
Open Belgium 2022: Prepare To Code
Open Belgium 2022: Prepare To CodeOpen Belgium 2022: Prepare To Code
Open Belgium 2022: Prepare To Code
 
Werkgroep metadata: INSPIRE - DCAT-AP mapping
Werkgroep metadata: INSPIRE - DCAT-AP mappingWerkgroep metadata: INSPIRE - DCAT-AP mapping
Werkgroep metadata: INSPIRE - DCAT-AP mapping
 
Overzicht DCAT-AP
Overzicht DCAT-APOverzicht DCAT-AP
Overzicht DCAT-AP
 
Quarkus, Jib én OpenJ9
Quarkus, Jib én OpenJ9Quarkus, Jib én OpenJ9
Quarkus, Jib én OpenJ9
 
Open Data at the Federal Level 2021
Open Data at the Federal Level 2021Open Data at the Federal Level 2021
Open Data at the Federal Level 2021
 
Open Data workshop Agoria ICT
Open Data workshop Agoria ICTOpen Data workshop Agoria ICT
Open Data workshop Agoria ICT
 
Atelier Open Data / Agoria ICT
Atelier Open Data / Agoria ICTAtelier Open Data / Agoria ICT
Atelier Open Data / Agoria ICT
 
Open Source and Open Data
Open Source and Open DataOpen Source and Open Data
Open Source and Open Data
 
Données ouvertes
Données ouvertesDonnées ouvertes
Données ouvertes
 
Open Data
Open DataOpen Data
Open Data
 
Open Community Projects
Open Community ProjectsOpen Community Projects
Open Community Projects
 
From webform to API using microframeworks
From webform to API using microframeworksFrom webform to API using microframeworks
From webform to API using microframeworks
 
Linked Data: Introductie
Linked Data: IntroductieLinked Data: Introductie
Linked Data: Introductie
 
JavaVMs en GraalVM
JavaVMs en GraalVMJavaVMs en GraalVM
JavaVMs en GraalVM
 
Open data, what's cooking at the federal level 2020
Open data, what's cooking at the federal level 2020Open data, what's cooking at the federal level 2020
Open data, what's cooking at the federal level 2020
 
BOSA DG DT: opendata et intégrateur de services
BOSA DG DT: opendata et intégrateur de servicesBOSA DG DT: opendata et intégrateur de services
BOSA DG DT: opendata et intégrateur de services
 
Local and Regional digital transformation in Belgium
Local and Regional digital transformation in BelgiumLocal and Regional digital transformation in Belgium
Local and Regional digital transformation in Belgium
 
Voordeel halen uit zoekmachines en semantic web
Voordeel halen uit zoekmachines en semantic webVoordeel halen uit zoekmachines en semantic web
Voordeel halen uit zoekmachines en semantic web
 

Introductie Drupal development

  • 1. Introductie Drupal INTEC Brussel – 30 sept 2014
  • 3. p. 3 Overzicht  Over Fedict  LAMP stack  Drupal algemeen  Overzicht, community  Drupal 6 / 7  Opbouw, modules en distributies, talen  Drupal 8, vooruitblik  Sites en modules testen
  • 5. Federale Overheidsdienst voor ICT  E-Gov componenten en diensten  Netwerk tussen gebouwen / internet (FedMAN)  Gegevensuitwisseling (Federal Service Bus)  Authenticatie (Federal Authentication Service)  Website platform en service (Drupal OpenFed)  Elektronische identiteitskaart  http://www.fedict.belgium.be/nl/service_catalogue  ICT medewerkers via Fedict Select p. 5  http://www.fedictselect.be
  • 7. Linux, Apache, MySQL, PHP p. 7 MySQL PHP Linux Apache
  • 8.  Open source besturingssysteem  Begonnen als hobbyproject in 1991  Alternatief voor dure Unix systemen  Van kleine tot grote systemen  Modem / routers (BeBox)  Smartphones / tablets (Android)  PCs  Supercomputers p. 8 Linux Larry Ewing, http://commons.wikimedia.org/wiki/File:Tux-shaded.svg
  • 9. p. 9 Apache HTTPd  Open source webserver  Serie patches NCSA in 1995  Draait op Linux, Windows, BSD, OS X, ...  Ooit door 70% van alle sites gebruikt (nu 30%)  Erg veelzijdige server  Allerlei modules: proxy, beveiliging, scripts, logging, …  Deel van Apache Software Foundation
  • 10. MySQL  Open source relationele database  Ontstaan in 1995  Draait op Linux, Windows, BSD …  C, Java, .Net, PHP, Python, Ruby … connectors  Firma gekocht door Sun (nu Oracle) in 2008  Product blijft open source...  … daarnaast ontstaan varianten zoals MariaDB, Drizzle p. 10  WebScaleSQL  Facebook, Twitter, LinkedIn (Google)
  • 11.  Script taal voor webpagina's  Begonnen in 1995 (“Personal Home Page”)  Draait op Linux, Windows, BSD …  Joomla, WordPress, phpMyAdmin, phpBB, ...  Nu meer aandacht voor performantie  APC, Zend Opcache / Optimizer+ … opcode cache  Facebook HipHop / HHVM compiler p. 11 PHP
  • 14. Drupal  (Web) Content Management Systeem p. 14  Ontstaan in 2001  Open source (GPL)  1000-en modules  Workflow, integratie, beheer, e-shop, ...  Meestal op LAMP  Draait soms ook op BSD, MacOS X, MS-Windows  … op nginx, IIS webserver  … Postgres, MS SQL Server / Azure database
  • 15. Sterke punten  Actieve gebruikersgroepen  Geen licentiekosten  Veel documentatie p. 15  Handboeken, online  Zeer veel mogelijkheden  Uitbreiden functionaliteit, wijzigen lay-out  Zeer populair  Veel kleine en grotere Drupal-bedrijven
  • 16.  100-en overheidssites in België  ZuinigMetStraling, OFO-IFA, HRJ, Civiele Veiligheid ...  Overheidssites in het buitenland  WhiteHouse.gov, maar ook in Australië, Frankrijk, ...  StuBru, Vier, VTM, Kinepolis  Amnesty Int, UNICEF.be, Greenpeace UK  Carrefour, Essent, Tesla Motors p. 16 Zeer populair
  • 17.  Standaard zoekmotor is beperkt  Geen autocomplete, wildcard, search in documenten  => Oplossing is Apache Solr / Lucene + Tika (Java)  Meerdere talen op 1 site is soms lastig  Extra modules en configuratie nodig  => Eindelijk “out-of-the-box” in Drupal 8  Mix van content- / configuratiebeheer  Zeer moeilijk om enkel content / config te kopiëren  => Drupal 8 p. 17 Zwakke punten
  • 18.  Elke major release heeft andere API  Modules moeten vaak opnieuw ontwikkeld worden  Niet bedoeld voor documentbeheer  Wel integratie met bijvoorbeeld Alfresco mogelijk p. 18 Zwakke punten (2)
  • 19. Voorbeelden integraties p. 19  Documentbeheer  Alfresco (via CMIS module)  Multimedia  Youtube, Vimeo (Media module)  Sociale Media  Twitter, Facebook (AddThis, ShareThis...)  Statistieken  GoogleAnalytics
  • 20. Drupal en Solr search File (extractie PDF,...) p. 20 Solr server (Java) Drupal (PHP) Apache Solr Modules Tika Lucene (index) Content
  • 21. p. 21 Snel van start  Website  http://drupal.org  Online site bouwen (gratis maar wat beperkt)  http://simplytest.me/  http://www.drupalgardens.com/  http://www.acquia.com/acquia-cloud-free
  • 22. Snel van start (eigen machine)  Oracle VirtualBox (desktop)  Open source virtualisatie  MacOS X, Linux, MS-Windows  https://www.virtualbox.org/ p. 22  Virtuele machines  http://www.turnkeylinux.org/  LAMP stack voor MacOS / Windows / Linux  Goed voor development, niet voor productie  https://www.apachefriends.org/index.html
  • 23. © Fedict 2014. All rights reserved Drupal: community
  • 24. Beheer op drupal.org, voordelen  “Project” voor themes, modules, ...  Referentie (klanten / werkgevers)  Gratis + bespaart werk  Automatisch aanmaken downloads  Bij correct gebruik: link bug ticket naar fix in code  Automatische tests mogelijk  Statistieken aantal sites die module gebruiken  Enkel sites die “Update” module hebben geactiveerd  Enkel totalen, geen gedetailleerde lijst van sites p. 24
  • 26. Projectpagina: functies p. 26  Algemene informatie  Beschrijving, lijst ontwikkelaars, downloads  Statistieken, laatste activiteit  Eventueel link naar gelijkaardige projecten, documentatie  Issue tracker  Bugs, vragen, aanvraag nieuwe functies  Iedereen mag commentaar geven / patches sturen
  • 27.  Ontwikkeld door Linus Torvalds  Oorspronkelijk om versies Linux kernel te beheren  Beschikbaar voor Linux, Windows, MacOS X...  “Wie” heeft “wat” “wanneer” gewijzigd  Terugkeren naar vorige versie is mogelijk  Commentaar toevoegen “waarom”  Link met projectpagina op Drupal.org  Git “Issue #12345 ...” wordt gelinkt aan ticket 12345 p. 27 Git versiebeheer
  • 29. Zelf project maken drupal.org  Iedereen kan sandbox project aanmaken  Projectpagina, git, …  (Nog) geen unieke projectnaam (enkel nummer)  Full projects door “goedgekeurde” developers  Unieke naam op drupal.org  “Promotie” sandbox => full is mogelijk  Mogelijkheid om anderen toegang te geven  Beheren tickets, beheren projectpagina, ... p. 29
  • 30. Eenmalige developer / code review  Niet vereist om patches op te sturen  Voor wie zelf modules... op d.o. wil beheren  Doel: verhogen kwaliteit modules  Eenmalige review door andere drupal.org developers  Nakijken correct gebruik Drupal API, documentatie...  Kan helaas weken / maanden duren (vrijwilligers)  Nadien onbeperkt aanmaken projecten p. 30
  • 31. Marketplace  Lijst van Drupal-bedrijven  Training, hosting, ontwikkeling, …  Gekoppeld aan activiteiten / projecten op d.o. p. 31  Lijst van Drupal-boeken
  • 32. © Fedict 2014. All rights reserved Drupal 6 / 7: opbouw
  • 33. Module Module Profile Theme Library Module Module Theme p. 33 Distributie Van module tot distributie Module Module Theme Core Module Module Library
  • 34. p. 34 Themes  Layout  2 000+ gratis themes  Mix van HTML / CSS / Javascript en/of PHP  Subthemes mogelijk  Gebaseerd op / variant van bestaand theme  Sneller te ontwikkelen, vaak al “mobile”, “responsive”  Populaire “base themes”: Zen, Omega
  • 35. Modules  Core modules (standaard in Drupal) p. 35  Blog, Page, ...  Contrib modules  25 000+ gratis modules  Wisselende kwaliteit en ondersteuning  Verbetering functies / extra mogelijkheden  Integratie Google / Facebook / Twitter … diensten  Workflow, eCommerce, beheer content / gebruikers, ...
  • 36. Libraries  Geschreven in PHP en/of Javascript  Visuele effecten / opmaak p. 36  Jquery Cycle, SuperFish, ...  Integratie met andere diensten  OpenLayers, MailChimp, ...  Online HTML editor  Zit niet standaard in D6 / D7 (wel in D8)  CKEditor, TinyMCE
  • 37. (Installation) profiles en distributies p. 37  Installation profiles  Keuze (enkel) bij installatie  Verzameling modules, themes, libraries  Gescripte configuratie van deze modules  800 distributies  Core + installation profile(s), modules, themes …  Commerce Kickstart, OpenFed, Acquia Commons, ...
  • 38. © Fedict 2014. All rights reserved Drupal 6 / 7: modules
  • 39. Goeie informatici zijn lui http://commons.wikimedia.org/wiki/File:Lazzaro1.jpg p. 39
  • 40. Zelf een module bouwen ? p. 40 Bestaat er al een module ? Actieve ontwikkeling (Co-) maintainer worden ? Patch mogelijk ? Eigen module J N J N N N J Patch J
  • 41. Bestanden van een module p. 41  <module>.info  Naam, versie van module, afhankelijkheden  <module>.install  Code installatie / upgrade / verwijderen module  <module>.module / <module>.inc  Eigenlijke module en include files  <module>.test  SimpleTest bestanden
  • 42. p. 42 .info voorbeeld name = Date description = Makes date/time fields available. project = "date" version = "7.x-2.8" package = Date/Time core = 7.x Php = 5.2 dependencies[] = date_api files[] = date.migrate.inc files[] = tests/date_api.test files[] = tests/date.test
  • 43. Drupal API  Lijst van Drupal functies, constanten  Form API / builder p. 43  Formulieren  Hooks  Installatie / verwijderen module  Toevoegen / verwijderen content / gebruikers / menu's  Menu's, fields, ...
  • 44. Menu hook voorbeeld p. 44 /** * Implements hook_menu(). */ function devel_menu() { ... $items['devel/settings'] = array( 'title' => 'Devel settings', 'description' => 'Helper functions, pages', 'page callback' => 'drupal_get_form', 'page arguments' => array('devel_admin_settings'), 'access arguments' => array('administer site configuration'), 'file' => 'devel.admin.inc', 'menu_name' => 'devel', ); ... return system_settings_form($form); }
  • 45. © Fedict 2014. All rights reserved Drupal 6 / 7: distributies
  • 46. Wanneer een distributie bouwen ?  Veel sites op zelfde platform  Voordelen:  Sneller beginnen met sites te ontwikkelen  Makkelijker te onderhouden (bij strikt beheer) p. 46  Nadelen:  Beetje configuratiewerk  Minder flexibel
  • 47. Drush tool  Command line (php) tools  Modules (des)activeren, backups, …  Uitbreidbaar met eigen commando's p. 47  Drush make  Bundelen core, modules, patches, themes...  Bij voorkeur exacte versienummers gebruiken
  • 48. p. 48 Makefile voorbeeld libraries[colorbox][download][type] = "get" libraries[colorbox][download][url] = "https://github.com/jackmoore/colorbox/archive/1.5.13.zip" libraries[colorbox][directory_name] = "colorbox" libraries[colorbox][type] = "library" projects[admin_language][download][type] = git projects[admin_language][download][branch] = "7.x-1.x" projects[admin_language][download][revision] = 6f0a6e5 projects[admin_language][subdir] = contrib projects[i18n][version] = "1.11" projects[i18n][subdir] = contrib projects[i18n][patch][2250501] = "http://drupal.org/files/issues/i18n-node_ edit-2250501-8.patch"
  • 49. Licenties  Open source =/= zonder licentiebepalingen  Beperkingen / verplichtingen  Verschillende licenties niet altijd compatibel p. 49  Drupal: GPL v2 of later  Code beschikbaar stellen aan gebruiker  Gebruikers mogen code doorgeven  Drupal: whitelist compatibele componenten  Alle drupal.org modules / themes …  Enkele externe modules / libraries ...
  • 50. Distributie op drupal.org  Projectpagina etc zoals bij module  Gecontroleerde drush make file  Enkel “full” modules / themes van drupal.org  Beperkte lijst toegestane libraries  https://drupal.org/project/drupalorg_whitelist p. 50
  • 51. © Fedict 2014. All rights reserved Drupal 6 / 7: meertaligheid
  • 52. p. 52 Meertaligheid http://commons.wikimedia.org/wiki/File:Br%C3%BCssel_%28Ortstafel%29.jpg
  • 53.  Labels, foutboodschappen ...  Standaard mails, site slogan, ...  Navigatie / menu's  Drop-down lijsten / taxonomies  Inhoud pagina's p. 53 Vertalingen
  • 54.  (Veel) extra modules nodig  i18n, i18nviews, entity translation  Vertaling niet altijd 1-op-1  Vb: NL + FR site met beperkte vertaling naar EN + DE  Wat met menu's ? Pagina's die enkel in 1 taal bestaan ?  Vertaling gebeurt op verschillende plaatsen  Ook verschillende rechten nodig p. 54 Aandachtspunten
  • 55. Vertaling van inhoud p. 55  Drupal 6  Vertaling per “node”, elke vertaalde node een andere ID  => wat met bijvoorbeeld “likes” (vertaalde of alle nodes ?)  “Synchroon” houden auteur, datum … ? (i18nsync)  Drupal 7  Vertaling per node, zoals in D6  Of per veld (entity translation)  => zelfde ID, maar werkt niet altijd met alle modules
  • 56. © Fedict 2014. All rights reserved Sites en modules testen
  • 57. Simpletest module  Standaard in D7 (“Testing”) module p. 57  Aparte module in D6  Testen van functies tijdens ontwikkeling  Niet verplicht, wel sterk aan te raden  Testen kunnen ook automatisch draaien op d.o.
  • 58. Simpletest voorbeeld p. 58 <?php public function setUp() { parent::setUp('simpletest_demo'); $this->privileged_user = $this->drupalCreateUser( array('create simpletest_demo', 'edit own simpletest_demo')); $this->drupalLogin($this->privileged_user); } public function testSimpleTestDemoCreate() { $edit = array(); $edit['title'] = 'SimpleDemo'; $edit['body'] = $this->randomName(80); $this->drupalPost('node/add/simpletest-demo', $edit, t('Save')); $this->assertText(t('SimpleDemo has been created.')); } ?>
  • 59. p. 59 Simpletest rapport
  • 60. Hulpmiddelen  Automatische code review  http://pareview.sh  Documentatie, correct gebruik API, naamgeving...  Tips ivm veiligheid en performantie  Eigen te schrijven unit tests (SimpleTest)  https://drupal.org/simpletest p. 60  Development module  https://drupal.org/project/devel
  • 61.  Automatiseren testen via browser  Aansturen IE, Firefox, Chrome, … via script / code  Java, Python, C#, Ruby, (PHP)  http://www.seleniumhq.org  Nabootsen wat gebruiker doet / ziet  Klikken, uploaden files, invullen formulieren  Aanvulling (geen vervanging) unit testen  Staat los van Drupal (wel module beschikbaar)  Opstellen kan wat moeite kosten p. 61 Selenium
  • 62. Selenium voorbeeld (python) from selenium import webdriver p. 62 … driver = webdriver.Firefox() driver.get("http://www.google.com") inputElement = driver.find_element_by_name("q") inputElement.send_keys("cheese!") inputElement.submit() try: WebDriverWait(driver, 10).until(EC.title_contains("cheese!")) print driver.title finally: driver.quit()
  • 63. Vagrant  Scripten installatie devlopment-omgeving  Virtuele Machine p. 63  VMWare, VirtualBox, …  Provision tools  Shell scripts, Chef, Puppet, ...  https://www.vagrantup.com
  • 64. © Fedict 2014. All rights reserved Drupal 6 / 7: Varia
  • 65. Drupal 7: Entities  D6: Content Construction Kit  Enkel op Nodes (Content Types) p. 65  D7: Entity Types  Nodes, Comments, Taxonomy, Users  => extra velden, vertalingen (Entity Translation)  => Views, Rules  Entity API
  • 66.  Uitschakelen niet-gebruikte modules  Drupal caching  Page cache / Block cache  Views query results cache  Eigen code: &drupal_static(__FUNCTION__)  CSS / Javascript aggregation (1 bestand)  PHP versie  Memcache p. 66 Performantie
  • 68. Gebaseerd op Symfony 2  Release: eind 2014 ??  Hergebruik PHP framework  http://symfony.com/blog/symfony2-meets-drupal-8  http://cipix.nl/understanding-drupal-8-part-1-general-structure-framework p. 68  Voordelen  Interessanter voor niet-Drupal (PHP) developers  Laat toe om nieuwe functies sneller te ontwikkelen  Nadelen  Leercurve voor ervaren Drupal developers  Herschrijven modules en themes
  • 69. Grote verbeteringen  Configuration Management  Gescheiden houden content en inhoud p. 69  (REST) Web Services  Makkelijker om feeds te maken / data binnen te halen  Meer functionaliteit standaard aanwezig  Meertaligheid, HTML Editor, Views  HTML5 / Mobile / Accessibility  Geen ondersteuning meer voor IE8
  • 71. Configuration Management  Configuration API  Uitwisselen via YAML files  Vb: van development naar productie-omgeving  (Oorspronkelijk niet in database, sinds kort wel) p. 71
  • 72. p. 72 Andere APIs  Validation API  Niet enkel meer voor formulieren (vb ook voor REST)  Voorbeeld: controle maximum waarde  State API  Niet verwarren met Configuration API  Voorbeeld: laatste keer dat cron uitgevoerd werd  In D6 / D7 meestal bijgehouden in Variable  Tour API  Gebaseerd op Joyride.js
  • 73. p. 73 Twig themes  Voordelen  Niet Drupal-specifiek  Ontwikkeld door de makers van Symfony 2  Leesbaarder  Geen PHP code meer in templates (= veiliger)  Nadeel  Leercurve voor ervaren Drupal themers
  • 74. p. 74 Twig voorbeeld {# This is a comment #} <div>{{ 'List'|t }}</div> <ul> {% for choice in menu %} <li>{{ choice.name }}</li> {% endfor %} </ul>
  • 75. Wat met bestaande Drupal sites ?  Drupal 7 blijft ondersteund  Drupal 6 ?  Ondersteuning eindigt 3 maanden na release D8  https://www.drupal.org/node/2288521  Heel wat sites draaien nog op Drupal 6 !  Upgrade naar D7 / D8 kan lastig zijn  Niet alle modules al beschikbaar / stabiel  => (betalende) ondersteuning door Drupal-bedrijven p. 75  “Backdrop” fork ?
  • 76.  https://drupal.org/drupal-8.0  https://www.drupal.org/update/modules/7/8  https://www.acquia.com/blog/d8migrate  https://groups.drupal.org/core/twidc  https://www.drupal.org/node/2127611 p. 76 Meer informatie
  • 78. Bedankt ! Bart Hanssens / Fedict WTC III, Simon Bolivarlaan 30 1000 Brussel, België @BartHanssens bart.hanssens [at] fedict.be | www.fedict.belgium.be