SlideShare a Scribd company logo
1 of 78
Download to read offline
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Intensive Overview
from Drupal 7 to Drupal 8
January 2017
Author: Italo Mairo - @ All right reserved
italomairo.com
Engineer, Senior Php Js Drupal (7/8) Developer
More than 20 years of working experience 

in Digital Communication, Multimedia, Digital Cartography,
Web & Web GIS 2.0 Opensource Applications.
Experienced Drupal Developer

more than 5 years of full-time work experience
on several advanced Drupal Web projects 

(from mid to enterprise level).
Individual Member of Drupal Association
Personal website: www.italomairo.com
Drupal.org username: itamair
Linkedin Profile: italomairo
Italo Mairo
Who I am …
Author: Italo Mairo - @ All right reserved
Drupal Projects
Author: Italo Mairo - @ All right reserved
Drupal Projects
Author: Italo Mairo - @ All right reserved
Drupal Projects
Author: Italo Mairo - @ All right reserved
italomairo.com
•It is powerful and flexible enough to meet the needs of a wide
range of projects, worldwide used as an highly scalable platform
for web content management
•The Drupal project is open source software. Anyone can
download, use, work on, and share it with others. It's built on
principles like collaboration, globalism, and innovation. It's
distributed under the terms of the GNU General Public License
(GPL). There are no licensing fees, ever. Drupal will always be free.
•Drupal is maintained by one of the most innovative and numerous
open source communities in the world (as of March 2015, over
1,167,000 user accounts and over 37,000 developer accounts)
https://www.drupal.orgDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
•Drupal is used to build web sites.
•It’s a highly modular, open source web content management
framework with an emphasis on collaboration.
•It is extensible, standards-compliant, and strives for clean code and a
small footprint.
•Drupal ships with basic core functionality, and additional functionality is
gained by enabling built-in or third-party modules.
•Drupal is designed to be customized, but customization is done by
overriding the core or by adding modules, not by modifying the code
in the core.
•Drupal’s design also successfully separates content management from
content presentation.
(source: Apress - Pro Drupal 7 Development)
https://en.wikipedia.org/wiki/Drupal
https://www.drupal.orgDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
•Drupal is successfully used, as a best choice, for the most
complexed web solutions and products, from medium to the
enterprise level ones, such as:
- Corporate sites
- Entertainment sites
- E-commerce sites
- Media sites and blogs
- Forums
- Intranets
- Document management and workflow oriented sites
- Marketing automation sites
- Social networking sites
- etc.
https://www.drupal.orgDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
• enterprises, governments, higher education institutions, and NGOs.
• Drupal is the platform the United States, London, France, and more
use to communicate with citizens.
• It’s the framework of media companies like BBC, NBC, and MTV UK
rely on to inform and entertain the world.
• It’s part of how organizations and universities like Amnesty
International and the University of Oxford work to make the world a
better place.
• Read Drupal case studies or check out a list of organizations with
profiles on Drupal.org.

• News: Nasdaq Chooses Drupal 8 (October 21, 2016)
Who uses Drupal
https://www.drupal.orgDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
• almost endless contents modeling and characterization
native capabilities, through Nodes and Entities Apis,
comments, taxonomies, etc.;
• multilingual capabilities and translation services;
• advanced & scalable users, roles and permissions
definitions and management;
• advanced media management;
• advanced and flexible front-end theming and back-
end content management & personalization with
regions, views, blocks, menu systems, forms Apis;
Drupal Strength points
Author: Italo Mairo - @ All right reserved
italomairo.com
• interoperability with third-party applications and mobile/tablet
external applications, with web services and rest full Apis;
• sophisticate events and triggering systems;
• very efficient SEO system and modular solutions;
• high level of security, based on strict coding quality/standards
and best practices;
• very extensive and wide community;
• efficient collaboration and extending logics (no duplications of
similar modules);
• and many others …
Strength pointsDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Community Documentation
https://www.drupal.org/documentation
Site Building Guide
Add functionality and features such as e-commerce, forums, media, search,
geographic data, dates, workflow, messaging, forms, social networking, etc.
Audience: site builders, developers and business architects
Developer Guides
API Reference
Git documentation
Examples for Developers
Other Information
Code snippets
Troubleshooting
Tutorials and recipes
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Site Building Guide
drupa.org 'how to' guide for implementing business functionality and features
into your Drupal site.
https://www.drupal.org/documentation/build
• Modules in Drupal core - Built-in default modular functionality
• Contributed modules
• Themes in 'Drupal Core' - Built-in themes for site appearance
• Themes: Addon 'Contrib' Drupal themes to change site
appearance (contributed by our community members)
• Building the site functionality
• Distributions
• Drush - Easily Manage Drupal 'Local' or 'Online' with Unix
Command-Line
• HowTos
Author: Italo Mairo - @ All right reserved
italomairo.com
•back-end functionalities definition and front-end theming requisites
analysis;
•contents model definition (content types, entities and taxonomies
definitions);
•definitions of specific roles, identification and set-up of general and
extended privileges and permissions;
•assessment of specific required functionalities and identification of
specific contribution / custom modules and “ad-hoc” functionalities
(i.e: commerce functionalities, translation functionalities, geocoding
and mapping functionalities);
Implementation WorkflowDrupal 7
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7
(source: Apress - Pro Drupal 7 Development)
Technology Stack
Drupal is written in PHP. All core Drupal code adheres to strict coding standards
Drupal ships with .htaccess files that secure the Drupal installation.
Clean URLs—that is, those devoid of question marks, ampersands, or other strange
characters—are achieved using Apache’s mod_rewrite component.
The database interface provides an API based on PHP data object (or PDO) and
allows Drupal to support any database that supports PHP.
For Drupal 7, the required version of PHP is 5.2.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7
(source: Apress - Pro Drupal 7 Development)
An overview of the Drupal core (partial …)
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7
(source: Apress - Pro Drupal 7 Development)
Enabling additional modules
gives more functionality.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7
(source: Apress - Pro Drupal 7 Development)
Files Layout and Structures
• The includes folder contains libraries of common functions that
Drupal uses.
• The misc folder stores JavaScript and miscellaneous icons and
images available to a stock Drupal installation.
• The modules folder contains the core modules
• The profiles folder contains different installation profiles for a site.
• The sites directory contains your modifications to Drupal in the
form of settings, modules, and themes.
• The sites/default/files folder is needed to store any files that are
uploaded to your site and subsequently served out.
• The themes folder contains the template engines and default
themes for Drupal.
• index.php is the main entry point for serving requests.
• update.php updates the database schema after a Drupal version
upgrade.
• robots.txt is a default implementation of the robot exclusion
standard.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Clean URLs & Aliases
https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls
By default, 

Drupal uses and generates URLs that look like "http://www.example.com/?q=node/83".
With so-called clean URLs this would be displayed without the “?q="
as "http://www.example.com/node/83".
Enabling Clean URLs in Drupal 7
In Drupal 7, the installer tests .htaccess file for compatibility with Clean URLs: if the environment
is tested as compatible with Clean URLs, it will be enabled as part of the installation process
and no further action is required.
If you need to enable Clean URLs post installation, Drupal will run the clean URL test
automatically when you navigate to the Clean URLs configuration page (Administer >
Configuration > Search and metadata > Clean URLs), show the results, and allow you to save
configuration.
Clean URLs are enabled by Default in Drupal 8
The Pathauto module automatically generates URL/path aliases.
Pathauto
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7
Hooks can be thought of as internal Drupal events.
Hooks allow modules to “hook into” what is happening in the rest of Drupal.
That means that any function named according to the convention
module_name + hook name
will be called.
For example, At the time the user logs in, Drupal fires hook_user_login.
We might write a custom module called my_module and include a function
called
my_module_user_login() {
// … does some stuff …
}
such as comment_user_login() in the comment module, locale_user_login() in
the locale module, node_user_login() in the node module,
The most common way to tap into Drupal’s core functionality is through the
implementation of hooks in modules.
Hooks
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Hooks
/**

* Invokes a hook in a particular module.

*

* All arguments are passed by value. Use drupal_alter() if you need to pass

* arguments by reference.

*

* @param $module

* The name of the module (without the .module extension).

* @param $hook

* The name of the hook to invoke.

* @param ...

* Arguments to pass to the hook implementation.

*

* @return

* The return value of the hook implementation.

*

* @see drupal_alter()

*/

