You are here

Introduce and overview Drupal 8

In mid-2014, the Drupal 8 version appeared with completely new features and methods, different from the Drupal 6 and Drupal versions 7. For those who have been quite proficient with previous Drupal versions before contact with Drupal 8 also cannot avoid being surprised.

Overview of Drupal 8

In mid-2014, the Drupal 8 version appeared with completely new features and methods, different from the Drupal 6 and Drupal versions 7. For those who have been quite proficient with previous Drupal versions before contact with Drupal 8 also cannot avoid being surprised.

So far, with the powerful community of Drupal, 1128 businesses and 3290 collaborators have developed, improved and released over 200 features with a completely new standard. This standard has created incredible digital content experiences not only for small and medium businesses but also for multinational businesses.

The outstanding points

A powerful set of tools: Drupal 8 is a powerful tool in the digital content management system. Can interact most with applications thanks to the web services available with REST priority. Use progressive decoupling to remove back-end constraints without sacrificing security and accessibility. Fast and effective transfer with enhanced caching capability for data objects (entities) and good integration with CDNs and reverse proxies. With Drupal 8, you can build almost every application, integrate and experience perfectly with any new idea as long as you have an idea and an idea.

Easy for editors: Drupal 8 can turn an interesting idea into a great experience. Leave your personal computer behind and experience creating compelling content on the most modern devices possible. Works effectively with preview function (preview) and upload image drag-drop function. And when you need a quick change, you can choose in-context editing and use only the tools you need.

Power for system managers: Modifying components such as Views, Lists, Blocks, admin tools, and many other things is much easier than before. Control the presentation of your data without writing any code. Content can be structured with a variety of data field types, such as field types, content types in particular increasing search engine friendliness (SEO-friendly) with the support of markup tags available from Schema.org. This makes creating and managing digital content an exciting experience like never before

Easy to use for everyone: Drupal 8 supports a wide range of standards to make it easy to use, not only for the contrast of color and font size but also for users to feel the smoothness. HTML5 (Semantic HTML5) helps you create more interactive, easier to reuse, and convert content dynamically (dynamic content). Furthermore, Drupal now applies more than the WAI-ARIA (Web Accessibility Internet - Accessible Rich Internet Applications) standards. This helps you create content that is easy to understand even for people with disabilities.

Harmonization in installation deployment: Fine-tune the installation configuration with a completely new management system. Moving the configuration settings between environments is extremely easy. That means that the complex deployment and maintenance deployment is also much simpler and better. Build a system with strict control over the integrity of Views, content types, user roles and more. Store configuration data consistently in a centralized place. The power to realize all of this has become a standard feature of Drupal.

Multilingual support: Choosing any of the hundreds of languages ​​is the first step in the installation process. Translate all software components such as taxonomy, comments (comments), configuration (configuration), image styles ... Enjoy the function Better browser language detection, easier right-to-left styling (righ-to-left styling), and built-in transliteration. You can build content that needs localization and is highly customizable. And they can be used to create surprising multinational experiences.

Maximize flexibility: With object-oriented code and applying the latest standards of PHP. Many of the most famous technologies are now part of Drupal 8. It integrates famous libraries such as Composer, Guzzle, and Symfony2 .., so you can write code and debug errors faster and accurately. . Drupal 8 completely eliminates PHPTemplate with a much easier way of writing code when creating themes with Twig. And using API has been simplified and strengthened for extensions (modules), interface templates (themes).

Analyze an example of access to Drupal 8

To add (add) new services belonging to the components of UserDataInterface.

Before we create a Directory for our module as:

alternative_userdata and name alternative_userdata.info.yml then define the information of this module as follows:

name: Alternative UserData
type: module
description: Adds alternative storage for user data.
core: 8.x
dependencies:
- user

So we have established: the name for the module, the module type, the description for the user module.
Then we define the service we will use, to do this just create a file named alternative_userdata.services.yml. In this file, we add the service to call the class in alternative_userdata.user.data as follows:

services:
alternative_userdata.user.data:
class: Drupal \ alternative_userdata \ AlternativeUserData

Next, we create classes in AlternativeUserData.php and add a folder named "src"

<? php
Drupal \ alternative_userdata namespace;
class AlternativeUserData implements UserDataInterface {
// Here you can create a new instance of your backend client.
}
public function get ($ module, $ uid = NULL, $ name = NULL) {
// This needs to return the user data from your backend.

}

public function delete ($ module = NULL, $ uid = NULL, $ name = NULL) {

// This needs to save your user data to your backend.
}

After we have a service defined in the module, it is possible to activate it, and when activated, it will not execute any commands until we map it to the services.yml file of the site.
Edit the services.yml file, usually located in the sites / default / services.yml directory and add:

services:
user.data:
alias: alternative_userdata.user.data
When Drupal uses user.data it will use service alternative_userdata.user.data from the module you created.