Upload
piyuesh23
View
115
Download
1
Tags:
Embed Size (px)
Citation preview
Drupal 8 What’s coming?
Piyuesh kumar QED42
AGENDA
√ Drupal 8 Directory Structure
√ Core Initiatives
√ Symfony Components
√ Q&A
Drupal 8 Directory Structure
Lets take a look at it?
Core Initiatives
√ Configuration Management
√ Web Services
√ Multilingual
√ HTML 5
√ Mobile
Configuration Management
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.
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.
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();
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
Multilingual√ Language selection while installation.
√ Translatable entities.
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'),
);
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.
Symfony Components
√ Class-Loader
√ Dependency-injection
√ Event Dispatcher
√ Http Foundation
√ Http Kernel
√ Routing
√ Yaml
√ Validator
√ Translation
√ Serializer
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.
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.
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.
Thank You!!
Questions?