First impressions of Drupal8

I did take down some notes when I was given an awesome introduction to Drupal8, though we weren't actually doing anything at the time, so this is somewhat of a recap of what was talked about and see if it will stick.

Keep in mind this is the first time I actually use Drupal, I wrote down some notes during the introduction/lecture which I'm kind of reciting here but will of course not include anything here unless I've tried it out before publishing this post.

Installing with Composer

I covered this in my previous post, my experience of setting up a drupal project for the first time. Since Drupal had a big makeover so it would use the Symfony framework instead of it's own custom framework, which spells a bright future for the platform and easier to handle for developers (it lowers the threshold/entry level considerably I was told).

When finalizing the setup in browser after having installed the system, you get choices of what kind of installation you want.

  • Standard is very convenient for starting a project
  • Minimal is stripped of everything except the core modules (even the default theme looks like they forgot to link the stylesheet)
  • Demo is an example of using drupal to make a website for a recipe magazine.

Folder structure

  • /web contains accessible files, config goes into .gitignore by default along with the 'modules'. You would work in this folder and run the PHP server from here.
  • /vendor contains packages and everything that doesn't really involve the developer directly, just like the node_packages in javascript.

The Drupal8 GUI

You can actually manage your installation completely through the Graphical User Interface instead of the terminal, which I actually prefer. 

The admin section is located at /admin from the root in browser, so you can find it regardless of theme or setup.

  • Content: the basic add content to the website (uses existing content-types)
  • Structure: for the developer to create content types and structure the website. The information architecture.
    • Content types: such as article, basic pages, you can create new content types to suit your needs, such as art piece, recipe, game feature, or anything depending on the project.
    • Taxonomy: tags, categories...
    • Views: database query builder, how will the user see the requested content (can be pages or blocks).
    • The ds (display suite) module provides multiple new ways to view your content, such as full, card, teaser and more.
    • The paragraphs module is very handy, it is a site builder with content blocks.
  • Appearance: the theme of the website
    • Drupal uses something called 'twig' templates.
    • There are sites like templatemonster that sell themes.
  • Extend: the modules
    • Since drupal stays clean of unnecessary modules, you will need to fetch anything that you would like to add. No clutter of unused modules unless you installed them yourself.
    • The module_filter is recommended, it makes it easier to sort through what you've added/installed
    • The admin_toolbar_tools is almost a necessity for administrative convenience. It includes the admin_toolbar.
  • People: Users and roles

The Modules

If you've tried managing a WordPress installation, then these equal plugins within the drupal setup. And drupal installations stay very vanilla and do not include anything but the bare basics. If you need something then you can most likely find existing modules in the drupal database.

Drupal does not include a admin console straight out of the box, that's why we'll use admin_toolbar_tools as an example for installing a module. It will give you a admin toolbar (as the name suggests) at the top and some other tools, generally makes the site easier to manage.

adding modules via command line

You can use command line to manage the modules and there are a few ways to do it. Drupal8 seems to include the drush shell to manage the installation via command line, there is also the Drupal Console available which was recommended to me.

You can even use composer to fetch the module files for you (it does not install them automatically) which is handy if you already used it to install drupal8. Here is an example of adding a module using composer:

composer require drupal/admin_toolbar_tools

adding/installing modules via GUI

It is nice to use the GUI to install the modules and manage them, doesn't matter if you added the modules via terminal or uploaded the zip with the GUI. 

When I had the minimal setup and tried to install the admin_toolbar_tools, it told me that it needed to install other required modules and I could simply say continue with the action (and it would install the required) or cancel.

Conclusion...

Since I have never tried any versions of drupal prior to version 8, I don't see what's so difficult about using this CMS and perhaps that is the reward for that complete overhaul of the system to use symfony instead of it's own custom framework.

I shall continue playing with this, the project I am working on will have a forum and news/blog for a small community. I will need to dabble with creating a theme as well.