63
Make something amazing, for anyone

Introduction to Drupal 8 | X Crash Course

  • Upload
    x-team

  • View
    172

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Introduction to Drupal 8 | X Crash Course

Make something amazing, for anyone

Page 2: Introduction to Drupal 8 | X Crash Course

What is Drupal?

Drupal is open source content management software maintained and developed by a community of more than 35,000 developers around the world who have contributed to the project.

It is distributed under the terms of the GNU General Public License (or "GPL"), which means anyone is free to download it and share it with others.

Page 3: Introduction to Drupal 8 | X Crash Course

What is Open Source?

The defining principle of open source is that anyone can sell services and products created with the software, but not the software itself.

Page 4: Introduction to Drupal 8 | X Crash Course

Who uses Drupal?

...and more than a million other organizations

Page 5: Introduction to Drupal 8 | X Crash Course

Why is Drupal so widely used?

Put simply, it’s the quality of the software and the community behind it: hundreds of thousands of people around the world work on developing and maintaining the Drupal platform and ecosystem every second of every day.

This makes for an incredibly powerful, cutting-edge content management system (CMS).

Page 6: Introduction to Drupal 8 | X Crash Course

What is Drupal 8?

Drupal 8 is the latest release on the Drupal journey, and one that is substantially more powerful than previous versions.

Drupal 8 provides new ways to tailor and deploy content that looks great on any device. However you work with Drupal, there is something in Drupal 8 for you to love.

Page 7: Introduction to Drupal 8 | X Crash Course

In this presentation, you will learn:

● What's coming in Drupal 8 for… ○ End users and clients ○ Site builders ○ Designers and themers ○ Developers

● When can I use it?

Page 8: Introduction to Drupal 8 | X Crash Course

Drupal 8 improvements for end-users & clients

Page 9: Introduction to Drupal 8 | X Crash Course

Authoring experience

Page 10: Introduction to Drupal 8 | X Crash Course

Authoring improvement: WYSIWYG in Core

Page 11: Introduction to Drupal 8 | X Crash Course

Authoring improvement: In-place editing

Page 12: Introduction to Drupal 8 | X Crash Course

Authoring improvement: In-place editing

Page 13: Introduction to Drupal 8 | X Crash Course

Authoring improvement:New content creation page

Page 14: Introduction to Drupal 8 | X Crash Course

Authoring improvement:Preview on the frontend

Page 15: Introduction to Drupal 8 | X Crash Course

It’s mobile-first

Page 16: Introduction to Drupal 8 | X Crash Course

Responsive themes, images, breakpoints

Page 17: Introduction to Drupal 8 | X Crash Course

Mobile-friendly administration

Page 18: Introduction to Drupal 8 | X Crash Course

Represent this with a video. Maybe from Dries’ Prague slides? :)

AB: Submitted to the DA via their webform, since unfortunately it has to be on YouTube in order to reference from here. Bleh.

http://www.youtube.com/watch?v=ipOc1km2uEc

Improved accessibility

Page 19: Introduction to Drupal 8 | X Crash Course

Mobile-first “overlay”

Page 20: Introduction to Drupal 8 | X Crash Course

Drupal 8 improvements for site builders

Page 21: Introduction to Drupal 8 | X Crash Course

Improved page building: Everything is in blocks

Page 22: Introduction to Drupal 8 | X Crash Course

Improved page building: Place multiple copies of any block

Page 23: Introduction to Drupal 8 | X Crash Course

Improved Data Modeling Tools: New field types like Entity Reference

Page 24: Introduction to Drupal 8 | X Crash Course

…plus, Link, Phone, Email, Comments!

Improved Data Modeling Tools: New field types

Date/Datetime

Page 25: Introduction to Drupal 8 | X Crash Course

Fieldable blocks

Improved Data Modeling Tools: New entity types

Page 26: Introduction to Drupal 8 | X Crash Course

Form displays: customize the look and feel of data entry forms

Page 27: Introduction to Drupal 8 | X Crash Course

Views in Core

Page 28: Introduction to Drupal 8 | X Crash Course

Views = fully customizable...

With the Drupal 8 views, you can customize:

● Admin listings ● Sidebar content ● Image galleries ● Slideshows ● REST output

...with 0 lines of code!

Page 29: Introduction to Drupal 8 | X Crash Course

Restyled administration interface

Page 30: Introduction to Drupal 8 | X Crash Course

Multilingual improvements in Drupal 8

Page 31: Introduction to Drupal 8 | X Crash Course

Community translation downloads

Page 32: Introduction to Drupal 8 | X Crash Course

Language data tracking expanded

Page 33: Introduction to Drupal 8 | X Crash Course

Translation on (almost) everything

Page 34: Introduction to Drupal 8 | X Crash Course

Drupal 8 improvements for designers and themers

Page 35: Introduction to Drupal 8 | X Crash Course
Page 36: Introduction to Drupal 8 | X Crash Course

HTML5 Form Elements

Page 37: Introduction to Drupal 8 | X Crash Course

New front-end libraries

Page 38: Introduction to Drupal 8 | X Crash Course

Twig Example: node.html.twig<article{{ attributes }}> {{ title_prefix }} {% if not page %} <h2{{ title_attributes }}> <a href="{{ url }}" rel="bookmark">{{ label }}</a> </h2> {% endif %} {{ title_suffix }} {% if display_submitted %} <footer class="node__meta"> {{ author_picture }} <div class="node__submitted {{ author_attributes.class }}"{{ author_attributes|without('class') }}> {% trans %}Submitted by {{ author_name|passthrough }} on {{ date }}{% endtrans %} {{ metadata }} </div> </footer> {% endif %} <div class="node__content {{ content_attributes.class }}"{{ content_attributes|without('class') }}> {{ content|without('links') }} </div> {% if content.links %} <div class="node__links"> {{ content.links }} </div> {% endif %}</article>

