into to drupal8

24
Drupal 8 What’s coming? Piyuesh kumar QED42

Upload: piyuesh23

Post on 17-Jul-2015

106 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Into to drupal8

Drupal 8 What’s coming?

Piyuesh kumar QED42

Page 2: Into to drupal8
Page 3: Into to drupal8

AGENDA

√ Drupal 8 Directory Structure

√ Core Initiatives

√ Symfony Components

√ Q&A

Page 4: Into to drupal8

Drupal 8 Directory Structure

Lets take a look at it?

Page 5: Into to drupal8

Core Initiatives

√ Configuration Management

√ Web Services

√ Multilingual

√ HTML 5

√ Mobile

Page 6: Into to drupal8

Configuration Management

Page 7: Into to drupal8

Configuration Management

When to save configuration data?

√UI changes (automatic): When the save button is clicked on an admin page, data gets written to the active store as well as db.

√Code changes (manual): use admin/config/development/sync to sync the config in code with db and active store.

Page 8: Into to drupal8

Configuration Management

√ Advantages:√ No need to load the complete data from variables

table now. Use the config api to fetch only the required configs.

√ Easier to move configurations b/w dev and production instances.

Page 9: Into to drupal8

Example

// Load a set of configuration out of the active store.

// 'prefix.name' refers to the filename of the .yml file, without the extension.(prefix = module name and name = settings name)

$config = config('prefix.name');

// Access a single value out of the store.

echo $config->get('my.value');

// Change a value and save it back to both the active store and the filesystem.

$config->set('my.value’, 'my new value');

$config->save();

Page 10: Into to drupal8

Web Services

√ Exposes drupal content, making drupal a resful service provider.

√ Service module in core, even better…

√ Example:

curl -i -H "Accept: application/json" --cookie SESSxxx http://d8.dev.local/node/1

Page 11: Into to drupal8
Page 12: Into to drupal8

Multilingual√ Language selection while installation.

√ Translatable entities.

Page 13: Into to drupal8

HTML5$form['telephone'] = array(

'#type' => 'tel',

'#title' => t('Phone'),

);

$form['website'] = array(

'#type' => 'url',

'#title' => t('Website'),

);

$form['email'] = array(

'#type' => 'email',

'#title' => t('Email'),

);

Page 14: Into to drupal8
Page 15: Into to drupal8
Page 16: Into to drupal8

Mobile Initiative√ Responsiveness for all the drupal 8 themes.

√ Decoupling of layouts and themes.

√ Drupal being resful allows creating native apps also easier.

√ Everything is a block now.

Page 17: Into to drupal8
Page 18: Into to drupal8
Page 19: Into to drupal8
Page 20: Into to drupal8

Symfony Components

√ Class-Loader

√ Dependency-injection

√ Event Dispatcher

√ Http Foundation

√ Http Kernel

√ Routing

√ Yaml

√ Validator

√ Translation

√ Serializer

Page 21: Into to drupal8

Symfony Components

√ ClassLoader: Component loads your project classes automatically if they follow some standard PHP conventions.

√ Dependency Injection: component allows you to standardize and centralize the way objects are constructed in your application.

√ Event Dispatcher: component implements the Observer pattern in a simple and effective way to make all these things possible and to make your projects truly extensible.

Page 22: Into to drupal8

Symfony Components

√ HttpFoundation: Component defines an object-oriented layer for the HTTP specification.

√ HttpKernel: notifies events to convert a Request object to a Response one.

√ Routing: allows mapping from a URL pattern to a controller.

√ Yaml: loads and dumps yml files used for config management.

√ Serializer: Component is meant to be used to turn objects into a specific format (XML, JSON, Yaml, ...) and the other way around.

Page 23: Into to drupal8

Symfony components√ This component is based on the JSR-303 Bean

Validation specification and enables specifying validation rules for classes using XML, YAML, PHP or annotations, which can then be checked against instances of these classes.

√ Translation provides for internationalization. Helps in abstracting strings and other locale-specific pieces out of your application and into a layer where they can be translated and converted based on the user's locale

√ The Process Component executes commands in sub-processes.

Page 24: Into to drupal8

Thank You!!

Questions?