Book Image

Learning Drupal 8

By : Nick Abbott
Book Image

Learning Drupal 8

By: Nick Abbott

Overview of this book

Drupal 8 sets a new standard for ease of use, while offering countless new ways to tailor and deploy your content to the Web. Drupal 8 allows user to easily customize data structures, listings, and pages, and take advantage of new capabilities for displaying data on mobile devices, building APIs, and adapting to multilingual needs. The book takes you step by step through building a Drupal 8 website. Start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then move on to image and media handling, and extending Drupal modules. Push your knowledge by getting to grips with the modular nature of Drupal, and learning to extend it by adding new functionalities to create your new modules. By the end of the book, you will be able to develop and manage a modern and responsive website using Drupal.
Table of Contents (21 chapters)
Learning Drupal 8
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Some Drupal history


It all started in 1999 when the founder, Dries Buytaert, began working on a simple website that incorporated a message board software application while he was an undergraduate at the University of Antwerp. For the next 2 years, he and a small group of friends used and developed the as yet unnamed application. In January 2001, they named their creation Drupal, open sourced it, and started the Drupal.org community site.

The rest, as they say, is history. The community continues to grow at an ever-increasing rate and the attendance figures at the official Drupalcon conferences worldwide are testament to the developer community's interest.

Language choice

Drupal is written in the open source scripting language PHP.

Because of PHP's relative simplicity and its rather forgiving nature, it's the perfect language choice for the newcomer because it can be learned fairly quickly and can be "assimilated" gradually by dissecting existing Drupal modules. This is certainly true at least for the Drupal 7 core. Drupal 8 code being object oriented, on the other hand, is a somewhat different story because object orientation is a concept that can be initially difficult to grasp for those without prior training.

Is Drupal a framework or platform?

Drupal is not, as is commonly quoted, just a content management system (CMS). It's actually much more than that and we use the terms "framework" and "platform" quite deliberately in the opening paragraph to ignite the debate as to quite which of these Drupal is.

Once you've got to grips with the Drupal approach, you'll find that you can quickly and easily configure it as a content-management system. However, given its versatile and highly-bendable nature, you can in fact use it to build anything from a simple brochure-ware site to a fully-fledged web application with a huge community membership and which interfaces with a myriad enterprise services: Facebook, Twitter, Google, YouTube, Flickr, and whatever else is around the next corner.

The question still remains the same; is Drupal a framework—something with which we can build things, or is it a platform—something from which we launch other web products?

Let's say that we use Drupal to build a website that we intend to re-use over and over again as the basis for a collection of other sites. In this respect, what we have built is indeed a platform in its own right; a platform from which we can spawn all those other sites.

Let's say that we use Drupal to build a web application that integrates with a whole range of services in the wider world, again we have built a platform.

In both of the preceding examples, we created platforms, but in both cases, they are built on the Drupal framework.

Embracing other communities' frameworks

Drupal 8 is also a framework that openly embraces other open source frameworks: Symfony 2 (PHP), jQuery, Backbone, Modernizr, and Underscore (JavaScript) to name a few. The Drupal community does not seek to reinvent the wheel, but rather to integrate and build upon others' efforts and achievements.

How an open source community works

Software development based on the sharing and collaborative improvement of source code has a long history. In the late '90s, interest and participation in collaborative working increased markedly with two initiatives: the mainstream recognition of the Linux operating system and the release of the Netscape browser's source code.

Drupal likes to think of itself as a meritocracy, that is, those who are most influential in the community are those providing the best input, be it code, user experience, documentation, or otherwise. Neither individuals nor businesses can buy influence in the community, although they can of course achieve this by paying their staff to work on specific areas of interest.

The majority of people contributing to Drupal are doing so voluntarily in their own time. Some are sponsored by their employer, while some are just trying to solve a specific problem that interests them personally.

When contributing a new module to Drupal, the module's developer (also referred to as the maintainer) is entering into an informal agreement with the community that they will continue to maintain and update the module.

The mindset of the community is always to give back.

Those new to open source often struggle with this concept. There is a strange conflict that says "I don't want to give away my work"—when in fact your work is itself based on the unpaid efforts of thousands of others.

An appreciation of others' efforts is also key to the Drupal community. The Drupal issue queues are the place where bugs and feature requests are placed for both core and contributed modules. When reporting bugs, other community members are generally grateful for the efforts of the maintainer and offer constructive feedback or fixes.

People seem to understand that when you are not paying for something you don't have the right to be rude or disrespectful—although it's fair to say this should never be an option. That said, there can be heated discussions from time to time on contentious issues.