1. HTML5 tags2. {{ print a variable }}3. {% logic(stuff) %}

Page 39: Introduction to Drupal 8 | X Crash Course

Native Schema.org Output

Page 40: Introduction to Drupal 8 | X Crash Course

Killed support for IE 6 & 7 (and most of 8)

Page 41: Introduction to Drupal 8 | X Crash Course

Drupal 8 improvements for developers

Page 42: Introduction to Drupal 8 | X Crash Course

Configuration management

dev stage production

Page 43: Introduction to Drupal 8 | X Crash Course
Page 44: Introduction to Drupal 8 | X Crash Course
Page 45: Introduction to Drupal 8 | X Crash Course

Let’s see it in action.

https://github.com/webchickenator/drupal8-demo

Page 46: Introduction to Drupal 8 | X Crash Course

Drush integration for automation

Page 47: Introduction to Drupal 8 | X Crash Course

Web services

other systems or frameworks

desktop

Android applications

other Drupal sites

Flash components

iPhone applications

kiosk applications

Page 48: Introduction to Drupal 8 | X Crash Course

● HttpFoundation ● HttpKernel● Dependency ● Injection ● EventDispatcher ● Routing ● Yaml

Symfony framework

Page 49: Introduction to Drupal 8 | X Crash Course

GETting data out of Drupal: RESTful Web Services module

Page 50: Introduction to Drupal 8 | X Crash Course

GETting data into Drupal: Guzzle

$client = \Drupal::httpClient();$config = \Drupal::config('3rdparty.settings');

// Format arguments for passing in URL.$arg = urlencode($argument);

// Pull data from 3rd party's REST API.$api_key = $config->get('api_key');$request = $client->get("http://3rdparty.com/$arg/?key=$api_key");

// Get the response and do something with it.$response = $request->send();$json = $response->json();

...

Page 51: Introduction to Drupal 8 | X Crash Course

Getting off the island

Page 52: Introduction to Drupal 8 | X Crash Course

Not invented here "Proudly Found Elsewhere"

● Much more modern, object-oriented code (classes, inheritance, interfaces, etc.)

● Embracing latest PHP standards (e.g. PSR-0, namespaces, traits)

● Using many “best of breed” external libraries: Composer, PHPUnit, Guzzle, Zend Feed Component...

Page 53: Introduction to Drupal 8 | X Crash Course

Catch all of the improvements!

https://drupal.org/list-changes

Page 54: Introduction to Drupal 8 | X Crash Course

Almost 3,300 people have

contributed to Drupal 8 so

far!

Page 55: Introduction to Drupal 8 | X Crash Course

When will Drupal 8 be released?

November 19th, 2015

Page 56: Introduction to Drupal 8 | X Crash Course

Drupal 8 Timeline

ReleaseAPI completionFeature development

Development opens

March 2011

Feature freezeDec 2012

Feature completeFeb 2013

API freezeJuly 2013

Drupal 8.0.0Nov 19 2015

AlphasDevelopment snapshots

BetasMajor APIs

locked down

RCsAPI and feature

complete

We are here

RC1Oct 2015

Page 57: Introduction to Drupal 8 | X Crash Course

https://drupal.org/contribute

Where do we need help?

● Migration path ● Port contributed modules/themes● Translate Drupal 8● DOCUMENTATION! ● EXAMPLES! ● TOOLS! ● TESTING, TESTING, TESTING!

Page 58: Introduction to Drupal 8 | X Crash Course

Alphas, (still have time tofix APIs!)

Betas/RCs (~late 2015)

Once these lines cross

(~2016)

Platform’s proven, but community’s

looking forward to Drupal 8.x/9.

Module / Theme Developer

Early Adopter / Launch in late-2015+

Late Adopter / Launch in 2016+

Conservative

When should I use Drupal 8?Keep your eyes on https://drupal.org/project/usage/drupal

Usa

ge

Page 59: Introduction to Drupal 8 | X Crash Course

What’s this 8.0.0 talk?

● Drupal 8 will use semantic versioning● Drupal 8.1.0 will include new features and/or

APIs● New releases will be (mostly) backwards

compatible● New 8.x releases every 6 months (planned)● No need to wait years for new things● Bugfixes in minor releases, eg. 8.1.5

Page 60: Introduction to Drupal 8 | X Crash Course

What about the upgrade path?

● Instead of an upgrade path, Drupal 8 will have a migration path!

● Some Drupal 6 migrations already in core, more in the works, see https://groups.drupal.org/imp

Page 61: Introduction to Drupal 8 | X Crash Course

What about contributed modules?

● Check status of contrib module upgrades at: drupal.org/project/contrib_tracker

● To avoid upgrade pain, stick to well-vetted contributed modules over custom code.

● Other tips: www.acquia.com/blog/getting-your-site-ready-drupal-8

Page 62: Introduction to Drupal 8 | X Crash Course

And my own modules?

● To start the upgrade of you own code, use drupal.org/project/drupalmoduleupgrader

● If you need to or want to start your module fresh, see drupal.org/project/console

Page 63: Introduction to Drupal 8 | X Crash Course