function module_invoke($module, $hook)
includes/module.inc
https://api.drupal.org/api/drupal/includes%21module.inc/group/hooks/7.x
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Themes
In Drupal, the theme layer is responsible for creating the HTML (or
JSON, XML, etc.) that the browser will receive.
Drupal uses PHP Template as the primary templating engine, or
alternatively you can use the Easy Template System (ETS).
Drupal encourages separation of content and markup.
Drupal allows several ways to customize and override the look and
feel of your web site. The simplest way is by using a cascading style
sheet (CSS) to override Drupal’s built-in classes and IDs.
Drupal’s template files consist of standard HTML and PHP.
Template (theme hook) suggestions
Working with template suggestions
Theme developer Module
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Blocks & Regions
A Block is information that can be enabled or disabled in a
specific location on your web site’s template.
Blocks are typically placed in a template’s sidebar, header, or
footer.
Blocks can be set to display on nodes of a certain type, only on
the front page, or according to other criteria.
Often blocks are used to present information that is customized
to the current user.
Regions where blocks may appear (such as the header, footer, or
right or left sidebar) are defined in a site’s theme; placement
and visibility of blocks within those regions is managed through
the web-based administrative interface.
(source: Apress - Pro Drupal 7 Development)
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Nodes
“What is a node?”
(source: Apress - Pro Drupal 7 Development)
A node is a piece of content. Drupal assigns each piece of content an ID number
called a node ID (abbreviated in the code as $nid).
There are many different kinds of nodes, or node types.
Some common node types are “blog entry,” “poll,” and “forum.” Often the term
content type is used as a synonym for node type, although a node type is really a
more abstract concept and can be thought of as a derivation of a base node.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Nodes
All nodes have the following attributes stored within the node and node_revisions database
table:
• nid: A unique ID for the node.
• vid: A unique revision ID for the node, needed because Drupal can store content revisions
for each node.
• type: Every node has a node type—for example, blog, story, article, image, and so on.
• language: The language for the node. Out of the box, this column is empty, indicating
language-neutral nodes.
• title: A short 255-character string used as the node’s title, unless the node type declares
that it does not have a title, indicated by a 0 in the has_title field of the node_type
table.
• uid: The user ID of the author. By default, nodes have a single author.
• status: unpublished or published
• created: A Unix timestamp of when the node was created.
• changed: A Unix timestamp of when the node was last modified.
• comment: An integer field describing the status of the node’s comments.
• promote: An integer field to determine whether to show the node on the front page, with
two values: 1 & 0
• sticky: If the node should be stick to the top of node listings
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Nodes
Basic Uses
• Creating custom content types
• Creating content
• Administering content
• Creating revisions
• User permissions
https://www.drupal.org/docs/7/nodes-content-types-and-fields/about-nodes
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Taxonomy
is the practice and science of classify content.
Taxonomy, a powerful core module, gives your sites use of the
organizational keywords known in other systems as categories,
tags, or metadata.
It allows you to connect, relate and classify your website’s
content. In Drupal, these terms are gathered within
"vocabularies". The Taxonomy module allows you to create,
manage and apply those vocabularies.
Drupal 7 and 8 has the ability to add taxonomy fields to
vocabularies and terms.
It will come in handy for everything from menu and navigation
schemes to view and display options.
Organizing content with taxonomies
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Fields
Content in Drupal is composed of individual fields.
A node title is a field, as is the node body.
You can use fields in Drupal to construct any content type
For example, an Event, typically contains a title, a description (or
body), a start date, a start time, a duration, a location, and
possibly a link to register for the event.
In Drupal we have the ability to create content types using fields,
either programmatically by creating a module, or through the
Drupal administrative interface by creating a new content type
and assigning fields through the user interface.
Field API makes it extremely easy to create simple to complex
content types with very little programming.
(source: Apress - Pro Drupal 7 Development)
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Download & Extend
https://www.drupal.org/download
Distributions
Modules
Extend and customize Drupal
functionality, and integrate with 3rd-
party services.
Drupal bundled with additional
projects such as themes, modules,
libraries, and installation profiles.
Themes
Most installed
Commerce Kickstart
Panopoly
Open Atrium
Opigno LMS
More most installed
Most installed
Chaos tool suite (ctools)
Views
Token
Pathauto
More most installed
Change the look and feel of your
Drupal site.
Most installed
Bootstrap
Zen
Omega
Adminimal- Responsive Administration Theme (Drupal 8
ready!)
More most installed
View the index of all modules.
View the index of all themes.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Download & Extend
https://www.drupal.org/project/module_filter
https://www.drupal.org/project/filter_perms
https://www.drupal.org/project/admin_menu
https://www.drupal.org/project/examples
First Useful Modules
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Views Module
https://www.drupal.org/project/views
The views module allows administrators and site designers to create, manage, and display
lists of content.
Views can be understood as a user interface to compose SQL-queries, pulling information
(Content, Users, etc.) from the database and showing it on screen in the desired format.
Fields, or the individual pieces of data being displayed.
Relationships, or information about how data elements relate to one another.
Arguments(D6)/Contextual filters(D7), or additional parameters that dynamically
refine the view results, passed as part of the path.
Sort criteria Sort criteria, which determine the order of items displayed in the view
results.
Filters, which limit items displayed in the results.
Displays, which control where the output will be seen.
Header, which allow you to add by default one or more text area above the views
output.
Footer, which allow you to add by default one or more text area beneath the views
output.
Empty Text, content will be displayed, when you choose in the Arguments Section
"Action to take if argument is not present" the option "Display empty text”.
Permissions, define the access role to the View.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Menu System
Define the navigation menus, and route page requests to code based on URLs.
The Drupal menu system drives both the navigation system from a user perspective and the
callback system that Drupal uses to respond to URLs passed from the browser.
https://api.drupal.org/api/drupal/includes!menu.inc/group/menu/7.x
function hook_menu
hook_menu() implementations return an
associative array whose keys define paths
and whose values are an associative array of
properties for each path.
This hook enables modules to register paths in
order to define how URL requests are handled.
MENU_NORMAL_ITEM: Normal menu items show up in
the menu tree
MENU_CALLBACK: Callbacks simply register a path so
that the correct function is fired
MENU_LOCAL_TASK: Local tasks are rendered as tabs by
default.
/**
* Implementation of hook_menu().
*/
function menufun_menu() {
$items['menufun'] = array(
‘title’ => ‘Greeting’,
'page callback' => 'menufun_hello',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
/**
* Page callback.
*/
function menufun_hello() {
return t('Hello!');
}
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 QA & Coding Standards
The Drupal Coding Standards apply to code within Drupal and its contributed modules.
Coding standards
API documentation and comment standards
API Documentation Samples
CSS
JavaScript
CSS coding standards and best practices.
How to write documentation
collection of the complete API documentation examples
apply to code within Drupal and its contributed modules.
coding standards and best practices for Drupal.
https://www.drupal.org/docs/develop/standards
Namespaces PHP 5.3 introduces namespaces to the language.
and more …
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Multisite
Drupal has a feature which allows separate, independent sites to
be served from a single codebase. Each site has its own
database, configuration, files and base domain or URL.
https://www.drupal.org/docs/7/multisite-drupal
Multi-site - Sharing the same code base
When to multisite
As a general rule on whether to use multisite installs or not you can say:
• If the sites are similar in functionality (use same modules or use the
same drupal distribution) do it.
• If the functionality is different don't use multisite.
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Multisite, single shared database
The Domain Access project is a suite of modules that provide tools for running a
group of affiliated sites from one Drupal installation and a single shared database.
The module allows you to share users, content, and configurations across a group of
sites such as:
• example.com
• one.example.com
• two.example.com
• my.example.com
• thisexample.com <-- can use any domain string
• example.com:3000 <-- treats non-standard ports as unique
By default, these sites share all tables in your Drupal installation. The Domain Prefix
module (for Drupal 6) allows for selective, dynamic table prefixing for advanced
users
Domain Access Module
Multisite: Share users and user roles for existing set up
Share a single database across multiple sites
Author: Italo Mairo - @ All right reserved
italomairo.com
Advanced Development Tools
• Coder/Codesniffer: development tool for php coding
standards and Drupal best practices;
• Devel: Drupal module containing development tools/
submodules;
• Drush: command line shell and Unix scripting interface for
Drupal;
• Composer: Dependency Manager for PHP and for Drupal
projects/modules
• … plus specific modules depending on Drupal version
(Features, Drupal Console, ecc.)
Drupal
Author: Italo Mairo - @ All right reserved
italomairo.com
Git operational workflowDrupal
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 7 Continuous Integration, with Features
Must have Features:
https://www.drupal.org/project/features
Features
https://www.drupal.org/project/diff
Diff
Strongarm
https://www.drupal.org/project/strongarm
Features Extra
https://www.drupal.org/project/features_extra
https://www.drupal.org/project/context
Context
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 8
Drupal 8 is the latest, greatest release of the world's most
widely used enterprise web CMS.
It's fast. Flexible.  
Drupal 8 taps into the concentrated innovation from its open
source community.
You can drive value and streamline your work with new
capabilities for successful digital experiences.
(source: https://www.drupal.com)
announced in 2012, and released in 2015
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 8
"Drupal 8 breaks the mold for dated content
management models and liberates content
from the page for the post-browser era.
Now we have the power to deliver the right
content, to the right audience, at the right
time, on the right device."
Dries Buytaert, Drupal founder
Author: Italo Mairo - @ All right reserved
italomairo.com
Files Layout and StructuresDrupal 8
• The core folder (just it ! ) contains the Drupal core
(modules & themes included).
• The modules folder contains the custom/contrib
modules
• The profiles folder contains the custom/contrib profiles.
• The themes folder contains the custom/contrib themes.
• index.php is the main entry point for serving requests.
• update.php updates the database schema after a
Drupal version upgrade.
• robots.txt is a default implementation of the robot
exclusion standard.
• autoload.php is the entry point file to perform classes
autoload (PSR-4).
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
“Proudly Invented Elsewhere”
As a counterpoint to our earlier sense of self-sufficiency and rejection of third- party
code, “Proudly Invented Elsewhere” represents a mind-shift among Drupal 8 core
developers. One of the great strengths of open source software is in not having to
reinvent the wheel and being able to build better solutions “on the shoulders of
giants.”
Drupal 8 preferred to funding on the best tool for the job (if available), 

versus creating something custom and specific to Drupal.
Some (major) external libraries that have been pulled and integrated are:
• PHPUnit for unit testing,
• Guzzle for performing HTTP (web service) requests,
• a variety of Symfony components
• Composer for pulling in external dependencies and class autoloading,
• and more many more (see the Vendor folder).
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
This philosophy change also extends to the code base itself.
Drupal 8 embrace the way the rest of the world is writing code: decoupled,
object-oriented (OO), and embracing modern language features of PHP,
such as namespaces and traits.
Info files in Drupal 8 are now simple YAML files - the same as those used by
other languages and frameworks. The syntax is very similar (mostly : instead
of = everywhere, and arrays are formatted slightly differently), and it remains
very easy to read and write these files.
The awkward files[] key is gone, in favor of the PSR-4 standard for automatic
class autoloading via Composer.
“Proudly Invented Elsewhere”
Author: Italo Mairo - @ All right reserved
italomairo.com
(source: https://it-consultis.com)
Drupal has over 200 new features and enhancements,
especially as it aligns itself with responsive mobile design
Symfony2 Framework
The Symfony2 framework overhauls the architecture with a completely new routing and
context system. The result is a Drupal 8 that improves on object-oriented programming, as
well as allowing it to adapt to modern PHP concepts.
Multilingual
Drupal 8 lets developers create multilingual sites with better support in core. Improvements
include a better translation interface, language maintenance options, site translations and
customizations.
Twig
Drupal 8 relies on the PHP template engine called Twig, which lends to a faster, more flexible,
and more secure performance. Twig ties in nicely with Symfony's class-based approach.
Mobile-ready
Mobile isn't going away, it's here to stay, which is why Drupal 8 makes sure it's as mobile-
ready as can be. Optimizing core themes and modules, Drupal 8 makes it a breeze to
create a mobile experience that's responsive and intuitive regardless of the device being
used.
Drupal 8
Author: Italo Mairo - @ All right reserved
italomairo.com
WYSIWYG Editor
Drupal 8 ships with the CKEditor WYSIWYG editor in the default
installation.
In addition to supporting what you’d expect in a WYSIWYG editor—
buttons for bold, italic, images, links, and so on—it supports extras,
such as easily editable image captions, thanks to CKEditor’s new
Widgets feature, developed specifically for Drupal’s use.
It is fully integrated into Drupal 8, from user roles and permissions to
image management, and it ensures that we keep the benefits of
Drupal’s structured content concepts in our WYSIWYG
implementation.
Drupal 8 New Features in Core
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Quick Edit - In-place Editing
Drupal 8’s in-place editing feature allows editors to click into any
eld within a piece of content, anywhere it appears on the front-
end of the site and edit it right there, without ever visiting the
back-end editing form.
Full node content, user profiles, custom blocks, and more are all
editable in-place as well.
To replace Drupal 7’s default editing behavior, which required a
more time-consuming visit to the administrative back-end of the
site, this in-place editing feature has been backported to Drupal
7 as the Quick Edit module.
Drupal 8 New Features in Core
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Refreshed Admin Theme
The Seven administrative theme in Drupal 8 is a visually
refreshed version of Drupal 7’s, based on a formal style
guide which can also be used by module developers and
others concerned about backend usability.
Draft Support in Core
A draft revision-state for content is now has API support under-
the-hood in Drupal 8 core. This will make publishing-work ow
modules, like Workbench, much easier to implement in Drupal 8
and beyond.
Drupal 8 New Features in Core
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Mobile First
Drupal 8 has been designed with mobile in
mind, from the installer to the modules page.
Even new features, such as in-place editing,
are designed to work on the smallest of
screens.
The new search box on the modules page
adds to your Drupal-8-on-mobile experience
by saving you a lot of scrolling when you need
to get to the settings for a particular module.
Check out Module Filter for a similar
experience in Drupal 7.
Mobile-friendly Toolbar
Drupal 8 sports a responsive administrative toolbar that automatically expands and
orients itself horizontally on wide screens and collapses down to icons and orients
itself vertically on smaller screens.
Drupal 8 New Features in Core
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 8 also provides support for responsive
tables with table columns that can be
declared with high, medium, or low
importance.


This API is also built into the Views module, so
you can configure your own responsive
admin screens.
Responsive-ize ALL Things (Themes, Images, Tables...)
To support the unimaginable array of Internet-enabled devices coming in the
next 5+ years, Drupal 8 incorporates responsive design into everything it does.
All core themes are now responsive and automatically reflow elements, such as
menus and blocks, to fit well on mobile devices
Images that show up large on a desktop shrink down to t on a tablet or
smartphone, thanks to built-in support for responsive images.
Drupal 8 New Features in Core
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Multilingual First
Drupal 8 is a CMS built from the ground up for multilingual use.
You can perform your entire site installation and setup in your language of
choice.
Right on the installer page, it auto-detects your browser’s language and auto-
selects that language for installation in the drop-down for your convenience.
When you install Drupal in any language other than English (or later add a new
language to your site), Drupal 8 automatically downloads the latest interface
translations from localize.drupal.org in your language, too. This works for right-to-
left languages, such as Arabic and Hebrew, too.
Drupal 8 does away with the previous Drupal-concept of English as a “special”
language. If you select a language other than English on installation, the English
option will no longer show in your site configuration unless explicitly turned on.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Multilingual First - Fewer Modules, Packing a Bigger Punch
Making a site multilingual in Drupal 8 requires nothing more than activating one or more
of just four modules, all shipped with Drupal 8 core. These four modules do everything
and more than the roughly 30 contributed modules of a Drupal 7 site multilingual.
Language provides Drupal 8’s underlying language support. It is the base module and is
required by the other multilingual modules.
Configuration Translation makes things like blocks, menus, views, and so on, translatable.
Content Translation makes things such as nodes, taxonomy terms, and comments
translatable.
Interface Translation makes Drupal’s user interface itself translatable.
Language Selection Everywhere
Everything from system configuration settings to site components, such as blocks, views,
and menus, to individual eld values on content are translatable.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Views in Core!
The Views module, the most frequently used contributed module in Drupal, is
now part of Drupal 8 core and is more tightly integrated into Drupal then ever
before.
Beyond providing a query-builder UI and serving up the results in a variety of
formats for site visitors, baking Views into Drupal core allowed core developers
to replace numerous previously hardcoded admin pages with Views listings.
Everything you know and love from Views is included in Drupal 8 core—and
even a few extras such as mobile-friendly administration, some user experience
and accessibility improvements, the ability to create responsive table listings,
and the ability to turn any listing into a REST export that can be consumed by a
mobile application or other external service.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
More and Better Blocks
In Drupal 8, you’ll notice a few new features as they relate to blocks.
First, just like with Views replacing admin pages, several previously hard-coded
site components have been converted to blocks, including breadcrumbs, site
name, and slogan.
This makes it easier to adjust page organization in the user interface, and
enables in-place editing, and makes for easier theming.
A nice addition to Drupal 8 is the ability to re-use blocks. You can place a block
in multiple places, for example, a “Navigation” block in both the header and
footer.
And finally, you can now create custom block types, just as you can create
custom content types, to allow for granular control over different styling,
different fields, and more. This allows you to create, for example, an “Ad” block
type with an “Ad code” field that can contain JavaScript snippets from a
remote ad service and then add and place as many di different blocks of that
type on your site as you need.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
More Field Types
To build those data models, Drupal 8 includes a plethora of fundamental,
semantic field types like Taxonomy, Image, and File, ecc.
There are five completely new field types in the Drupal 8 core:
• Date
• Email
• Link
• Reference
• Telephone
Even the setting for whether comments are open or closed has been moved to
a field, making any entity type comment-able.
Fields are everywhere
Not only are there new fields, but you can now add fields in many more places.
You can add fields to nodes, blocks, comments, contact forms, taxonomy terms
and users.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 8
Form and render elements
Render arrays
"Render Arrays" or "Renderable Arrays" are the
building blocks of a Drupal page. A render
array is an associative array which conforms to
the standards and data structures used in
Drupal's Render API. The Render API is also
integrated with the Theme API.
In many cases, the data used to build a page
(and all parts of it) is kept as structured arrays
until the final stage of generating a response.
This provides enormous flexibility in extending,
slightly altering or completely overriding parts
of the page.
Render arrays are nested and thus form a tree.
Consider them Drupal's "render tree" — Drupal's
equivalent of the DOM.
$page = [
'#type' => 'page',
'content' => [
'system_main' =>
[…],
'another_block' =>
[…],
'#sorted' => TRUE,
),
'sidebar_first' => [
…
],
];
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Take a Tour
Drupal 8’s new Tour module lets site builders
create contextual, step-by-step tooltip-style
walkthroughs of your site. It can help with
overviews of administrative interfaces,
introduce new terminology, and walk
through the steps involved in configuring
components of your site.
Drupal 8
Both Less and More, Module-wise
You’ll find Drupal 8 missing some modules that shipped with Drupal 7, namely
Blog, Dashboard, Open ID, Overlay, PHP lter, Poll, Pro le, and Trigger (as well as
the Garland theme). You’ll find several new modules in which functionality has
been split out into more granular chunks, such as Menu Links/Menu UI, Block/
Custom Block, Ban/History/Actions (formally baked into User/Node/System
module), and so on.
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
HTML5
All of Drupal’s output has been converted to use semantic HTML5 markup by default, as
part of an overarching effort to clean up Drupal’s default markup. This means you’ll find
tags such as <nav>, <header>,<main>, and <section> in Drupal’s default templates and
you’ll find HTML5/CSS3 replacements for several things that previously needed custom
workarounds: resizing on text areas and first/ last/odd/ even classes is now covered by
CSS3 pseudo-selectors; and collapsible fieldsets largely replaced by the by the <details>
element.

New Front-end Libraries and Helpers
Besides jQuery, Drupal 8 brings with it an expanded array of front-end libraries, for
creating mobile-friendly, rich front-end applications in Drupal such as:
Modernizr (detects if a browser supports touch or HTML5/CSS3 features)
Underscore.js (a lightweight JS-helper library)
Backbone.js (a model-view-controller JavaScript framework).
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Native Schema.Org Output
In a great boon for search-engine optimization, Drupal 8’s RDFa module now
outputs schema.org markup. This makes the task much easier for search engines
such as Google, Yahoo!, Bing, and Yandex to extract and index data from your

site because the schema.org markup is semantic.
Even More Improved Accessibility
Drupal 8 has expanded on Drupal 7’s existing stellar accessibility record with
even more improvements. Drupal 8 extensively uses WAI-ARIA attributes to
provide semantic meaning to elements.
On the back-end, Drupal 8 provides a variety of new Accessibility tools for
JavaScript (JS), which allow module developers to create accessible
applications easily.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in Core
Drupal 8 introduces Twig,
a very widely adopted theme system in the PHP world, to Drupal. Twig’s syntax
is simpler and Twig is more secure than the the PHPTemplate- based theme
system in Drupal 7 and below that it replaces.
It allows designers and themers with HTML/CSS knowledge to modify markup
without needing to be a PHP expert and with almost no risk of their actions
causing security issues on your site.
With Twig, themers no longer need to understand the syntax differences
between deeply-nested arrays and objects, nor when to use each.
In Twig, a simple {{ foo.bar }} statement does the trick. Simple conditional and
looping logic can be contained in {% ... %} tags.
Drupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
New Theme System: Twig
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
<?php

<main role=”main”>
<a id=”main-content”></a>{# link is in html.html.twig #}
<div class=”layout-content”> {{ page.highlighted }}
{{ title_pre x }}

{% if title %} <h1>{{ title }}</h1> {% endif %}
{{ title_su x }} {{ tabs }}
{% if action_links %}

<nav class=”action-links”>{{ action_links }}</nav> {% endif %}
{{ page.content }}
{{ feed_icons }}

</div>{# /.layout-content #}
{% if page.sidebar_ rst %}

<aside class=”layout-sidebar- rst” role=”complementary”> {{ page.sidebar_ rst }}

</aside>

{% endif %}
{% if page.sidebar_second %}

<aside class=”layout-sidebar-second” role=”complementary”> {{ page.sidebar_second }}

</aside>

{% endif %}
</main> 

?>
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Twig syntax
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Twig MVC security
Twig effectively forces a separation of presentation and business logic, and all
variables going into template files are automatically escaped, far reducing
the risk of dangers like XSS vulnerabilities and making theming in Drupal 8 more
secure than ever before.
Twig Debug
using debug: true; in your site’s
services.yml file, helpful code comments
will be displayed throughout Drupal’s
generated markup to inform you where
to find the template for the markup
you’re trying to change, and which
particular “theme suggestion” is being
used to generate the markup.
<div class=”content”>

<!-- THEME DEBUG -->

<!-- THEME HOOK: ‘node’ --> <!-- FILE NAME
SUGGESTIONS: * node--1--full.html.twig

* node--1.html.twig

* node--article--full.html.twig

* node--article.html.twig

* node--full.html.twig

x node.html.twig

-->
<!-- BEGIN OUTPUT from ‘core/themes/bartik/
templates/ node.html.twig’ -->
<article data-history-node-id=”1” data-quickedit-
entity- id=”node/1” role=”article” class=”contextual-
region node node--type-article node--promoted
node--view-mode-full clear x” about=”/node/1”
typeof=”schema:Article”>
...
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Fast by Default
Acquia’s own llama-loving performance guru Wim Leers posited that the best way to
make the Internet as a whole faster is to make the leading CMSes fast by default.
This means that CMS’s need to have their high-performance settings enabled out-of- the-
box rather than require users to be savvy enough to find them in all their various locations.
You’ll notice that Drupal 8 ships with features such as CSS and JavaScript aggregation
already turned on for a much faster default installation. Huzzah!
Drupal 8 ships with a sites/example. settings. local.php le for exactly this purpose. It hard
codes the performance settings to o , which is extremely useful in a development
environment. Simply copy it, rename it as sites/default/settings.local.php, and
uncomment the following lines in sites/ default/settings.php:
<?php

# if ( file_exists(__DIR__ . ‘/settings.local.php’)) { # include __DIR__ . ‘/settings.local.php’;

#}

?>
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
New Method of Selectively Adding JS/CSS to the Page
Also helping out on the performance front, Drupal 8 has a new
recommended best- practice for registering JS and CSS assets (along with
their dependencies).
Assets are de ned in your MODULE/THEME.libraries.yml le as a series of
properties that you then reference in the #attached property of an element
or render array.
R.I.P. IE 6, 7, and 8
Another big improvement for front-end developers and designers is that
Drupal 8 core has officially dropped support for IE 6, 7, and 8, enabling the
use of jQuery 2.0 and other code that assumes modern HTML5/CSS3 browser
support.
Front-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
The Drupal 8’s new routing system, 

totally replaces the routing parts of hook_menu() in Drupal 7.
The path-to-page/access-check logic now lives in a YAML file using the same syntax
as the Symfony routing system, as Drupal 8's routing system is heavily based on
Symfony’s one, and both use the same syntax.
The page callback logic now lives in a “Controller” class (as in the standard model-
view-controller pattern) in a specially named folder (src), per the PSR-4 standard.
New Symfony based Routing System
example.name:
path: '/example/{name}'
defaults:
_controller: 'DrupalexampleControllerExampleController::content'
requirements:
_permission: 'access content'
Back-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
New Configuration Management System
Probably the most looked-forward-to change in Drupal 8, for both developers

and site builders, is the new configuration management system.
In Drupal 7 and below, both content and configuration were saved to the database
(sometimes with a mix of both in the same table), making deploying configuration
changes from one environment to another (for example, development to production)
very tricky.
A variety of workarounds emerged for this, including hook_update_N(), Features module,
and of course the old standby.
In Drupal 8, all configuration changes (both standard admin settings forms, such as site
name, as well as any ConfigEntity including Views, user roles, and content types) run
through a unified Configuration API. Each environment has a “sync” directory to hold
configuration changes from other environments that are about to be imported for review.
For performance, active configuration is stored in a config table in the database, though
the storage location is swappable.
Back-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Configuration Sync Workflow
Drupal 8 ships with a basic UI to do both single and full configuration imports and exports,
and configuration can also be moved around via the command line with Drush’s config-*
commands, which is handy when using version control systems such as Git.
The basic work ow (after making whatever configuration changes to your Drupal 8 site) is:
1. On the development site, export your site’s configuration. You’ll receive a tarball that
consists of lots of YAML files.
2. On production, import the files, which places them into the config “sync” area.
3. In the configuration UI, view the list of what configuration settings have changed and
view a “diff” of changes in advance.
4. If the changes are acceptable, synchronize them, which will replace production’s
current active store with the contents of the sync directory and become the new values
that Drupal will use to build pages.
Back-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Content Deployment
Drupal 8.1 core ships with alpha-stability-support for migrating content such as
nodes, users, and taxonomy terms between sites via the Migrate, Migrate Drupal,
and the Migrate Drupal UI core experimental modules.
Nonetheless, one welcome addition to Drupal 8 has been the introduction of
UUIDs (universally unique identifiers) to every piece of content.
These UUIDs can be used to determine whether a piece of content from a source
site exists on a given destination site. This makes content imports/exports infinitely
easier because even if source and destination sites have a node/100, for
example, if the content is different, each will have a unique (obviously!) UUID.
Deploy module for the Drupal 8 version provides this feature.
If still on Drupal 7, you can get similar functionality to what core offers via the
Universally Unique IDentifier module.
Back-end Developer Improvements
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Back-end Developer Improvements
Entities, Entities, Everywhere!
Entities were a key new feature and concept in
Drupal 7, abstracting the ability to add fields to
other types of content than just nodes, such as
users and taxonomy terms.
In Drupal 8, the Entity API has been completely
overhauled to greatly improve

the developer experience.
All entities are now classed objects that implement
a standard EntityInterface (no more guessing
which of the 100 entity hooks you’re required to
implement), with baked-in knowledge about the
active language (to aid in translation and
localization).
Drupal 7
<?php

# Inconsistent Drupal 7 code.
$node->title $node-
>body[$langcode][0][‘value’]
?>
Drupal 8
<?php

# Consistent Drupal 8 code.
$node->get(‘title’)->value
$node->get(‘body’)->value
?>
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Back-end Developer Improvements
Configuration and Content Entities
Nearly anything you can create more than one of in Drupal 8 has been converted to an
entity. There are two kinds of these entities:
From a developer point of view it means that between the Entity

API and the Configuration/State API, there is almost never a reason to create and
manage your own database tables by hand in Drupal 8.
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Back-end Developer Improvements
Web Services
A major focus for Drupal 8 is a native REST API built into Drupal 8 and supported by the
RESTful Web Services suite of modules.
These enable Drupal 8 to produce and consume web services for the creation of Drupal-
powered mobile applications, facilitate cross-site communication, and allow better
integration with third-party resources.
The Drupal 8 REST API allows for fine-grained configuration of which resources should be
available (nodes, taxonomy, users, and so on), what HTTP methods are allowed against
those resources (for example, GET, POST, PATCH, DELETE), and which formats and
authentication are used to access those resources.
The contributed REST UI module provides an interface for this configuration. You can
define which role(s) on your site may access resources via each allowed HTTP method.
Drupal 8 ships with the Guzzle PHP HTTP library, which gives us easy syntax to
retrieve and post data to Drupal or to talk to third-party Web Services, such as
Twitter or Github.
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Back-end Developer Improvements
Improved Caching
Caching in Drupal 8 has been greatly improved across the board.
Entity cache module is now in core,
and Drupal Cache is based on Cacheability Metadata
All things that either are directly renderable or are used to determine what to render
provide cacheability metadata — ranging from access results to entities and URLs.
Cacheability metadata consists of 3 properties:
cache tags
For dependencies on data managed by Drupal, like entities & configuration
cache contexts
For variations, i.e. dependencies on the request context
cache max-age
For time-sensitive caching, i.e. time dependencies
Author: Italo Mairo - @ All right reserved
italomairo.com
New Features in CoreDrupal 8
(source: Acquia - The Ultimate Guide to Drupal 8)
Back-end Developer Improvements
Big Pipe
Activating the experimental BigPipe Module in Drupal 8.1 core improves the user
experience for your site visitors by reducing the perceived page loading time.
Drupal 7 can’t really cache its output because it lacks metadata for caching. In
Drupal 7 (and just about every other CMS or framework), personalization has always
made things run slower.
Using BigPipe in Drupal 8, it is no longer so. Drupal 8 includes cacheability metadata
and knows which parts of every page are static and which dynamic. BigPipe then
sends the unchanging parts of a page to the browser immediately while rendering
and delivering the dynamic parts later, as soon as

they are ready.
Essentially, your site visitors see what they came to see almost immediately—the
main content and images, for example—while the uncacheable, personalized
page elements (such as a shopping cart block) are delivered once rendered.
Author: Italo Mairo - @ All right reserved
italomairo.com
Building ModulesDrupal 8
Back-end Developer Improvements
Acquia - Building modules with Drupal 8
What is needed:
• Understanding of programming in PHP
• Familiarity with object-oriented programming (OOP) terminology
◦ Lesson 1 - Examples module, Symfony, Controllers, and the Menu
◦ Lesson 2 - Blocks, Configuration, and Forms
◦ Lesson 3 - Configuration forms and management
◦ Lesson 4 - Entities, Content Entities, and Configuration Entities
◦ Lesson 5 - Fields for entities
◦ Lesson 6 - Entity queries and loading entities
◦ Lesson 7 - Loading and editing fields
◦ Lesson 8 - Services, dependency injection, and service containers
◦ Lesson 9 - Creating Elements, Theming Elements, and Managing Front-end Libraries
◦ Lesson 10 - Unit and Functional Testing
◦ Lesson 11 - Review of Dependency Injection
(source: Acquia Website)
Author: Italo Mairo - @ All right reserved
italomairo.com
Preparing for Drupal 8Drupal 8
Here are several additional recommendations and procedures that you can
use to prepare for Drupal 8's release:
• Prepare your codebase for newer versions of PHP
• Use object-oriented programming whenever possible
• Implement autoloading
• Move from features to configurations
• Use Composer
• Take advantage of Twig
• Use an improved authoring experience backported from Drupal 8
What version of Drupal core should I use?
How can I build a Drupal 8-friendly website using Drupal 7?
(source: Acquia - The Ultimate Guide to Drupal 8)
Author: Italo Mairo - @ All right reserved
italomairo.com
Migration PathDrupal 8
Drupal’s major version upgrade path has been replaced with a migration
path, courtesy of a D8 port of the Migrate and Migrate Drupal-to-Drupal
modules.
As of Drupal 8.1, there is also a Migration UI in core, which allows major
Drupal version migrations without resorting to command-line tools. Both a
migration path from Drupal 6 (already in Drupal 8.x) and Drupal 7 (partially
in 8.x and under development) are supported.
Migrate to Drupal 8: A How-To Scan (Oct 2016)
(source: Acquia - The Ultimate Guide to Drupal 8)
Upgrade using the migration user interface
Issues for Drupal Core - Migration
Useful resources:
Automated upgrading to Drupal 8
Author: Italo Mairo - @ All right reserved
italomairo.com
Deciding When to UpgradeDrupal 8
The Drupal 8 Contrib Porting Tracker is a "centralized place for
tracking the porting status of contributed projects." Basically, it's
a Kanban board where you can check the upgrade status of a
given Drupal module and/or you can provide additional
information about projects for the community.
https://contribkanban.com/board/contrib_tracker
Supporting Tools (Modules Upgrade)
Upgrade Status is a Drupal module that you can add to your site to collect
information about the modules’ update status.
D8upgrade is a free Web service that makes it as easy as possible to generate an
upgrade report of your site.
Drupal Project Usage Graph
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal 8 Using Composer and GIT
GIT
•Using Composer in a Drupal project
•Up and running a Drupal 8 project 

using Composer and GIT
$ cd /sites
$ sudo composer create-project drupal-composer/drupal-project:8.x-dev

my-drupal-site --stability dev --no-interaction
To create a new Drupal project using Composer, type the following on the
command line, where /sites/my-drupal-site is the desired code location:
Author: Italo Mairo - @ All right reserved
italomairo.com
Drupal Using Composer
•through Drupal.org
•through Drupal Packagist
Using Composer to install Drupal packages
To install Drupal modules or themes for your site with composer, enter
the following command at the root of your Drupal install:
$ composer require drupal/<modulename>
https://packagist.drupal-composer.org

More Related Content

What's hot

Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)
Joachim Neubert
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
Juha Niemi
 
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The StartPreventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Acquia
 
Linked data enhanced publishing for special collections (with Drupal)
Linked data enhanced publishing for special collections (with Drupal)Linked data enhanced publishing for special collections (with Drupal)
Linked data enhanced publishing for special collections (with Drupal)
Joachim Neubert
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
Suzanne Dergacheva
 

What's hot (20)

Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)Linked Data Publishing with Drupal (SWIB13 workshop)
Linked Data Publishing with Drupal (SWIB13 workshop)
 
Drupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin SystemDrupal 8 Deep Dive: Plugin System
Drupal 8 Deep Dive: Plugin System
 
Drupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakesDrupal 8: Most common beginner mistakes
Drupal 8: Most common beginner mistakes
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
Media handling in Drupal (Drupalcamp Leuven 2013)
Media handling in Drupal (Drupalcamp Leuven 2013)Media handling in Drupal (Drupalcamp Leuven 2013)
Media handling in Drupal (Drupalcamp Leuven 2013)
 
Style guides in drupal development workflows
Style guides in drupal development workflowsStyle guides in drupal development workflows
Style guides in drupal development workflows
 
History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8History of Drupal: From Drop 1.0 to Drupal 8
History of Drupal: From Drop 1.0 to Drupal 8
 
Drupal 8 introduction to theming
Drupal 8  introduction to themingDrupal 8  introduction to theming
Drupal 8 introduction to theming
 
Evolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal communityEvolution of Drupal and the Drupal community
Evolution of Drupal and the Drupal community
 
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The StartPreventing Drupal Headaches: Establishing Flexible File Paths From The Start
Preventing Drupal Headaches: Establishing Flexible File Paths From The Start
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
Entities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in DrupalEntities 101: Understanding Data Structures in Drupal
Entities 101: Understanding Data Structures in Drupal
 
Linked data enhanced publishing for special collections (with Drupal)
Linked data enhanced publishing for special collections (with Drupal)Linked data enhanced publishing for special collections (with Drupal)
Linked data enhanced publishing for special collections (with Drupal)
 
10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box10 New Things You Can Do with Drupal 8 Out-of-the-Box
10 New Things You Can Do with Drupal 8 Out-of-the-Box
 
Decoupled drupal DcRuhr
Decoupled drupal DcRuhrDecoupled drupal DcRuhr
Decoupled drupal DcRuhr
 
Beginners Guide to Drupal
Beginners Guide to DrupalBeginners Guide to Drupal
Beginners Guide to Drupal
 
Absolute Beginners Guide to Drupal
Absolute Beginners Guide to DrupalAbsolute Beginners Guide to Drupal
Absolute Beginners Guide to Drupal
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
 
Drupal in-depth
Drupal in-depthDrupal in-depth
Drupal in-depth
 
Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies make
 

Viewers also liked

Gerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233SGerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
MCExorzist
 
Angela Merkel - Doktorarbeit
Angela Merkel - DoktorarbeitAngela Merkel - Doktorarbeit
Angela Merkel - Doktorarbeit
MCExorzist
 

Viewers also liked (20)

Politische Ponerologie
Politische PonerologiePolitische Ponerologie
Politische Ponerologie
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
 
Muammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne BuchMuammar al-Gaddafi - Das Grüne Buch
Muammar al-Gaddafi - Das Grüne Buch
 
Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)Real History - The Bad War (english 115s)
Real History - The Bad War (english 115s)
 
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233SGerd Honsik - Freispruch für Hitler - 1988 - 233S
Gerd Honsik - Freispruch für Hitler - 1988 - 233S
 
Thomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi GermanyThomas Goodrich - Hellstorm The Death Of Nazi Germany
Thomas Goodrich - Hellstorm The Death Of Nazi Germany
 
JavaScript - The Universal Platform?
JavaScript - The Universal Platform?JavaScript - The Universal Platform?
JavaScript - The Universal Platform?
 
Angela Merkel - Doktorarbeit
Angela Merkel - DoktorarbeitAngela Merkel - Doktorarbeit
Angela Merkel - Doktorarbeit
 
Drupal 8: Forms
Drupal 8: FormsDrupal 8: Forms
Drupal 8: Forms
 
Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)
 
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)Cross-Platform Desktop Apps with Electron (CodeStock Edition)
Cross-Platform Desktop Apps with Electron (CodeStock Edition)
 
Electron
ElectronElectron
Electron
 
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
 
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and AngularNativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
NativeScript: Cross-Platform Mobile Apps with JavaScript and Angular
 
Audiobooks and the Sound of Sales - Noah Genner - Tech Forum 2017
Audiobooks and the Sound of Sales - Noah Genner - Tech Forum 2017Audiobooks and the Sound of Sales - Noah Genner - Tech Forum 2017
Audiobooks and the Sound of Sales - Noah Genner - Tech Forum 2017
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Drupal 7 and SolR
Drupal 7 and SolRDrupal 7 and SolR
Drupal 7 and SolR
 
Drupal 8: TWIG Template Engine
Drupal 8:  TWIG Template EngineDrupal 8:  TWIG Template Engine
Drupal 8: TWIG Template Engine
 

Similar to From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview

Top 10 reasons to choose drupal
Top 10 reasons to choose drupalTop 10 reasons to choose drupal
Top 10 reasons to choose drupal
Thai Pham
 

Similar to From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview (20)

Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Future Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and BeyondFuture Scope of Drupal as a Technology in 2020 and Beyond
Future Scope of Drupal as a Technology in 2020 and Beyond
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
 
Hire Drupal Developers For Your Website
Hire Drupal Developers For Your WebsiteHire Drupal Developers For Your Website
Hire Drupal Developers For Your Website
 
Hire Drupal Developers For Your Website
Hire Drupal Developers For Your WebsiteHire Drupal Developers For Your Website
Hire Drupal Developers For Your Website
 
Drupal 8 and Pantheon
Drupal 8 and PantheonDrupal 8 and Pantheon
Drupal 8 and Pantheon
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupal
 
Why drupal should power your next web project
Why drupal should power your next web projectWhy drupal should power your next web project
Why drupal should power your next web project
 
Top 10 reasons to choose drupal
Top 10 reasons to choose drupalTop 10 reasons to choose drupal
Top 10 reasons to choose drupal
 
Top 10 reasons to choose drupal
Top 10 reasons to choose drupalTop 10 reasons to choose drupal
Top 10 reasons to choose drupal
 
A Sneak Peek Into Drupal - A Beginner’s Guide.pdf
A Sneak Peek Into Drupal - A Beginner’s Guide.pdfA Sneak Peek Into Drupal - A Beginner’s Guide.pdf
A Sneak Peek Into Drupal - A Beginner’s Guide.pdf
 
Drupal by Gaurav Boudh
Drupal by Gaurav BoudhDrupal by Gaurav Boudh
Drupal by Gaurav Boudh
 
Drupal Experience Sharing at Prime College
Drupal Experience Sharing at Prime CollegeDrupal Experience Sharing at Prime College
Drupal Experience Sharing at Prime College
 
Drupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime CollegeDrupal Experience Sharing At Prime College
Drupal Experience Sharing At Prime College
 
Drupal - Introduction to User Management in Drupal
Drupal - Introduction to User Management in DrupalDrupal - Introduction to User Management in Drupal
Drupal - Introduction to User Management in Drupal
 
The Top 10 Features to Watch Out for in Drupal 8
The Top 10 Features to Watch Out for in Drupal 8The Top 10 Features to Watch Out for in Drupal 8
The Top 10 Features to Watch Out for in Drupal 8
 
Drupal Summit Tokyo 2017 -- 企業向けオープンソースCMS Drupalの全貌
Drupal Summit Tokyo 2017 -- 企業向けオープンソースCMS Drupalの全貌Drupal Summit Tokyo 2017 -- 企業向けオープンソースCMS Drupalの全貌
Drupal Summit Tokyo 2017 -- 企業向けオープンソースCMS Drupalの全貌
 
Drupal
DrupalDrupal
Drupal
 
Drupal for Enterprises
Drupal for EnterprisesDrupal for Enterprises
Drupal for Enterprises
 
Drupal Development.pdf
Drupal Development.pdfDrupal Development.pdf
Drupal Development.pdf
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

From Drupal 7 to Drupal 8 - Drupal Intensive Course Overview

  • 1. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Intensive Overview from Drupal 7 to Drupal 8 January 2017
  • 2. Author: Italo Mairo - @ All right reserved italomairo.com Engineer, Senior Php Js Drupal (7/8) Developer More than 20 years of working experience 
 in Digital Communication, Multimedia, Digital Cartography, Web & Web GIS 2.0 Opensource Applications. Experienced Drupal Developer
 more than 5 years of full-time work experience on several advanced Drupal Web projects 
 (from mid to enterprise level). Individual Member of Drupal Association Personal website: www.italomairo.com Drupal.org username: itamair Linkedin Profile: italomairo Italo Mairo Who I am …
  • 3. Author: Italo Mairo - @ All right reserved Drupal Projects
  • 4. Author: Italo Mairo - @ All right reserved Drupal Projects
  • 5. Author: Italo Mairo - @ All right reserved Drupal Projects
  • 6. Author: Italo Mairo - @ All right reserved italomairo.com •It is powerful and flexible enough to meet the needs of a wide range of projects, worldwide used as an highly scalable platform for web content management •The Drupal project is open source software. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation. It's distributed under the terms of the GNU General Public License (GPL). There are no licensing fees, ever. Drupal will always be free. •Drupal is maintained by one of the most innovative and numerous open source communities in the world (as of March 2015, over 1,167,000 user accounts and over 37,000 developer accounts) https://www.drupal.orgDrupal
  • 7. Author: Italo Mairo - @ All right reserved italomairo.com •Drupal is used to build web sites. •It’s a highly modular, open source web content management framework with an emphasis on collaboration. •It is extensible, standards-compliant, and strives for clean code and a small footprint. •Drupal ships with basic core functionality, and additional functionality is gained by enabling built-in or third-party modules. •Drupal is designed to be customized, but customization is done by overriding the core or by adding modules, not by modifying the code in the core. •Drupal’s design also successfully separates content management from content presentation. (source: Apress - Pro Drupal 7 Development) https://en.wikipedia.org/wiki/Drupal https://www.drupal.orgDrupal
  • 8. Author: Italo Mairo - @ All right reserved italomairo.com •Drupal is successfully used, as a best choice, for the most complexed web solutions and products, from medium to the enterprise level ones, such as: - Corporate sites - Entertainment sites - E-commerce sites - Media sites and blogs - Forums - Intranets - Document management and workflow oriented sites - Marketing automation sites - Social networking sites - etc. https://www.drupal.orgDrupal
  • 9. Author: Italo Mairo - @ All right reserved italomairo.com • enterprises, governments, higher education institutions, and NGOs. • Drupal is the platform the United States, London, France, and more use to communicate with citizens. • It’s the framework of media companies like BBC, NBC, and MTV UK rely on to inform and entertain the world. • It’s part of how organizations and universities like Amnesty International and the University of Oxford work to make the world a better place. • Read Drupal case studies or check out a list of organizations with profiles on Drupal.org.
 • News: Nasdaq Chooses Drupal 8 (October 21, 2016) Who uses Drupal https://www.drupal.orgDrupal
  • 10. Author: Italo Mairo - @ All right reserved italomairo.com • almost endless contents modeling and characterization native capabilities, through Nodes and Entities Apis, comments, taxonomies, etc.; • multilingual capabilities and translation services; • advanced & scalable users, roles and permissions definitions and management; • advanced media management; • advanced and flexible front-end theming and back- end content management & personalization with regions, views, blocks, menu systems, forms Apis; Drupal Strength points
  • 11. Author: Italo Mairo - @ All right reserved italomairo.com • interoperability with third-party applications and mobile/tablet external applications, with web services and rest full Apis; • sophisticate events and triggering systems; • very efficient SEO system and modular solutions; • high level of security, based on strict coding quality/standards and best practices; • very extensive and wide community; • efficient collaboration and extending logics (no duplications of similar modules); • and many others … Strength pointsDrupal
  • 12. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Community Documentation https://www.drupal.org/documentation Site Building Guide Add functionality and features such as e-commerce, forums, media, search, geographic data, dates, workflow, messaging, forms, social networking, etc. Audience: site builders, developers and business architects Developer Guides API Reference Git documentation Examples for Developers Other Information Code snippets Troubleshooting Tutorials and recipes
  • 13. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Site Building Guide drupa.org 'how to' guide for implementing business functionality and features into your Drupal site. https://www.drupal.org/documentation/build • Modules in Drupal core - Built-in default modular functionality • Contributed modules • Themes in 'Drupal Core' - Built-in themes for site appearance • Themes: Addon 'Contrib' Drupal themes to change site appearance (contributed by our community members) • Building the site functionality • Distributions • Drush - Easily Manage Drupal 'Local' or 'Online' with Unix Command-Line • HowTos
  • 14. Author: Italo Mairo - @ All right reserved italomairo.com •back-end functionalities definition and front-end theming requisites analysis; •contents model definition (content types, entities and taxonomies definitions); •definitions of specific roles, identification and set-up of general and extended privileges and permissions; •assessment of specific required functionalities and identification of specific contribution / custom modules and “ad-hoc” functionalities (i.e: commerce functionalities, translation functionalities, geocoding and mapping functionalities); Implementation WorkflowDrupal 7
  • 15. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 (source: Apress - Pro Drupal 7 Development) Technology Stack Drupal is written in PHP. All core Drupal code adheres to strict coding standards Drupal ships with .htaccess files that secure the Drupal installation. Clean URLs—that is, those devoid of question marks, ampersands, or other strange characters—are achieved using Apache’s mod_rewrite component. The database interface provides an API based on PHP data object (or PDO) and allows Drupal to support any database that supports PHP. For Drupal 7, the required version of PHP is 5.2.
  • 16. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 (source: Apress - Pro Drupal 7 Development) An overview of the Drupal core (partial …)
  • 17. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 (source: Apress - Pro Drupal 7 Development) Enabling additional modules gives more functionality.
  • 18. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 (source: Apress - Pro Drupal 7 Development) Files Layout and Structures • The includes folder contains libraries of common functions that Drupal uses. • The misc folder stores JavaScript and miscellaneous icons and images available to a stock Drupal installation. • The modules folder contains the core modules • The profiles folder contains different installation profiles for a site. • The sites directory contains your modifications to Drupal in the form of settings, modules, and themes. • The sites/default/files folder is needed to store any files that are uploaded to your site and subsequently served out. • The themes folder contains the template engines and default themes for Drupal. • index.php is the main entry point for serving requests. • update.php updates the database schema after a Drupal version upgrade. • robots.txt is a default implementation of the robot exclusion standard.
  • 19. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Clean URLs & Aliases https://www.drupal.org/docs/7/configuring-clean-urls/enable-clean-urls By default, 
 Drupal uses and generates URLs that look like "http://www.example.com/?q=node/83". With so-called clean URLs this would be displayed without the “?q=" as "http://www.example.com/node/83". Enabling Clean URLs in Drupal 7 In Drupal 7, the installer tests .htaccess file for compatibility with Clean URLs: if the environment is tested as compatible with Clean URLs, it will be enabled as part of the installation process and no further action is required. If you need to enable Clean URLs post installation, Drupal will run the clean URL test automatically when you navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata > Clean URLs), show the results, and allow you to save configuration. Clean URLs are enabled by Default in Drupal 8 The Pathauto module automatically generates URL/path aliases. Pathauto
  • 20. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Hooks can be thought of as internal Drupal events. Hooks allow modules to “hook into” what is happening in the rest of Drupal. That means that any function named according to the convention module_name + hook name will be called. For example, At the time the user logs in, Drupal fires hook_user_login. We might write a custom module called my_module and include a function called my_module_user_login() { // … does some stuff … } such as comment_user_login() in the comment module, locale_user_login() in the locale module, node_user_login() in the node module, The most common way to tap into Drupal’s core functionality is through the implementation of hooks in modules. Hooks
  • 21. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Hooks /**
 * Invokes a hook in a particular module.
 *
 * All arguments are passed by value. Use drupal_alter() if you need to pass
 * arguments by reference.
 *
 * @param $module
 * The name of the module (without the .module extension).
 * @param $hook
 * The name of the hook to invoke.
 * @param ...
 * Arguments to pass to the hook implementation.
 *
 * @return
 * The return value of the hook implementation.
 *
 * @see drupal_alter()
 */
 function module_invoke($module, $hook) includes/module.inc https://api.drupal.org/api/drupal/includes%21module.inc/group/hooks/7.x
  • 22. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Themes In Drupal, the theme layer is responsible for creating the HTML (or JSON, XML, etc.) that the browser will receive. Drupal uses PHP Template as the primary templating engine, or alternatively you can use the Easy Template System (ETS). Drupal encourages separation of content and markup. Drupal allows several ways to customize and override the look and feel of your web site. The simplest way is by using a cascading style sheet (CSS) to override Drupal’s built-in classes and IDs. Drupal’s template files consist of standard HTML and PHP. Template (theme hook) suggestions Working with template suggestions Theme developer Module
  • 23. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Blocks & Regions A Block is information that can be enabled or disabled in a specific location on your web site’s template. Blocks are typically placed in a template’s sidebar, header, or footer. Blocks can be set to display on nodes of a certain type, only on the front page, or according to other criteria. Often blocks are used to present information that is customized to the current user. Regions where blocks may appear (such as the header, footer, or right or left sidebar) are defined in a site’s theme; placement and visibility of blocks within those regions is managed through the web-based administrative interface. (source: Apress - Pro Drupal 7 Development)
  • 24. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Nodes “What is a node?” (source: Apress - Pro Drupal 7 Development) A node is a piece of content. Drupal assigns each piece of content an ID number called a node ID (abbreviated in the code as $nid). There are many different kinds of nodes, or node types. Some common node types are “blog entry,” “poll,” and “forum.” Often the term content type is used as a synonym for node type, although a node type is really a more abstract concept and can be thought of as a derivation of a base node.
  • 25. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Nodes All nodes have the following attributes stored within the node and node_revisions database table: • nid: A unique ID for the node. • vid: A unique revision ID for the node, needed because Drupal can store content revisions for each node. • type: Every node has a node type—for example, blog, story, article, image, and so on. • language: The language for the node. Out of the box, this column is empty, indicating language-neutral nodes. • title: A short 255-character string used as the node’s title, unless the node type declares that it does not have a title, indicated by a 0 in the has_title field of the node_type table. • uid: The user ID of the author. By default, nodes have a single author. • status: unpublished or published • created: A Unix timestamp of when the node was created. • changed: A Unix timestamp of when the node was last modified. • comment: An integer field describing the status of the node’s comments. • promote: An integer field to determine whether to show the node on the front page, with two values: 1 & 0 • sticky: If the node should be stick to the top of node listings
  • 26. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Nodes Basic Uses • Creating custom content types • Creating content • Administering content • Creating revisions • User permissions https://www.drupal.org/docs/7/nodes-content-types-and-fields/about-nodes
  • 27. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Taxonomy is the practice and science of classify content. Taxonomy, a powerful core module, gives your sites use of the organizational keywords known in other systems as categories, tags, or metadata. It allows you to connect, relate and classify your website’s content. In Drupal, these terms are gathered within "vocabularies". The Taxonomy module allows you to create, manage and apply those vocabularies. Drupal 7 and 8 has the ability to add taxonomy fields to vocabularies and terms. It will come in handy for everything from menu and navigation schemes to view and display options. Organizing content with taxonomies
  • 28. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Fields Content in Drupal is composed of individual fields. A node title is a field, as is the node body. You can use fields in Drupal to construct any content type For example, an Event, typically contains a title, a description (or body), a start date, a start time, a duration, a location, and possibly a link to register for the event. In Drupal we have the ability to create content types using fields, either programmatically by creating a module, or through the Drupal administrative interface by creating a new content type and assigning fields through the user interface. Field API makes it extremely easy to create simple to complex content types with very little programming. (source: Apress - Pro Drupal 7 Development)
  • 29. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Download & Extend https://www.drupal.org/download Distributions Modules Extend and customize Drupal functionality, and integrate with 3rd- party services. Drupal bundled with additional projects such as themes, modules, libraries, and installation profiles. Themes Most installed Commerce Kickstart Panopoly Open Atrium Opigno LMS More most installed Most installed Chaos tool suite (ctools) Views Token Pathauto More most installed Change the look and feel of your Drupal site. Most installed Bootstrap Zen Omega Adminimal- Responsive Administration Theme (Drupal 8 ready!) More most installed View the index of all modules. View the index of all themes.
  • 30. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Download & Extend https://www.drupal.org/project/module_filter https://www.drupal.org/project/filter_perms https://www.drupal.org/project/admin_menu https://www.drupal.org/project/examples First Useful Modules
  • 31. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Views Module https://www.drupal.org/project/views The views module allows administrators and site designers to create, manage, and display lists of content. Views can be understood as a user interface to compose SQL-queries, pulling information (Content, Users, etc.) from the database and showing it on screen in the desired format. Fields, or the individual pieces of data being displayed. Relationships, or information about how data elements relate to one another. Arguments(D6)/Contextual filters(D7), or additional parameters that dynamically refine the view results, passed as part of the path. Sort criteria Sort criteria, which determine the order of items displayed in the view results. Filters, which limit items displayed in the results. Displays, which control where the output will be seen. Header, which allow you to add by default one or more text area above the views output. Footer, which allow you to add by default one or more text area beneath the views output. Empty Text, content will be displayed, when you choose in the Arguments Section "Action to take if argument is not present" the option "Display empty text”. Permissions, define the access role to the View.
  • 32. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Menu System Define the navigation menus, and route page requests to code based on URLs. The Drupal menu system drives both the navigation system from a user perspective and the callback system that Drupal uses to respond to URLs passed from the browser. https://api.drupal.org/api/drupal/includes!menu.inc/group/menu/7.x function hook_menu hook_menu() implementations return an associative array whose keys define paths and whose values are an associative array of properties for each path. This hook enables modules to register paths in order to define how URL requests are handled. MENU_NORMAL_ITEM: Normal menu items show up in the menu tree MENU_CALLBACK: Callbacks simply register a path so that the correct function is fired MENU_LOCAL_TASK: Local tasks are rendered as tabs by default. /** * Implementation of hook_menu(). */ function menufun_menu() { $items['menufun'] = array( ‘title’ => ‘Greeting’, 'page callback' => 'menufun_hello', 'access callback' => TRUE, 'type' => MENU_CALLBACK, ); return $items; } /** * Page callback. */ function menufun_hello() { return t('Hello!'); }
  • 33. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 QA & Coding Standards The Drupal Coding Standards apply to code within Drupal and its contributed modules. Coding standards API documentation and comment standards API Documentation Samples CSS JavaScript CSS coding standards and best practices. How to write documentation collection of the complete API documentation examples apply to code within Drupal and its contributed modules. coding standards and best practices for Drupal. https://www.drupal.org/docs/develop/standards Namespaces PHP 5.3 introduces namespaces to the language. and more …
  • 34. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Multisite Drupal has a feature which allows separate, independent sites to be served from a single codebase. Each site has its own database, configuration, files and base domain or URL. https://www.drupal.org/docs/7/multisite-drupal Multi-site - Sharing the same code base When to multisite As a general rule on whether to use multisite installs or not you can say: • If the sites are similar in functionality (use same modules or use the same drupal distribution) do it. • If the functionality is different don't use multisite.
  • 35. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Multisite, single shared database The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The module allows you to share users, content, and configurations across a group of sites such as: • example.com • one.example.com • two.example.com • my.example.com • thisexample.com <-- can use any domain string • example.com:3000 <-- treats non-standard ports as unique By default, these sites share all tables in your Drupal installation. The Domain Prefix module (for Drupal 6) allows for selective, dynamic table prefixing for advanced users Domain Access Module Multisite: Share users and user roles for existing set up Share a single database across multiple sites
  • 36. Author: Italo Mairo - @ All right reserved italomairo.com Advanced Development Tools • Coder/Codesniffer: development tool for php coding standards and Drupal best practices; • Devel: Drupal module containing development tools/ submodules; • Drush: command line shell and Unix scripting interface for Drupal; • Composer: Dependency Manager for PHP and for Drupal projects/modules • … plus specific modules depending on Drupal version (Features, Drupal Console, ecc.) Drupal
  • 37. Author: Italo Mairo - @ All right reserved italomairo.com Git operational workflowDrupal
  • 38. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 7 Continuous Integration, with Features Must have Features: https://www.drupal.org/project/features Features https://www.drupal.org/project/diff Diff Strongarm https://www.drupal.org/project/strongarm Features Extra https://www.drupal.org/project/features_extra https://www.drupal.org/project/context Context
  • 39. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 8 Drupal 8 is the latest, greatest release of the world's most widely used enterprise web CMS. It's fast. Flexible.   Drupal 8 taps into the concentrated innovation from its open source community. You can drive value and streamline your work with new capabilities for successful digital experiences. (source: https://www.drupal.com) announced in 2012, and released in 2015
  • 40. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 8 "Drupal 8 breaks the mold for dated content management models and liberates content from the page for the post-browser era. Now we have the power to deliver the right content, to the right audience, at the right time, on the right device." Dries Buytaert, Drupal founder
  • 41. Author: Italo Mairo - @ All right reserved italomairo.com Files Layout and StructuresDrupal 8 • The core folder (just it ! ) contains the Drupal core (modules & themes included). • The modules folder contains the custom/contrib modules • The profiles folder contains the custom/contrib profiles. • The themes folder contains the custom/contrib themes. • index.php is the main entry point for serving requests. • update.php updates the database schema after a Drupal version upgrade. • robots.txt is a default implementation of the robot exclusion standard. • autoload.php is the entry point file to perform classes autoload (PSR-4).
  • 42. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) “Proudly Invented Elsewhere” As a counterpoint to our earlier sense of self-sufficiency and rejection of third- party code, “Proudly Invented Elsewhere” represents a mind-shift among Drupal 8 core developers. One of the great strengths of open source software is in not having to reinvent the wheel and being able to build better solutions “on the shoulders of giants.” Drupal 8 preferred to funding on the best tool for the job (if available), 
 versus creating something custom and specific to Drupal. Some (major) external libraries that have been pulled and integrated are: • PHPUnit for unit testing, • Guzzle for performing HTTP (web service) requests, • a variety of Symfony components • Composer for pulling in external dependencies and class autoloading, • and more many more (see the Vendor folder).
  • 43. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) This philosophy change also extends to the code base itself. Drupal 8 embrace the way the rest of the world is writing code: decoupled, object-oriented (OO), and embracing modern language features of PHP, such as namespaces and traits. Info files in Drupal 8 are now simple YAML files - the same as those used by other languages and frameworks. The syntax is very similar (mostly : instead of = everywhere, and arrays are formatted slightly differently), and it remains very easy to read and write these files. The awkward files[] key is gone, in favor of the PSR-4 standard for automatic class autoloading via Composer. “Proudly Invented Elsewhere”
  • 44. Author: Italo Mairo - @ All right reserved italomairo.com (source: https://it-consultis.com) Drupal has over 200 new features and enhancements, especially as it aligns itself with responsive mobile design Symfony2 Framework The Symfony2 framework overhauls the architecture with a completely new routing and context system. The result is a Drupal 8 that improves on object-oriented programming, as well as allowing it to adapt to modern PHP concepts. Multilingual Drupal 8 lets developers create multilingual sites with better support in core. Improvements include a better translation interface, language maintenance options, site translations and customizations. Twig Drupal 8 relies on the PHP template engine called Twig, which lends to a faster, more flexible, and more secure performance. Twig ties in nicely with Symfony's class-based approach. Mobile-ready Mobile isn't going away, it's here to stay, which is why Drupal 8 makes sure it's as mobile- ready as can be. Optimizing core themes and modules, Drupal 8 makes it a breeze to create a mobile experience that's responsive and intuitive regardless of the device being used. Drupal 8
  • 45. Author: Italo Mairo - @ All right reserved italomairo.com WYSIWYG Editor Drupal 8 ships with the CKEditor WYSIWYG editor in the default installation. In addition to supporting what you’d expect in a WYSIWYG editor— buttons for bold, italic, images, links, and so on—it supports extras, such as easily editable image captions, thanks to CKEditor’s new Widgets feature, developed specifically for Drupal’s use. It is fully integrated into Drupal 8, from user roles and permissions to image management, and it ensures that we keep the benefits of Drupal’s structured content concepts in our WYSIWYG implementation. Drupal 8 New Features in Core (source: Acquia - The Ultimate Guide to Drupal 8)
  • 46. Author: Italo Mairo - @ All right reserved italomairo.com Quick Edit - In-place Editing Drupal 8’s in-place editing feature allows editors to click into any eld within a piece of content, anywhere it appears on the front- end of the site and edit it right there, without ever visiting the back-end editing form. Full node content, user profiles, custom blocks, and more are all editable in-place as well. To replace Drupal 7’s default editing behavior, which required a more time-consuming visit to the administrative back-end of the site, this in-place editing feature has been backported to Drupal 7 as the Quick Edit module. Drupal 8 New Features in Core (source: Acquia - The Ultimate Guide to Drupal 8)
  • 47. Author: Italo Mairo - @ All right reserved italomairo.com Refreshed Admin Theme The Seven administrative theme in Drupal 8 is a visually refreshed version of Drupal 7’s, based on a formal style guide which can also be used by module developers and others concerned about backend usability. Draft Support in Core A draft revision-state for content is now has API support under- the-hood in Drupal 8 core. This will make publishing-work ow modules, like Workbench, much easier to implement in Drupal 8 and beyond. Drupal 8 New Features in Core (source: Acquia - The Ultimate Guide to Drupal 8)
  • 48. Author: Italo Mairo - @ All right reserved italomairo.com Mobile First Drupal 8 has been designed with mobile in mind, from the installer to the modules page. Even new features, such as in-place editing, are designed to work on the smallest of screens. The new search box on the modules page adds to your Drupal-8-on-mobile experience by saving you a lot of scrolling when you need to get to the settings for a particular module. Check out Module Filter for a similar experience in Drupal 7. Mobile-friendly Toolbar Drupal 8 sports a responsive administrative toolbar that automatically expands and orients itself horizontally on wide screens and collapses down to icons and orients itself vertically on smaller screens. Drupal 8 New Features in Core (source: Acquia - The Ultimate Guide to Drupal 8)
  • 49. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 8 also provides support for responsive tables with table columns that can be declared with high, medium, or low importance. 
 This API is also built into the Views module, so you can configure your own responsive admin screens. Responsive-ize ALL Things (Themes, Images, Tables...) To support the unimaginable array of Internet-enabled devices coming in the next 5+ years, Drupal 8 incorporates responsive design into everything it does. All core themes are now responsive and automatically reflow elements, such as menus and blocks, to fit well on mobile devices Images that show up large on a desktop shrink down to t on a tablet or smartphone, thanks to built-in support for responsive images. Drupal 8 New Features in Core (source: Acquia - The Ultimate Guide to Drupal 8)
  • 50. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Multilingual First Drupal 8 is a CMS built from the ground up for multilingual use. You can perform your entire site installation and setup in your language of choice. Right on the installer page, it auto-detects your browser’s language and auto- selects that language for installation in the drop-down for your convenience. When you install Drupal in any language other than English (or later add a new language to your site), Drupal 8 automatically downloads the latest interface translations from localize.drupal.org in your language, too. This works for right-to- left languages, such as Arabic and Hebrew, too. Drupal 8 does away with the previous Drupal-concept of English as a “special” language. If you select a language other than English on installation, the English option will no longer show in your site configuration unless explicitly turned on. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8)
  • 51. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Multilingual First - Fewer Modules, Packing a Bigger Punch Making a site multilingual in Drupal 8 requires nothing more than activating one or more of just four modules, all shipped with Drupal 8 core. These four modules do everything and more than the roughly 30 contributed modules of a Drupal 7 site multilingual. Language provides Drupal 8’s underlying language support. It is the base module and is required by the other multilingual modules. Configuration Translation makes things like blocks, menus, views, and so on, translatable. Content Translation makes things such as nodes, taxonomy terms, and comments translatable. Interface Translation makes Drupal’s user interface itself translatable. Language Selection Everywhere Everything from system configuration settings to site components, such as blocks, views, and menus, to individual eld values on content are translatable. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8)
  • 52. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Views in Core! The Views module, the most frequently used contributed module in Drupal, is now part of Drupal 8 core and is more tightly integrated into Drupal then ever before. Beyond providing a query-builder UI and serving up the results in a variety of formats for site visitors, baking Views into Drupal core allowed core developers to replace numerous previously hardcoded admin pages with Views listings. Everything you know and love from Views is included in Drupal 8 core—and even a few extras such as mobile-friendly administration, some user experience and accessibility improvements, the ability to create responsive table listings, and the ability to turn any listing into a REST export that can be consumed by a mobile application or other external service. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8)
  • 53. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core More and Better Blocks In Drupal 8, you’ll notice a few new features as they relate to blocks. First, just like with Views replacing admin pages, several previously hard-coded site components have been converted to blocks, including breadcrumbs, site name, and slogan. This makes it easier to adjust page organization in the user interface, and enables in-place editing, and makes for easier theming. A nice addition to Drupal 8 is the ability to re-use blocks. You can place a block in multiple places, for example, a “Navigation” block in both the header and footer. And finally, you can now create custom block types, just as you can create custom content types, to allow for granular control over different styling, different fields, and more. This allows you to create, for example, an “Ad” block type with an “Ad code” field that can contain JavaScript snippets from a remote ad service and then add and place as many di different blocks of that type on your site as you need. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8)
  • 54. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core More Field Types To build those data models, Drupal 8 includes a plethora of fundamental, semantic field types like Taxonomy, Image, and File, ecc. There are five completely new field types in the Drupal 8 core: • Date • Email • Link • Reference • Telephone Even the setting for whether comments are open or closed has been moved to a field, making any entity type comment-able. Fields are everywhere Not only are there new fields, but you can now add fields in many more places. You can add fields to nodes, blocks, comments, contact forms, taxonomy terms and users. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8)
  • 55. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 8 Form and render elements Render arrays "Render Arrays" or "Renderable Arrays" are the building blocks of a Drupal page. A render array is an associative array which conforms to the standards and data structures used in Drupal's Render API. The Render API is also integrated with the Theme API. In many cases, the data used to build a page (and all parts of it) is kept as structured arrays until the final stage of generating a response. This provides enormous flexibility in extending, slightly altering or completely overriding parts of the page. Render arrays are nested and thus form a tree. Consider them Drupal's "render tree" — Drupal's equivalent of the DOM. $page = [ '#type' => 'page', 'content' => [ 'system_main' => […], 'another_block' => […], '#sorted' => TRUE, ), 'sidebar_first' => [ … ], ];
  • 56. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Take a Tour Drupal 8’s new Tour module lets site builders create contextual, step-by-step tooltip-style walkthroughs of your site. It can help with overviews of administrative interfaces, introduce new terminology, and walk through the steps involved in configuring components of your site. Drupal 8 Both Less and More, Module-wise You’ll find Drupal 8 missing some modules that shipped with Drupal 7, namely Blog, Dashboard, Open ID, Overlay, PHP lter, Poll, Pro le, and Trigger (as well as the Garland theme). You’ll find several new modules in which functionality has been split out into more granular chunks, such as Menu Links/Menu UI, Block/ Custom Block, Ban/History/Actions (formally baked into User/Node/System module), and so on. (source: Acquia - The Ultimate Guide to Drupal 8)
  • 57. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core HTML5 All of Drupal’s output has been converted to use semantic HTML5 markup by default, as part of an overarching effort to clean up Drupal’s default markup. This means you’ll find tags such as <nav>, <header>,<main>, and <section> in Drupal’s default templates and you’ll find HTML5/CSS3 replacements for several things that previously needed custom workarounds: resizing on text areas and first/ last/odd/ even classes is now covered by CSS3 pseudo-selectors; and collapsible fieldsets largely replaced by the by the <details> element.
 New Front-end Libraries and Helpers Besides jQuery, Drupal 8 brings with it an expanded array of front-end libraries, for creating mobile-friendly, rich front-end applications in Drupal such as: Modernizr (detects if a browser supports touch or HTML5/CSS3 features) Underscore.js (a lightweight JS-helper library) Backbone.js (a model-view-controller JavaScript framework). Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Front-end Developer Improvements
  • 58. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Native Schema.Org Output In a great boon for search-engine optimization, Drupal 8’s RDFa module now outputs schema.org markup. This makes the task much easier for search engines such as Google, Yahoo!, Bing, and Yandex to extract and index data from your
 site because the schema.org markup is semantic. Even More Improved Accessibility Drupal 8 has expanded on Drupal 7’s existing stellar accessibility record with even more improvements. Drupal 8 extensively uses WAI-ARIA attributes to provide semantic meaning to elements. On the back-end, Drupal 8 provides a variety of new Accessibility tools for JavaScript (JS), which allow module developers to create accessible applications easily. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Front-end Developer Improvements
  • 59. Author: Italo Mairo - @ All right reserved italomairo.com New Features in Core Drupal 8 introduces Twig, a very widely adopted theme system in the PHP world, to Drupal. Twig’s syntax is simpler and Twig is more secure than the the PHPTemplate- based theme system in Drupal 7 and below that it replaces. It allows designers and themers with HTML/CSS knowledge to modify markup without needing to be a PHP expert and with almost no risk of their actions causing security issues on your site. With Twig, themers no longer need to understand the syntax differences between deeply-nested arrays and objects, nor when to use each. In Twig, a simple {{ foo.bar }} statement does the trick. Simple conditional and looping logic can be contained in {% ... %} tags. Drupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) New Theme System: Twig Front-end Developer Improvements
  • 60. Author: Italo Mairo - @ All right reserved italomairo.com <?php
 <main role=”main”> <a id=”main-content”></a>{# link is in html.html.twig #} <div class=”layout-content”> {{ page.highlighted }} {{ title_pre x }}
 {% if title %} <h1>{{ title }}</h1> {% endif %} {{ title_su x }} {{ tabs }} {% if action_links %}
 <nav class=”action-links”>{{ action_links }}</nav> {% endif %} {{ page.content }} {{ feed_icons }}
 </div>{# /.layout-content #} {% if page.sidebar_ rst %}
 <aside class=”layout-sidebar- rst” role=”complementary”> {{ page.sidebar_ rst }}
 </aside>
 {% endif %} {% if page.sidebar_second %}
 <aside class=”layout-sidebar-second” role=”complementary”> {{ page.sidebar_second }}
 </aside>
 {% endif %} </main> ?> New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Twig syntax Front-end Developer Improvements
  • 61. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Twig MVC security Twig effectively forces a separation of presentation and business logic, and all variables going into template files are automatically escaped, far reducing the risk of dangers like XSS vulnerabilities and making theming in Drupal 8 more secure than ever before. Twig Debug using debug: true; in your site’s services.yml file, helpful code comments will be displayed throughout Drupal’s generated markup to inform you where to find the template for the markup you’re trying to change, and which particular “theme suggestion” is being used to generate the markup. <div class=”content”>
 <!-- THEME DEBUG -->
 <!-- THEME HOOK: ‘node’ --> <!-- FILE NAME SUGGESTIONS: * node--1--full.html.twig
 * node--1.html.twig
 * node--article--full.html.twig
 * node--article.html.twig
 * node--full.html.twig
 x node.html.twig
 --> <!-- BEGIN OUTPUT from ‘core/themes/bartik/ templates/ node.html.twig’ --> <article data-history-node-id=”1” data-quickedit- entity- id=”node/1” role=”article” class=”contextual- region node node--type-article node--promoted node--view-mode-full clear x” about=”/node/1” typeof=”schema:Article”> ... Front-end Developer Improvements
  • 62. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Fast by Default Acquia’s own llama-loving performance guru Wim Leers posited that the best way to make the Internet as a whole faster is to make the leading CMSes fast by default. This means that CMS’s need to have their high-performance settings enabled out-of- the- box rather than require users to be savvy enough to find them in all their various locations. You’ll notice that Drupal 8 ships with features such as CSS and JavaScript aggregation already turned on for a much faster default installation. Huzzah! Drupal 8 ships with a sites/example. settings. local.php le for exactly this purpose. It hard codes the performance settings to o , which is extremely useful in a development environment. Simply copy it, rename it as sites/default/settings.local.php, and uncomment the following lines in sites/ default/settings.php: <?php
 # if ( file_exists(__DIR__ . ‘/settings.local.php’)) { # include __DIR__ . ‘/settings.local.php’;
 #}
 ?> Front-end Developer Improvements
  • 63. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) New Method of Selectively Adding JS/CSS to the Page Also helping out on the performance front, Drupal 8 has a new recommended best- practice for registering JS and CSS assets (along with their dependencies). Assets are de ned in your MODULE/THEME.libraries.yml le as a series of properties that you then reference in the #attached property of an element or render array. R.I.P. IE 6, 7, and 8 Another big improvement for front-end developers and designers is that Drupal 8 core has officially dropped support for IE 6, 7, and 8, enabling the use of jQuery 2.0 and other code that assumes modern HTML5/CSS3 browser support. Front-end Developer Improvements
  • 64. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 The Drupal 8’s new routing system, 
 totally replaces the routing parts of hook_menu() in Drupal 7. The path-to-page/access-check logic now lives in a YAML file using the same syntax as the Symfony routing system, as Drupal 8's routing system is heavily based on Symfony’s one, and both use the same syntax. The page callback logic now lives in a “Controller” class (as in the standard model- view-controller pattern) in a specially named folder (src), per the PSR-4 standard. New Symfony based Routing System example.name: path: '/example/{name}' defaults: _controller: 'DrupalexampleControllerExampleController::content' requirements: _permission: 'access content' Back-end Developer Improvements
  • 65. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) New Configuration Management System Probably the most looked-forward-to change in Drupal 8, for both developers
 and site builders, is the new configuration management system. In Drupal 7 and below, both content and configuration were saved to the database (sometimes with a mix of both in the same table), making deploying configuration changes from one environment to another (for example, development to production) very tricky. A variety of workarounds emerged for this, including hook_update_N(), Features module, and of course the old standby. In Drupal 8, all configuration changes (both standard admin settings forms, such as site name, as well as any ConfigEntity including Views, user roles, and content types) run through a unified Configuration API. Each environment has a “sync” directory to hold configuration changes from other environments that are about to be imported for review. For performance, active configuration is stored in a config table in the database, though the storage location is swappable. Back-end Developer Improvements
  • 66. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Configuration Sync Workflow Drupal 8 ships with a basic UI to do both single and full configuration imports and exports, and configuration can also be moved around via the command line with Drush’s config-* commands, which is handy when using version control systems such as Git. The basic work ow (after making whatever configuration changes to your Drupal 8 site) is: 1. On the development site, export your site’s configuration. You’ll receive a tarball that consists of lots of YAML files. 2. On production, import the files, which places them into the config “sync” area. 3. In the configuration UI, view the list of what configuration settings have changed and view a “diff” of changes in advance. 4. If the changes are acceptable, synchronize them, which will replace production’s current active store with the contents of the sync directory and become the new values that Drupal will use to build pages. Back-end Developer Improvements
  • 67. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Content Deployment Drupal 8.1 core ships with alpha-stability-support for migrating content such as nodes, users, and taxonomy terms between sites via the Migrate, Migrate Drupal, and the Migrate Drupal UI core experimental modules. Nonetheless, one welcome addition to Drupal 8 has been the introduction of UUIDs (universally unique identifiers) to every piece of content. These UUIDs can be used to determine whether a piece of content from a source site exists on a given destination site. This makes content imports/exports infinitely easier because even if source and destination sites have a node/100, for example, if the content is different, each will have a unique (obviously!) UUID. Deploy module for the Drupal 8 version provides this feature. If still on Drupal 7, you can get similar functionality to what core offers via the Universally Unique IDentifier module. Back-end Developer Improvements
  • 68. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Back-end Developer Improvements Entities, Entities, Everywhere! Entities were a key new feature and concept in Drupal 7, abstracting the ability to add fields to other types of content than just nodes, such as users and taxonomy terms. In Drupal 8, the Entity API has been completely overhauled to greatly improve
 the developer experience. All entities are now classed objects that implement a standard EntityInterface (no more guessing which of the 100 entity hooks you’re required to implement), with baked-in knowledge about the active language (to aid in translation and localization). Drupal 7 <?php
 # Inconsistent Drupal 7 code. $node->title $node- >body[$langcode][0][‘value’] ?> Drupal 8 <?php
 # Consistent Drupal 8 code. $node->get(‘title’)->value $node->get(‘body’)->value ?>
  • 69. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Back-end Developer Improvements Configuration and Content Entities Nearly anything you can create more than one of in Drupal 8 has been converted to an entity. There are two kinds of these entities: From a developer point of view it means that between the Entity
 API and the Configuration/State API, there is almost never a reason to create and manage your own database tables by hand in Drupal 8.
  • 70. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Back-end Developer Improvements Web Services A major focus for Drupal 8 is a native REST API built into Drupal 8 and supported by the RESTful Web Services suite of modules. These enable Drupal 8 to produce and consume web services for the creation of Drupal- powered mobile applications, facilitate cross-site communication, and allow better integration with third-party resources. The Drupal 8 REST API allows for fine-grained configuration of which resources should be available (nodes, taxonomy, users, and so on), what HTTP methods are allowed against those resources (for example, GET, POST, PATCH, DELETE), and which formats and authentication are used to access those resources. The contributed REST UI module provides an interface for this configuration. You can define which role(s) on your site may access resources via each allowed HTTP method. Drupal 8 ships with the Guzzle PHP HTTP library, which gives us easy syntax to retrieve and post data to Drupal or to talk to third-party Web Services, such as Twitter or Github.
  • 71. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Back-end Developer Improvements Improved Caching Caching in Drupal 8 has been greatly improved across the board. Entity cache module is now in core, and Drupal Cache is based on Cacheability Metadata All things that either are directly renderable or are used to determine what to render provide cacheability metadata — ranging from access results to entities and URLs. Cacheability metadata consists of 3 properties: cache tags For dependencies on data managed by Drupal, like entities & configuration cache contexts For variations, i.e. dependencies on the request context cache max-age For time-sensitive caching, i.e. time dependencies
  • 72. Author: Italo Mairo - @ All right reserved italomairo.com New Features in CoreDrupal 8 (source: Acquia - The Ultimate Guide to Drupal 8) Back-end Developer Improvements Big Pipe Activating the experimental BigPipe Module in Drupal 8.1 core improves the user experience for your site visitors by reducing the perceived page loading time. Drupal 7 can’t really cache its output because it lacks metadata for caching. In Drupal 7 (and just about every other CMS or framework), personalization has always made things run slower. Using BigPipe in Drupal 8, it is no longer so. Drupal 8 includes cacheability metadata and knows which parts of every page are static and which dynamic. BigPipe then sends the unchanging parts of a page to the browser immediately while rendering and delivering the dynamic parts later, as soon as
 they are ready. Essentially, your site visitors see what they came to see almost immediately—the main content and images, for example—while the uncacheable, personalized page elements (such as a shopping cart block) are delivered once rendered.
  • 73. Author: Italo Mairo - @ All right reserved italomairo.com Building ModulesDrupal 8 Back-end Developer Improvements Acquia - Building modules with Drupal 8 What is needed: • Understanding of programming in PHP • Familiarity with object-oriented programming (OOP) terminology ◦ Lesson 1 - Examples module, Symfony, Controllers, and the Menu ◦ Lesson 2 - Blocks, Configuration, and Forms ◦ Lesson 3 - Configuration forms and management ◦ Lesson 4 - Entities, Content Entities, and Configuration Entities ◦ Lesson 5 - Fields for entities ◦ Lesson 6 - Entity queries and loading entities ◦ Lesson 7 - Loading and editing fields ◦ Lesson 8 - Services, dependency injection, and service containers ◦ Lesson 9 - Creating Elements, Theming Elements, and Managing Front-end Libraries ◦ Lesson 10 - Unit and Functional Testing ◦ Lesson 11 - Review of Dependency Injection (source: Acquia Website)
  • 74. Author: Italo Mairo - @ All right reserved italomairo.com Preparing for Drupal 8Drupal 8 Here are several additional recommendations and procedures that you can use to prepare for Drupal 8's release: • Prepare your codebase for newer versions of PHP • Use object-oriented programming whenever possible • Implement autoloading • Move from features to configurations • Use Composer • Take advantage of Twig • Use an improved authoring experience backported from Drupal 8 What version of Drupal core should I use? How can I build a Drupal 8-friendly website using Drupal 7? (source: Acquia - The Ultimate Guide to Drupal 8)
  • 75. Author: Italo Mairo - @ All right reserved italomairo.com Migration PathDrupal 8 Drupal’s major version upgrade path has been replaced with a migration path, courtesy of a D8 port of the Migrate and Migrate Drupal-to-Drupal modules. As of Drupal 8.1, there is also a Migration UI in core, which allows major Drupal version migrations without resorting to command-line tools. Both a migration path from Drupal 6 (already in Drupal 8.x) and Drupal 7 (partially in 8.x and under development) are supported. Migrate to Drupal 8: A How-To Scan (Oct 2016) (source: Acquia - The Ultimate Guide to Drupal 8) Upgrade using the migration user interface Issues for Drupal Core - Migration Useful resources: Automated upgrading to Drupal 8
  • 76. Author: Italo Mairo - @ All right reserved italomairo.com Deciding When to UpgradeDrupal 8 The Drupal 8 Contrib Porting Tracker is a "centralized place for tracking the porting status of contributed projects." Basically, it's a Kanban board where you can check the upgrade status of a given Drupal module and/or you can provide additional information about projects for the community. https://contribkanban.com/board/contrib_tracker Supporting Tools (Modules Upgrade) Upgrade Status is a Drupal module that you can add to your site to collect information about the modules’ update status. D8upgrade is a free Web service that makes it as easy as possible to generate an upgrade report of your site. Drupal Project Usage Graph
  • 77. Author: Italo Mairo - @ All right reserved italomairo.com Drupal 8 Using Composer and GIT GIT •Using Composer in a Drupal project •Up and running a Drupal 8 project 
 using Composer and GIT $ cd /sites $ sudo composer create-project drupal-composer/drupal-project:8.x-dev
 my-drupal-site --stability dev --no-interaction To create a new Drupal project using Composer, type the following on the command line, where /sites/my-drupal-site is the desired code location:
  • 78. Author: Italo Mairo - @ All right reserved italomairo.com Drupal Using Composer •through Drupal.org •through Drupal Packagist Using Composer to install Drupal packages To install Drupal modules or themes for your site with composer, enter the following command at the root of your Drupal install: $ composer require drupal/<modulename> https://packagist.drupal-composer.org