Intro to drupal

Post on 14-Apr-2017

150 views 0 download

Transcript of Intro to drupal

Welcome to Drupal !Hernâni Borges de Freitas

drupal.org/8

About Drupal• Founded in 2001 by Dries Buytaert. Drupal 8

released in Nov 2015.

• One of the most popular ways of building for the web. And of the most popular PHP projects !

• Distributed under GPL License. One of the biggest open source communities in the World.

• Powers at least 2% of the web. Significant presence in high profile web sites.

drupal.org/8

Examples of Drupalhttp://topdrops.org/

drupal.org/8

About me

• .PT

• 15y of PHP / 8y of Drupal

• Senior Tech Manager – Acquia EMEA• Founded in 2007 by Drupal founder to support Drupal

adoption in enterprise clients (Hosting, Enterprise Support, Consulting). ~ 800 employees in many regions of the globe.

• Hernani.pt

• Twitter.com/hernanibf

drupal.org/8

Today

• Intro to Drupal• Major features as a CMS (Content, Page

building, Configuration, Users & Permissions, Multilingual, Webservices, contributed modules).

• Major features as a framework (Drupal APIs, Integrations)

• Community (Worldwide & PT)

drupal.org/8

Why do people choose Drupal?

Come for the Code, Stay for the Community

•Powerful core that handles most important challenges in site building. •Extensible via modules that can extend application behavior and look and feel.•Contributed modules available for many features (80% done – 20% to be done rule).•Large and passionate community.

drupal.org/8

Webserver + PHP

Drupal docroot:Drupal core (/core)

Other libraries (/vendor)Contributed and custom modules (/modules)

Themes (/themes)

Drupal Stack

Files ystem for static files (uploaded files, compressed css, js, etc..)

Database (Mysql flavours)Or Others*

drupal.org/8

In Drupal core• Content structure and content edition• Layout and display management (blocks +

menu + views).• Roles + Permissions + Users• Configuration and state management• URLs and routing• Application logging• APIs for many things (Routing, DB, Forms,

Session, Sanitization, Caching, Files).• Default themes (html markup + css + js).

drupal.org/8

Extending Drupal• 35k Contributed modules to add to your site

(Workflow, Media, SEO, Calendars + Galleries, Integrations, you name it – there’s a module for that).

• 2k Contributed themes that you can add and extend

• You can create your custom modules to change/add functionality

• You can create or extend your custom theme to change how sites

• Drupal distributions - Sometimes you don’t need to play lego: Lightning, DrupalCommerce, OpenAtrium.

drupal.org/8

Content managementContent structure via UI•Entities: Easy to manage your content/data model entities directly in the interface.•Fields: Easy to create fields for your entities with different available widgets: text, wysiwyg, files, dates, links, relationships.

Content edition:•Easy to input content for users without much technical knowledge.•Full abstraction of how data is being stored in the database.

drupal.org/8

drupal.org/8

drupal.org/8

Content management - extras

• Revisioning support for different entities

• In place editing• Menus• Blocks• Taxonomy / Tagging• Easy to add content workflow• Easy to integrate content coming from

3rd party sources.

drupal.org/8

Display management

• Easy to create displays for information created.

• Displays available out of the boxes: tables, grids, lists, json.• Easy to extend to slideshows,

calendars, galleries, any other format.• Different options to manage layouts and

page components.• Pages, blocks, REST endpoints.

drupal.org/8

drupal.org/8

Configuration management• Configuration defined via the interface

can be exported to configuration files in the code base and therefore put under version control.

drupal.org/8

User management

Part of core:• User registration/management• Roles• Permissions

Contributed:• Easy to integrate with external login

systems (SSO, LDAP, Social logins).

drupal.org/8

More with Drupal • Multilingual OOB• Webservices support OOB

• Data export• Migration plugins available

• Data import • Powerful performance and caching options• Media management• Workflow management• Layout management - rich page creation• Search integration

drupal.org/8

Drupal as a framework

UI•Routing, Menus•Forms, Form state, Ajax•Blocks

Data•Entities, Fields•Configuration, State•DB queries, views

Other•Plugins, Services, Events•Multilingual•Render API•Theming layer•Caching

drupal.org/8

A Drupal module structure• Info file – mymodule.info.yml• Module file - mymodule.module

• Hooks• Routing - mymodule.routing.yml

• Match Urls and Callbacks• Plugins dir - Classes that add new components

(blocks, displays, etc..) • Src dir – PHP Classes that will be used by the module• Config dir – yml files with configuration that should be

installed• Templates dir – twig files• …

drupal.org/8

A Drupal example module

Examples module(Http://drupal.org/project/examples)

Pants module (Http://drupal.org/project/pants)

drupal.org/8

A Drupal theme

• Info file – mytheme.info.yml• Regions, Libraries (CSS and JS to be

attached), Base theme

• Twig Template files – automatically discoverable from name and location.

• Theme file – mytheme.theme - php functions to override rendering behavior

• Css and JS and images and more..

drupal.org/8

A Drupal theme example

• Bootstrap

drupal.org/8

Proudly found elsewhere

https://packagist.org/packages/drupal/core

drupal.org/8

Community

• Drupalcons (Every 6 months)• North America• Europe (Next September Dublin!)• Other (Mumbai, Bogota, Sydney)

• Drupalcamps (Every year per country/region)• Other specific Drupal events

• Drupal dev days (Milan), Frontend United, Drupalaton

• Online - Drupal.org, irc, stackoverflow, github..

drupal.org/8

Drupal Portugal – drupal.pt

• Events and activities since 2010• Drupalcamp Lisbon 2011, Porto 2012• Regular monthly meetups – Liberdade 229• Drupal day Aveiro 2016

• http://drupalday2016.drupal-pt.org/

• Drupal.pt• Groups.drupal.org/portugal

Questions?hernani.pt