SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Drupal 8Drupal 8
STORAGES OVERVIEWSTORAGES OVERVIEW
WHERE BETTER TO STORE OUR DATAWHERE BETTER TO STORE OUR DATA
ABOUT MEABOUT ME
ROMAN HRYSHKANYCHROMAN HRYSHKANYCH
Software Engineer at EPAM Systems
2,5 years in the IT industry and Drupal.
I`m perfectionist, so I prefer to do my work
qualitatively and I enjoy my work.
drupal.org/u/romixua
github.com/romixua
PRESENTATION IDEAPRESENTATION IDEA
$config = Drupal::configFactory()->getEditable('module_widget.settings');
if (time() >= $config->get('next_execution')) {
$config->set('next_execution', time() + $interval)->save();
/**1
* Implements hook_cron().2
*/3
function module_cron() {4
5
// Default to a daily interval.6
$interval = $config->get('interval');7
// We usually don't want to act every time cron runs (which could be every8
// minute) so keep a time for the next run in a variable.9
10
// ...11
// Set the next time this hook_cron should be invoked.12
13
}14
}15
CONTENT ENTITYCONTENT ENTITY
Content in Drupal 8 means the Entity API. Drupal
Entities are much rigidly structured. There are three
layers to the Entity API, conceptually:
Entity type
Entity bundle
Field
CONFIGURATIONCONFIGURATION
The Con guration system replaces the variables table,
the features module, half of the ctools module suite,
and the myriad custom tables that various modules
de ned in previous versions with a single, coherent,
robust way to store, manage, and deploy administrator-
provided con guration. All con gs stored in “con g”
database table and can be exported into (imported
from) YML les. According to the best practice con g
better name: module_name.con g_name
CONFIG SERVICECONFIG SERVICE
services:
config.factory:
class: DrupalCoreConfigConfigFactory
tags:
- { name: event_subscriber }
arguments: ['@config.storage', '@event_dispatcher', '@config.typed']
config.storage:
class: DrupalCoreConfigCachedStorage
arguments: ['@config.storage.active', '@cache.config']
config.storage.active:
class: DrupalCoreConfigDatabaseStorage
arguments: ['@database', 'config']
public: false
tags:
- { name: backend_overridable }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CONFIG FACTORYCONFIG FACTORY
DrupalCoreCon gCon gFactoryInterface
Name Description
get($name) DrupalCoreCon gImmutableCon g
getEditable($name) DrupalCoreCon gCon g
loadMultiple($names) DrupalCoreCon gImmutableCon g[]
rename($old_name, $new_name) Rename con gs
listAll($pre x = '') Return array of con g names
addOverride($con g_factory_override) Adds con g factory override services
CONFIG OBJECTCONFIG OBJECT
DrupalCoreCon gCon g (ImmutableCon g)
Name Description
get($key = '') Gets data from this con guration object
set($key, $value) Sets a value in this con guration object (Exception in immutable)
setData(array $data) Replaces the data of this con guration object
merge(array $data_to_merge) Merges data into a con guration object.
clear($key) Unsets a value in this con guration object (Exception in immutable)
delete() Deletes the con guration object (Exception in immutable)
save() Saves the con guration object (Exception in immutable)
getRawData() Gets the raw data without overrides
getCacheTags() The cache tags associated with this con g
CONFIG EXAMPLECONFIG EXAMPLE
/** @var DrupalCoreConfigConfigFactoryInterface $config_factory */
$config_factory = Drupal::service('config.factory');
$config_editable = $config_factory->getEditable('my_module.test');
$config_editable->set('key_1', 'value_1');
$config_editable->save();
$value = $config_editable->get('key_1');
$config = $config_factory->get('my_module.test');
$value_1 = $config->get('key_1');
1
2
3
4
5
6
7
8
9
CONFIG IN DATABASECONFIG IN DATABASE
Data stored in database table ‘con g’
collection name data
my_module.test [BLOB - 32 B]
core.extension [BLOB - 1.2 KB]
user.settings [BLOB - 604 B]
language.uk user.settings [BLOB - 42 B]
KEY VALUEKEY VALUE
Key value – is a storage, that consist from collections,
and can store values of any type, as they will be
serialized and unserialized automatically (However, not
all object types can be serialized).
KEY VALUE SERVICEKEY VALUE SERVICE
parameters:
factory.keyvalue:
default: keyvalue.database
services:
keyvalue:
class: DrupalCoreKeyValueStoreKeyValueFactory
arguments: ['@service_container', '%factory.keyvalue%']
keyvalue.database:
class: DrupalCoreKeyValueStoreKeyValueDatabaseFactory
arguments: ['@serialization.phpserialize', '@database']
1
2
3
4
5
6
7
8
9
10
KEY VALUE FACTORYKEY VALUE FACTORY
DrupalCoreKeyValueStoreKeyValueFactoryInterface
Name Description
get($collection) DrupalCoreKeyValueStoreKeyValueStoreInterface
All key value factories consist of gust one method –
get(), which returns collection object.
KEY VALUE STORAGEKEY VALUE STORAGE
DrupalCoreKeyValueStoreKeyValueStoreInterface
Name Description
getCollectionName() Returns the name of this collection
has($key) Check if key exists in the collection
get($key) Return collection item value
getMultiple($keys) Return collection multiple item values
getAll() Returns all stored key/value pairs in the collection
set($key, $value) Saves a value for a given key
setIfNotExists($key, $value) Saves a value for a given key if it does not exist yet
setMultiple($data) Saves key/value pairs.
rename($key, $new_key) Renames a key
delete($key) Deletes an item from the key/value store
deleteMultiple($keys) Deletes multiple items from the key/value store
deleteAll() Deletes all items from the key/value store
KEY VALUE EXAMPLEKEY VALUE EXAMPLE
/** @var DrupalCoreKeyValueStoreKeyValueFactoryInterface $key_value */
$key_value = Drupal::service('keyvalue');
/** @var DrupalCoreKeyValueStoreKeyValueStoreInterface $test_collection */
$test_collection = $key_value->get('test_collection');
$test_collection->set('key_1', 10);
$value = $test_collection->get('key_1');
$values = $test_collection->getAll();
$test_collection->delete('key_1');
1
2
3
4
5
6
7
8
KEY VALUE IN DATABASEKEY VALUE IN DATABASE
Data stored in database table ‘key_value’
collection name data
system.schema taxonomy [BLOB - 7 B]
system.schema text [BLOB - 7 B]
system.schema user [BLOB - 11 B]
state system.private_key [BLOB - 82 B]
state system.cron_last [BLOB - 13 B]
KEY VALUE EXPIRABLEKEY VALUE EXPIRABLE
Key value expirable – is a similar to key value storage
but values will get cleared, when key value age is over.
KEY VALUE EXPIRABLE SERVICEKEY VALUE EXPIRABLE SERVICE
parameters:
factory.keyvalue.expirable:
default: keyvalue.expirable.database
services:
keyvalue.expirable:
class: DrupalCoreKeyValueStoreKeyValueExpirableFactory
arguments: ['@service_container', '%factory.keyvalue.expirable%']
keyvalue.expirable.database:
class: DrupalCoreKeyValueStoreKeyValueDatabaseExpirableFactory
arguments: ['@serialization.phpserialize', '@database']
1
2
3
4
5
6
7
8
9
10
KEY VALUE EXPIRABLE STORAGEKEY VALUE EXPIRABLE STORAGE
Key value expirable factory also have just one get($collection) function,
which returns Key value expirable storage
DrupalCoreKeyValueStoreKeyValueStoreExpirableInterface
Key value store expirable additional functions
Name Description
setWithExpire($key, $value, $expire) Saves a value for a given key with a time to live
setWithExpireIfNotExists($key, $value, $expire) Sets a value with a time to live if it does not yet exist
setMultipleWithExpire($data, $expire) Saves an array of values with a time to live
* $expire - the time to live for items, in seconds
KEY VALUE EXPIRABLE EXAMPLEKEY VALUE EXPIRABLE EXAMPLE
/** @var DrupalCoreKeyValueStoreKeyValueExpirableFactoryInterface $key_value */
$key_value = Drupal::service('keyvalue.expirable');
/** @var DrupalCoreKeyValueStoreKeyValueExpirableStoreInterface $test_collection */
$test_collection = $key_value->get('test_collection');
$test_collection->set('key_1', 10);
$test_collection->setWithExpire('key_2', 15, 400);
$value = $test_collection->get('key_1');
$values = $test_collection->getAll();
$test_collection->delete('key_1');
1
2
3
4
5
6
7
8
9
KEY VALUE EXPIRABLE IN DATABASEKEY VALUE EXPIRABLE IN DATABASE
Data stored in database table ‘key_value_expirable’
collection name data expire
test_collection key_1 [BLOB - 5 B] 2147483647
test_collection key_2 [BLOB - 5 B] 1548746620
STATESTATE
Storage for storing information about the system's
state, based on key value collection ‘state’. In state are
stored: last crone execution time, site install time,
system private key, etc. State storage also work in pair
with bootstrap cache, that improves performance and
prevent a huge number of database queries. Cache will
be created after value get, and will be invalidated after
value set. Best practice for keys name is –
module_name.key_name
STATE SERVICESTATE SERVICE
services:
state:
class: DrupalCoreStateState
arguments: ['@keyvalue']
1
2
3
4
STATE STORAGESTATE STORAGE
DrupalCoreStateStateInterface
Name Description
get($key) Returns the stored value for a given key
getMultiple($keys) Returns the stored key/value pairs for a given set of keys
set($key, $value) Saves a value for a given key
setMultiple($data) Saves key/value pairs
delete($key) Deletes an item
deleteMultiple($keys) Deletes multiple items
resetCache() Resets the static cache
STATE EXAMPLESTATE EXAMPLE
/** @var DrupalCoreStateStateInterface $state */
$state = Drupal::service('state');
$state->set('my_module.key_1', 'value_1');
$value = $state->get('my_module.key_1');
$state->delete('my_module.key_1');
1
2
3
4
5
USER PRIVATE TEMPSTOREUSER PRIVATE TEMPSTORE
Store based on key value expirable storage. For one key
value is individual for each user. The mostly uses for
multiple steps forms, previews before saving and
con rmation forms.
USER PRIVATE TEMPSTORE SERVICEUSER PRIVATE TEMPSTORE SERVICE
parameters:
tempstore.expire: 604800 # 7 days
services:
tempstore.private:
class: DrupalCoreTempStorePrivateTempStoreFactory
arguments: ['@keyvalue.expirable', '@lock', '@current_user', '@request_stack',
tags:
- { name: backend_overridable }
1
2
3
4
5
6
7
8
USER PRIVATE TEMPSTOREUSER PRIVATE TEMPSTORE
DrupalCoreTempStorePrivateTempStoreFactory
User private tempstore factory have just one get($collection) function,
which returns private temp store
DrupalCoreTempStorePrivateTempStore
Name Description
get($key) Retrieves a value from this PrivateTempStore for a given key
set($key, $value) Stores a particular key/value pair in this PrivateTempStore.
getMetadata($key) Returns the metadata associated with a particular key/value pair
delete($key) Deletes data from the store for a given key
USER PRIVATE TEMPSTORE EXAMPLEUSER PRIVATE TEMPSTORE EXAMPLE
/** @var DrupalCoreTempStorePrivateTempStoreFactory $temp_store */
$temp_store = Drupal::service('tempstore.private');
/** @var DrupalCoreTempStorePrivateTempStore $test_collection */
$test_collection = $temp_store->get('test_collection');
$node = Node::create([
'type' => 'article',
'title' => 'Article Title',
]);
$test_collection->set('article', $node);
$node = $test_collection->get('article');
$node->save();
$test_collection->delete('article');
1
2
3
4
5
6
7
8
9
10
11
12
13
USER PRIVATE TEMPSTORE IN DATABASEUSER PRIVATE TEMPSTORE IN DATABASE
Data stored in database table ‘key_value_expirable’
collection name data expire
tempstore.private.test_collection 1:article [BLOB - 2.5 KB] 1559266848
tempstore.private.test_collection w7bNdnm0Us:article [BLOB - 2.5 KB] 1559267088
USER SHARED TEMPSTOREUSER SHARED TEMPSTORE
As a user private temp store also based on key value
expirable storage. The value is one for all user, but also
records key value pair owner. he mostly uses view, page
manager, search index elds changes before saving.
USER SHARED TEMPSTORE SERVICEUSER SHARED TEMPSTORE SERVICE
parameters:
tempstore.expire: 604800 # 7 days
services:
tempstore.shared:
class: DrupalCoreTempStoreSharedTempStoreFactory
arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%tempstore.expi
tags:
- { name: backend_overridable }
1
2
3
4
5
6
7
8
USER SHARED TEMPSTOREUSER SHARED TEMPSTORE
DrupalCoreTempStoreSharedTempStoreFactory
User shared tempstore factory have just one get($collection) function,
which returns shared temp store
DrupalCoreTempStoreSharedTempStore
Shared temp store additional functions
Name Description
getIfOwner($key) Retrieves a value from this SharedTempStore if the value is owned by this user
setIfOwner($key, $value) Set a value to SharedTempStore if it does not exist yet or is owned by this user
USER SHARED TEMPSTORE EXAMPLEUSER SHARED TEMPSTORE EXAMPLE
/** @var DrupalCoreTempStoreSharedTempStoreFactory $temp_store */
$temp_store = Drupal::service('tempstore.shared');
/** @var DrupalCoreTempStoreSharedTempStore $test_collection */
$test_collection = $temp_store->get('test_collection');
$data = [
'key_1' => 'value_1',
'key_2' => 'value_2',
];
$test_collection->set('options', $data);
$options = $test_collection->get('options');
1
2
3
4
5
6
7
8
9
10
11
USER SHARED TEMPSTORE IN DATABASEUSER SHARED TEMPSTORE IN DATABASE
Data stored in database table ‘key_value_expirable’
collection name data expire
tempstore.shared.test_collection options [BLOB - 135 B] 1559279349
tempstore.shared.views news [BLOB - 10.8 KB] 1559281791
CACHECACHE
Uses for storing information which is also stored
somewhere else. Caches exist only to speed up data
retrieval.
CACHE SERVICESCACHE SERVICES
services:
cache_factory:
class: DrupalCoreCacheCacheFactory
arguments: ['@settings', '%cache_default_bin_backends%']
calls:
- [setContainer, ['@service_container']]
cache.backend.chainedfast:
class: DrupalCoreCacheChainedFastBackendFactory
arguments: ['@settings']
calls:
- [setContainer, ['@service_container']]
cache.backend.database:
class: DrupalCoreCacheDatabaseBackendFactory
arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings']
# Cache bins
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CACHE FACTORYCACHE FACTORY
DrupalCoreCacheCacheFactoryInterface
Name Description
get($bin) DrupalCoreCacheCacheBackendInterface
CACHE BINCACHE BIN
DrupalCoreCacheCacheBackendInterface
Name Description
get($cid) Returns data from the persistent cache
getMultiple($cids) Returns data from the persistent cache from array of cache IDs
set($cid, $data, $expire = -1, $tags = []) Stores data in the persistent cache
setMultiple($items) Store multiple items in the persistent cache
delete($cid) Deletes an item from the cache
deleteMultiple($cids) Deletes multiple items from the cache
deleteAll() Deletes all cache items in a bin
invalidate($cid) Marks a cache item as invalid
invalidateMultiple(array $cids) Marks cache items as invalid
invalidateAll() Marks all cache items as invalid
garbageCollection() Performs garbage collection on a cache bin
removeBin() Remove a cache bin
CACHE EXAMPLECACHE EXAMPLE
/** @var DrupalCoreCacheCacheFactoryInterface $cache_factory */
$cache_factory = Drupal::service('cache_factory');
/** @var DrupalCoreCacheCacheBackendInterface $cache */
$cache = $cache_factory->get('default');
$data = [
'key_1' => 'value_1',
'key_2' => 'value_2',
];
$tags = ['node_list', 'user_list'];
$cache->set('my_module.settings', $data, Cache::PERMANENT, $tags);
$value = $cache->get('my_module.settings');
1
2
3
4
5
6
7
8
9
10
11
CACHE BIN IN DATABASECACHE BIN IN DATABASE
Data stored in database table ‘cache_[bin name]’
cid data expire created serialized tags checksum
my_module.settings [BLOB - 58 B] -1 1558697024.380 1 node_list user_list 19
system.module.info [BLOB - 41.5 kB] -1 1558697022.429 1 node_list user_list 0
SESSIONSESSION
Using 'session' database table, also can store inside
different types of data, including ojects. This data
alwasy reads and writes durring each requsest.
SESSION EXAMPLESESSION EXAMPLE
public function storeGroupInput($input, $status) {
if (empty($this->options['group_info']['remember'])) {
return;
}
$view_id = $this->storage->id();
$display_id = $this->current_display;
if (
$status === FALSE &&
isset($_SESSION['views'][$view_id][$display_id])
) {
$session = &$_SESSION['views'][$view_id][$display_id];
}
if ($status !== FALSE) {
if (!isset($_SESSION['views'][$view_id][$display_id])) {
$_SESSION['views'][$view_id][$display_id] = [];
}
$session = &$_SESSION['views'][$view_id][$display_id];
$filter_id = $this->options['group_info']['identifier'];
$session[$filter_id] = $input[$filter_id];
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SESSION IN DATABASESESSION IN DATABASE
Data stored in database table ‘session’
uid sid hostname timestamp session
1 2abhmLE-98a4wRGPOjf252Eun9KvnucJERjEuMP50XM 127.0.0.1 1558684777 [BLOB - 179 B]
0 tm_ej0wNUjeF9suW0vdwjihXPJcMDah2n37oupb6v-U 127.0.0.1 1558662288 [BLOB - 159 B]
CONCLUSIONCONCLUSION
Structured data, which can be created by users, different on each environment and
should have ability to search data by different conditions - content entity
This data are already stored somewhere, but we need to improve performance
during receiving of this data - cache
Some system property that should be different on each environment - state
Some settings that should be deployed to all environment - con guration
Temporary data, that should be accessible by key and individual for each user -
private tempstore
Permanent data, that should be accessible by key and different on each
environment - key value
THANK YOU FOR ATTANTIONTHANK YOU FOR ATTANTION
SOURCESSOURCES
https://www.palantir.net/blog/d8ftw-storing-data-drupal-8
https://www.anubavam.com/blogs/how-store-session-data-drupal-8
https://www.drupal.org/docs/8/api/state-api/overview
https://www.drupal.org/docs/8/api/con guration-api/con guration-api-overview
https://www.drupal.org/docs/8/api/con guration-api/overview-of-con guration-vs-other-types-of-information
https://www.drupal.org/docs/8/api/con guration-api/con guration-storage-in-drupal-8
https://antistatique.net/en/we/blog/2016/06/14/drupal-8-differences-between-con guration-api-state-api
https://www.valuebound.com/resources/blog/a-beginners-guide-to-caching-drupal-8

Contenu connexe

Tendances (20)

Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git basics
Git basicsGit basics
Git basics
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git
GitGit
Git
 
Github basics
Github basicsGithub basics
Github basics
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Hibernate
HibernateHibernate
Hibernate
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Server-Sent Events in Action
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in Action
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 

Similaire à DRUPAL 8 STORAGES OVERVIEW

dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011camp_drupal_ua
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?Alexandru Badiu
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownpartsBastian Feder
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and BeyondJochen Rau
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsBastian Feder
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutesBarang CK
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 MinutesAzim Kurt
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Developmentjsmith92
 
DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7chuvainc
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in actionJace Ju
 
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsAdding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsSam Hennessy
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownpartsBastian Feder
 
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitinternational PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitsmueller_sandsmedia
 
The Origin of Lithium
The Origin of LithiumThe Origin of Lithium
The Origin of LithiumNate Abele
 

Similaire à DRUPAL 8 STORAGES OVERVIEW (20)

dcs plus Catalogue 2015
dcs plus Catalogue 2015dcs plus Catalogue 2015
dcs plus Catalogue 2015
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
Nickolay Shmalenuk.Render api eng.DrupalCamp Kyiv 2011
 
What's new in the Drupal 7 API?
What's new in the Drupal 7 API?What's new in the Drupal 7 API?
What's new in the Drupal 7 API?
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
PhpUnit - The most unknown Parts
PhpUnit - The most unknown PartsPhpUnit - The most unknown Parts
PhpUnit - The most unknown Parts
 
Separation of concerns - DPC12
Separation of concerns - DPC12Separation of concerns - DPC12
Separation of concerns - DPC12
 
laravel tricks in 50minutes
laravel tricks in 50minuteslaravel tricks in 50minutes
laravel tricks in 50minutes
 
50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes50 Laravel Tricks in 50 Minutes
50 Laravel Tricks in 50 Minutes
 
Drupal7 dbtng
Drupal7  dbtngDrupal7  dbtng
Drupal7 dbtng
 
Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
 
SPL: The Missing Link in Development
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Development
 
DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7DrupalCamp Foz - Novas APIs Drupal 7
DrupalCamp Foz - Novas APIs Drupal 7
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
 
Spl Not A Bridge Too Far phpNW09
Spl Not A Bridge Too Far phpNW09Spl Not A Bridge Too Far phpNW09
Spl Not A Bridge Too Far phpNW09
 
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsAdding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy Applications
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitinternational PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
 
The Origin of Lithium
The Origin of LithiumThe Origin of Lithium
The Origin of Lithium
 

Plus de DrupalCamp Kyiv

Speed up the site building with Drupal's Bootstrap Layout Builder
Speed up the site building with Drupal's Bootstrap Layout BuilderSpeed up the site building with Drupal's Bootstrap Layout Builder
Speed up the site building with Drupal's Bootstrap Layout BuilderDrupalCamp Kyiv
 
Performance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthousePerformance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthouseDrupalCamp Kyiv
 
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...DrupalCamp Kyiv
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...DrupalCamp Kyiv
 
THE INTERNET OF THINGS IS GETTING REAL
THE INTERNET OF THINGS IS GETTING REALTHE INTERNET OF THINGS IS GETTING REAL
THE INTERNET OF THINGS IS GETTING REALDrupalCamp Kyiv
 
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLD
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLDFRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLD
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLDDrupalCamp Kyiv
 
DRUPAL AND ELASTICSEARCH
DRUPAL AND ELASTICSEARCHDRUPAL AND ELASTICSEARCH
DRUPAL AND ELASTICSEARCHDrupalCamp Kyiv
 
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...DrupalCamp Kyiv
 
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICES
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICESONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICES
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICESDrupalCamp Kyiv
 
1-1 MEETING: STEP-BY-STEP-HOW-TO
1-1 MEETING: STEP-BY-STEP-HOW-TO1-1 MEETING: STEP-BY-STEP-HOW-TO
1-1 MEETING: STEP-BY-STEP-HOW-TODrupalCamp Kyiv
 
UX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONUX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONDrupalCamp Kyiv
 
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?DrupalCamp Kyiv
 
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERA
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERATECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERA
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERADrupalCamp Kyiv
 
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPALPROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPALDrupalCamp Kyiv
 
DRUPAL AUDITS MADE FASTR
DRUPAL AUDITS MADE FASTRDRUPAL AUDITS MADE FASTR
DRUPAL AUDITS MADE FASTRDrupalCamp Kyiv
 
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...DrupalCamp Kyiv
 
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONS
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONSSEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONS
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONSDrupalCamp Kyiv
 
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCE
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCEDEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCE
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCEDrupalCamp Kyiv
 

Plus de DrupalCamp Kyiv (20)

Speed up the site building with Drupal's Bootstrap Layout Builder
Speed up the site building with Drupal's Bootstrap Layout BuilderSpeed up the site building with Drupal's Bootstrap Layout Builder
Speed up the site building with Drupal's Bootstrap Layout Builder
 
Performance Monitoring with Google Lighthouse
Performance Monitoring with Google LighthousePerformance Monitoring with Google Lighthouse
Performance Monitoring with Google Lighthouse
 
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...
 
Upgrading to Drupal 9
Upgrading to Drupal 9Upgrading to Drupal 9
Upgrading to Drupal 9
 
THE INTERNET OF THINGS IS GETTING REAL
THE INTERNET OF THINGS IS GETTING REALTHE INTERNET OF THINGS IS GETTING REAL
THE INTERNET OF THINGS IS GETTING REAL
 
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLD
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLDFRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLD
FRONT-END COMPONENTS IN DRUPAL THEME. "KAIZEN" - DRUPAL 8 THEME FROM SKILLD
 
DRUPAL AND ELASTICSEARCH
DRUPAL AND ELASTICSEARCHDRUPAL AND ELASTICSEARCH
DRUPAL AND ELASTICSEARCH
 
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...
 
Blackfire Workshop
Blackfire WorkshopBlackfire Workshop
Blackfire Workshop
 
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICES
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICESONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICES
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICES
 
1-1 MEETING: STEP-BY-STEP-HOW-TO
1-1 MEETING: STEP-BY-STEP-HOW-TO1-1 MEETING: STEP-BY-STEP-HOW-TO
1-1 MEETING: STEP-BY-STEP-HOW-TO
 
UX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONUX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATION
 
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?
 
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERA
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERATECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERA
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERA
 
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPALPROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPAL
 
DRUPAL AUDITS MADE FASTR
DRUPAL AUDITS MADE FASTRDRUPAL AUDITS MADE FASTR
DRUPAL AUDITS MADE FASTR
 
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...
 
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONS
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONSSEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONS
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONS
 
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCE
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCEDEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCE
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCE
 

Dernier

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Dernier (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

DRUPAL 8 STORAGES OVERVIEW

  • 1. Drupal 8Drupal 8 STORAGES OVERVIEWSTORAGES OVERVIEW WHERE BETTER TO STORE OUR DATAWHERE BETTER TO STORE OUR DATA
  • 2. ABOUT MEABOUT ME ROMAN HRYSHKANYCHROMAN HRYSHKANYCH Software Engineer at EPAM Systems 2,5 years in the IT industry and Drupal. I`m perfectionist, so I prefer to do my work qualitatively and I enjoy my work. drupal.org/u/romixua github.com/romixua
  • 3. PRESENTATION IDEAPRESENTATION IDEA $config = Drupal::configFactory()->getEditable('module_widget.settings'); if (time() >= $config->get('next_execution')) { $config->set('next_execution', time() + $interval)->save(); /**1 * Implements hook_cron().2 */3 function module_cron() {4 5 // Default to a daily interval.6 $interval = $config->get('interval');7 // We usually don't want to act every time cron runs (which could be every8 // minute) so keep a time for the next run in a variable.9 10 // ...11 // Set the next time this hook_cron should be invoked.12 13 }14 }15
  • 4. CONTENT ENTITYCONTENT ENTITY Content in Drupal 8 means the Entity API. Drupal Entities are much rigidly structured. There are three layers to the Entity API, conceptually: Entity type Entity bundle Field
  • 5. CONFIGURATIONCONFIGURATION The Con guration system replaces the variables table, the features module, half of the ctools module suite, and the myriad custom tables that various modules de ned in previous versions with a single, coherent, robust way to store, manage, and deploy administrator- provided con guration. All con gs stored in “con g” database table and can be exported into (imported from) YML les. According to the best practice con g better name: module_name.con g_name
  • 6. CONFIG SERVICECONFIG SERVICE services: config.factory: class: DrupalCoreConfigConfigFactory tags: - { name: event_subscriber } arguments: ['@config.storage', '@event_dispatcher', '@config.typed'] config.storage: class: DrupalCoreConfigCachedStorage arguments: ['@config.storage.active', '@cache.config'] config.storage.active: class: DrupalCoreConfigDatabaseStorage arguments: ['@database', 'config'] public: false tags: - { name: backend_overridable } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  • 7. CONFIG FACTORYCONFIG FACTORY DrupalCoreCon gCon gFactoryInterface Name Description get($name) DrupalCoreCon gImmutableCon g getEditable($name) DrupalCoreCon gCon g loadMultiple($names) DrupalCoreCon gImmutableCon g[] rename($old_name, $new_name) Rename con gs listAll($pre x = '') Return array of con g names addOverride($con g_factory_override) Adds con g factory override services
  • 8. CONFIG OBJECTCONFIG OBJECT DrupalCoreCon gCon g (ImmutableCon g) Name Description get($key = '') Gets data from this con guration object set($key, $value) Sets a value in this con guration object (Exception in immutable) setData(array $data) Replaces the data of this con guration object merge(array $data_to_merge) Merges data into a con guration object. clear($key) Unsets a value in this con guration object (Exception in immutable) delete() Deletes the con guration object (Exception in immutable) save() Saves the con guration object (Exception in immutable) getRawData() Gets the raw data without overrides getCacheTags() The cache tags associated with this con g
  • 9. CONFIG EXAMPLECONFIG EXAMPLE /** @var DrupalCoreConfigConfigFactoryInterface $config_factory */ $config_factory = Drupal::service('config.factory'); $config_editable = $config_factory->getEditable('my_module.test'); $config_editable->set('key_1', 'value_1'); $config_editable->save(); $value = $config_editable->get('key_1'); $config = $config_factory->get('my_module.test'); $value_1 = $config->get('key_1'); 1 2 3 4 5 6 7 8 9
  • 10. CONFIG IN DATABASECONFIG IN DATABASE Data stored in database table ‘con g’ collection name data my_module.test [BLOB - 32 B] core.extension [BLOB - 1.2 KB] user.settings [BLOB - 604 B] language.uk user.settings [BLOB - 42 B]
  • 11. KEY VALUEKEY VALUE Key value – is a storage, that consist from collections, and can store values of any type, as they will be serialized and unserialized automatically (However, not all object types can be serialized).
  • 12. KEY VALUE SERVICEKEY VALUE SERVICE parameters: factory.keyvalue: default: keyvalue.database services: keyvalue: class: DrupalCoreKeyValueStoreKeyValueFactory arguments: ['@service_container', '%factory.keyvalue%'] keyvalue.database: class: DrupalCoreKeyValueStoreKeyValueDatabaseFactory arguments: ['@serialization.phpserialize', '@database'] 1 2 3 4 5 6 7 8 9 10
  • 13. KEY VALUE FACTORYKEY VALUE FACTORY DrupalCoreKeyValueStoreKeyValueFactoryInterface Name Description get($collection) DrupalCoreKeyValueStoreKeyValueStoreInterface All key value factories consist of gust one method – get(), which returns collection object.
  • 14. KEY VALUE STORAGEKEY VALUE STORAGE DrupalCoreKeyValueStoreKeyValueStoreInterface Name Description getCollectionName() Returns the name of this collection has($key) Check if key exists in the collection get($key) Return collection item value getMultiple($keys) Return collection multiple item values getAll() Returns all stored key/value pairs in the collection set($key, $value) Saves a value for a given key setIfNotExists($key, $value) Saves a value for a given key if it does not exist yet setMultiple($data) Saves key/value pairs. rename($key, $new_key) Renames a key delete($key) Deletes an item from the key/value store deleteMultiple($keys) Deletes multiple items from the key/value store deleteAll() Deletes all items from the key/value store
  • 15. KEY VALUE EXAMPLEKEY VALUE EXAMPLE /** @var DrupalCoreKeyValueStoreKeyValueFactoryInterface $key_value */ $key_value = Drupal::service('keyvalue'); /** @var DrupalCoreKeyValueStoreKeyValueStoreInterface $test_collection */ $test_collection = $key_value->get('test_collection'); $test_collection->set('key_1', 10); $value = $test_collection->get('key_1'); $values = $test_collection->getAll(); $test_collection->delete('key_1'); 1 2 3 4 5 6 7 8
  • 16. KEY VALUE IN DATABASEKEY VALUE IN DATABASE Data stored in database table ‘key_value’ collection name data system.schema taxonomy [BLOB - 7 B] system.schema text [BLOB - 7 B] system.schema user [BLOB - 11 B] state system.private_key [BLOB - 82 B] state system.cron_last [BLOB - 13 B]
  • 17. KEY VALUE EXPIRABLEKEY VALUE EXPIRABLE Key value expirable – is a similar to key value storage but values will get cleared, when key value age is over.
  • 18. KEY VALUE EXPIRABLE SERVICEKEY VALUE EXPIRABLE SERVICE parameters: factory.keyvalue.expirable: default: keyvalue.expirable.database services: keyvalue.expirable: class: DrupalCoreKeyValueStoreKeyValueExpirableFactory arguments: ['@service_container', '%factory.keyvalue.expirable%'] keyvalue.expirable.database: class: DrupalCoreKeyValueStoreKeyValueDatabaseExpirableFactory arguments: ['@serialization.phpserialize', '@database'] 1 2 3 4 5 6 7 8 9 10
  • 19. KEY VALUE EXPIRABLE STORAGEKEY VALUE EXPIRABLE STORAGE Key value expirable factory also have just one get($collection) function, which returns Key value expirable storage DrupalCoreKeyValueStoreKeyValueStoreExpirableInterface Key value store expirable additional functions Name Description setWithExpire($key, $value, $expire) Saves a value for a given key with a time to live setWithExpireIfNotExists($key, $value, $expire) Sets a value with a time to live if it does not yet exist setMultipleWithExpire($data, $expire) Saves an array of values with a time to live * $expire - the time to live for items, in seconds
  • 20. KEY VALUE EXPIRABLE EXAMPLEKEY VALUE EXPIRABLE EXAMPLE /** @var DrupalCoreKeyValueStoreKeyValueExpirableFactoryInterface $key_value */ $key_value = Drupal::service('keyvalue.expirable'); /** @var DrupalCoreKeyValueStoreKeyValueExpirableStoreInterface $test_collection */ $test_collection = $key_value->get('test_collection'); $test_collection->set('key_1', 10); $test_collection->setWithExpire('key_2', 15, 400); $value = $test_collection->get('key_1'); $values = $test_collection->getAll(); $test_collection->delete('key_1'); 1 2 3 4 5 6 7 8 9
  • 21. KEY VALUE EXPIRABLE IN DATABASEKEY VALUE EXPIRABLE IN DATABASE Data stored in database table ‘key_value_expirable’ collection name data expire test_collection key_1 [BLOB - 5 B] 2147483647 test_collection key_2 [BLOB - 5 B] 1548746620
  • 22. STATESTATE Storage for storing information about the system's state, based on key value collection ‘state’. In state are stored: last crone execution time, site install time, system private key, etc. State storage also work in pair with bootstrap cache, that improves performance and prevent a huge number of database queries. Cache will be created after value get, and will be invalidated after value set. Best practice for keys name is – module_name.key_name
  • 23. STATE SERVICESTATE SERVICE services: state: class: DrupalCoreStateState arguments: ['@keyvalue'] 1 2 3 4
  • 24. STATE STORAGESTATE STORAGE DrupalCoreStateStateInterface Name Description get($key) Returns the stored value for a given key getMultiple($keys) Returns the stored key/value pairs for a given set of keys set($key, $value) Saves a value for a given key setMultiple($data) Saves key/value pairs delete($key) Deletes an item deleteMultiple($keys) Deletes multiple items resetCache() Resets the static cache
  • 25. STATE EXAMPLESTATE EXAMPLE /** @var DrupalCoreStateStateInterface $state */ $state = Drupal::service('state'); $state->set('my_module.key_1', 'value_1'); $value = $state->get('my_module.key_1'); $state->delete('my_module.key_1'); 1 2 3 4 5
  • 26. USER PRIVATE TEMPSTOREUSER PRIVATE TEMPSTORE Store based on key value expirable storage. For one key value is individual for each user. The mostly uses for multiple steps forms, previews before saving and con rmation forms.
  • 27. USER PRIVATE TEMPSTORE SERVICEUSER PRIVATE TEMPSTORE SERVICE parameters: tempstore.expire: 604800 # 7 days services: tempstore.private: class: DrupalCoreTempStorePrivateTempStoreFactory arguments: ['@keyvalue.expirable', '@lock', '@current_user', '@request_stack', tags: - { name: backend_overridable } 1 2 3 4 5 6 7 8
  • 28. USER PRIVATE TEMPSTOREUSER PRIVATE TEMPSTORE DrupalCoreTempStorePrivateTempStoreFactory User private tempstore factory have just one get($collection) function, which returns private temp store DrupalCoreTempStorePrivateTempStore Name Description get($key) Retrieves a value from this PrivateTempStore for a given key set($key, $value) Stores a particular key/value pair in this PrivateTempStore. getMetadata($key) Returns the metadata associated with a particular key/value pair delete($key) Deletes data from the store for a given key
  • 29. USER PRIVATE TEMPSTORE EXAMPLEUSER PRIVATE TEMPSTORE EXAMPLE /** @var DrupalCoreTempStorePrivateTempStoreFactory $temp_store */ $temp_store = Drupal::service('tempstore.private'); /** @var DrupalCoreTempStorePrivateTempStore $test_collection */ $test_collection = $temp_store->get('test_collection'); $node = Node::create([ 'type' => 'article', 'title' => 'Article Title', ]); $test_collection->set('article', $node); $node = $test_collection->get('article'); $node->save(); $test_collection->delete('article'); 1 2 3 4 5 6 7 8 9 10 11 12 13
  • 30. USER PRIVATE TEMPSTORE IN DATABASEUSER PRIVATE TEMPSTORE IN DATABASE Data stored in database table ‘key_value_expirable’ collection name data expire tempstore.private.test_collection 1:article [BLOB - 2.5 KB] 1559266848 tempstore.private.test_collection w7bNdnm0Us:article [BLOB - 2.5 KB] 1559267088
  • 31. USER SHARED TEMPSTOREUSER SHARED TEMPSTORE As a user private temp store also based on key value expirable storage. The value is one for all user, but also records key value pair owner. he mostly uses view, page manager, search index elds changes before saving.
  • 32. USER SHARED TEMPSTORE SERVICEUSER SHARED TEMPSTORE SERVICE parameters: tempstore.expire: 604800 # 7 days services: tempstore.shared: class: DrupalCoreTempStoreSharedTempStoreFactory arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%tempstore.expi tags: - { name: backend_overridable } 1 2 3 4 5 6 7 8
  • 33. USER SHARED TEMPSTOREUSER SHARED TEMPSTORE DrupalCoreTempStoreSharedTempStoreFactory User shared tempstore factory have just one get($collection) function, which returns shared temp store DrupalCoreTempStoreSharedTempStore Shared temp store additional functions Name Description getIfOwner($key) Retrieves a value from this SharedTempStore if the value is owned by this user setIfOwner($key, $value) Set a value to SharedTempStore if it does not exist yet or is owned by this user
  • 34. USER SHARED TEMPSTORE EXAMPLEUSER SHARED TEMPSTORE EXAMPLE /** @var DrupalCoreTempStoreSharedTempStoreFactory $temp_store */ $temp_store = Drupal::service('tempstore.shared'); /** @var DrupalCoreTempStoreSharedTempStore $test_collection */ $test_collection = $temp_store->get('test_collection'); $data = [ 'key_1' => 'value_1', 'key_2' => 'value_2', ]; $test_collection->set('options', $data); $options = $test_collection->get('options'); 1 2 3 4 5 6 7 8 9 10 11
  • 35. USER SHARED TEMPSTORE IN DATABASEUSER SHARED TEMPSTORE IN DATABASE Data stored in database table ‘key_value_expirable’ collection name data expire tempstore.shared.test_collection options [BLOB - 135 B] 1559279349 tempstore.shared.views news [BLOB - 10.8 KB] 1559281791
  • 36. CACHECACHE Uses for storing information which is also stored somewhere else. Caches exist only to speed up data retrieval.
  • 37. CACHE SERVICESCACHE SERVICES services: cache_factory: class: DrupalCoreCacheCacheFactory arguments: ['@settings', '%cache_default_bin_backends%'] calls: - [setContainer, ['@service_container']] cache.backend.chainedfast: class: DrupalCoreCacheChainedFastBackendFactory arguments: ['@settings'] calls: - [setContainer, ['@service_container']] cache.backend.database: class: DrupalCoreCacheDatabaseBackendFactory arguments: ['@database', '@cache_tags.invalidator.checksum', '@settings'] # Cache bins 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  • 38. CACHE FACTORYCACHE FACTORY DrupalCoreCacheCacheFactoryInterface Name Description get($bin) DrupalCoreCacheCacheBackendInterface
  • 39. CACHE BINCACHE BIN DrupalCoreCacheCacheBackendInterface Name Description get($cid) Returns data from the persistent cache getMultiple($cids) Returns data from the persistent cache from array of cache IDs set($cid, $data, $expire = -1, $tags = []) Stores data in the persistent cache setMultiple($items) Store multiple items in the persistent cache delete($cid) Deletes an item from the cache deleteMultiple($cids) Deletes multiple items from the cache deleteAll() Deletes all cache items in a bin invalidate($cid) Marks a cache item as invalid invalidateMultiple(array $cids) Marks cache items as invalid invalidateAll() Marks all cache items as invalid garbageCollection() Performs garbage collection on a cache bin removeBin() Remove a cache bin
  • 40. CACHE EXAMPLECACHE EXAMPLE /** @var DrupalCoreCacheCacheFactoryInterface $cache_factory */ $cache_factory = Drupal::service('cache_factory'); /** @var DrupalCoreCacheCacheBackendInterface $cache */ $cache = $cache_factory->get('default'); $data = [ 'key_1' => 'value_1', 'key_2' => 'value_2', ]; $tags = ['node_list', 'user_list']; $cache->set('my_module.settings', $data, Cache::PERMANENT, $tags); $value = $cache->get('my_module.settings'); 1 2 3 4 5 6 7 8 9 10 11
  • 41. CACHE BIN IN DATABASECACHE BIN IN DATABASE Data stored in database table ‘cache_[bin name]’ cid data expire created serialized tags checksum my_module.settings [BLOB - 58 B] -1 1558697024.380 1 node_list user_list 19 system.module.info [BLOB - 41.5 kB] -1 1558697022.429 1 node_list user_list 0
  • 42. SESSIONSESSION Using 'session' database table, also can store inside different types of data, including ojects. This data alwasy reads and writes durring each requsest.
  • 43. SESSION EXAMPLESESSION EXAMPLE public function storeGroupInput($input, $status) { if (empty($this->options['group_info']['remember'])) { return; } $view_id = $this->storage->id(); $display_id = $this->current_display; if ( $status === FALSE && isset($_SESSION['views'][$view_id][$display_id]) ) { $session = &$_SESSION['views'][$view_id][$display_id]; } if ($status !== FALSE) { if (!isset($_SESSION['views'][$view_id][$display_id])) { $_SESSION['views'][$view_id][$display_id] = []; } $session = &$_SESSION['views'][$view_id][$display_id]; $filter_id = $this->options['group_info']['identifier']; $session[$filter_id] = $input[$filter_id]; } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
  • 44. SESSION IN DATABASESESSION IN DATABASE Data stored in database table ‘session’ uid sid hostname timestamp session 1 2abhmLE-98a4wRGPOjf252Eun9KvnucJERjEuMP50XM 127.0.0.1 1558684777 [BLOB - 179 B] 0 tm_ej0wNUjeF9suW0vdwjihXPJcMDah2n37oupb6v-U 127.0.0.1 1558662288 [BLOB - 159 B]
  • 45. CONCLUSIONCONCLUSION Structured data, which can be created by users, different on each environment and should have ability to search data by different conditions - content entity This data are already stored somewhere, but we need to improve performance during receiving of this data - cache Some system property that should be different on each environment - state Some settings that should be deployed to all environment - con guration Temporary data, that should be accessible by key and individual for each user - private tempstore Permanent data, that should be accessible by key and different on each environment - key value
  • 46. THANK YOU FOR ATTANTIONTHANK YOU FOR ATTANTION
  • 47. SOURCESSOURCES https://www.palantir.net/blog/d8ftw-storing-data-drupal-8 https://www.anubavam.com/blogs/how-store-session-data-drupal-8 https://www.drupal.org/docs/8/api/state-api/overview https://www.drupal.org/docs/8/api/con guration-api/con guration-api-overview https://www.drupal.org/docs/8/api/con guration-api/overview-of-con guration-vs-other-types-of-information https://www.drupal.org/docs/8/api/con guration-api/con guration-storage-in-drupal-8 https://antistatique.net/en/we/blog/2016/06/14/drupal-8-differences-between-con guration-api-state-api https://www.valuebound.com/resources/blog/a-beginners-guide-to-caching-drupal-8