What Google Code-In and Drupal meant to me

The more I learn, the more I realize how much I don’t know.

– Albert Einstein

Background

I was 13 years old the first time I got access to a computer. I had no idea how to connect it to the internet, but that didn’t stop me from experimenting. When I was 14, I saw a documentary about Google and discovered that “programming” and “coding” were completely different things than I’d thought. In that same documentary, I saw Google’s offices and I resolved to myself that I would try to visit them in person by the time I turned 18.

google_campus2_cropped1

Sigue leyendo

Drupal 8: Reviewing and updating diff module

I do not paint things, only the difference between things.

-Henri Matisse

Introduction

How many times you have used the command diff or  git diff  to compare files?. In the simplest case, diff compares and analyzes the content of two files and prints the lines that are different. Essentially, it outputs a set of instructions for how to change one file in order to make it identical to the second file.

However, in some determined cases (e.g. wikis and collaborative documentations) we could need to maintain revisions of the content in our site (a.k.a. revisions). Examples of this are Wikipedia and the Drupal.org site.

19.diff-wikipedia

20.diff-drupal

Sigue leyendo

Drupal 8 Web Services and Context Core (WSCCI) Initiative

Web services and mobile are more important than ever, and with that comes the need to have more flexible page and layout capabilities

– Dries Buytaert

Introduction

The future is a world where content management systems need to output data to many more devices and integrate with more and more systems and services. Drupal 7 (and previous) was optimized for outputting HTML and core ships with an old XML-RPC backend. If Drupal want to be the go-to platform in a world with many different devices and integrated services, it need fundamentally change that.

That is why Dries Buytaert identified the Web Services and Context Core Initiative (WSCCI) as one of the major initiatives for the Drupal 8 cycle. The goal of Drupal 8’s Web Service Initiative is to make Drupal equally good at outputting data as XML, JSON and other non-HTML formats, to expose Drupal’s functionality through a RESTful interface. The initiative’s Drupal group exclaims:

The Web Services and Context Core Initiative (WSCCI) aims to transform Drupal from a first-class CMS to a first-class REST server with a first-class CMS on top of it. To do that, we must give Drupal a unified, powerful context system that will support smarter, context- sensitive, easily cacheable block-centric layouts and non-page responses using a robust unified plugin mechanism.

Sigue leyendo

Testing accessibility of Drupal 8

The limit of bad usability is the lack of accessibility

– Sergio Lujan Mora

Accessibility refers to the design of products, devices, services, or environments for people with disabilities (How great wikipedia!)

Web accessibility means that people with disabilities can use the Web. More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web, and that they can contribute to the Web. Web accessibility also benefits others, including older people with changing abilities due to aging.

In this post I going to show some test that I have done in Drupal 8 about accessibility from 508 compliance until using a screen reader as ChromeVox.

drupal_accesibility

Sigue leyendo

Installing Drupal 8 on Ubuntu 14.04 with Nginx

Apache is like Microsoft Word, it has a million options but you only need six. Nginx does those six things, and it does five of them 50 times faster than Apache.

 Chris Lea

Introduction

The rise in popularity of nginx and the steady decline of Apache in the web server market has caused many to believe that the choice has become clear cut for new deployments.

The internet appears to have fallen out of love with Apache, the faithful workhorse that has dominated the landscape for the past decade plus. While Apache still powers the majority of websites out there, it has steadily lost ground to nginx (engine-x) over the past few years.

stadistics

In this guide, we’ll discuss how to get Drupal 8 installed on your Ubuntu 14.04 server with Nginex (I’ll do it with Kubuntu 14.04, but anyway it is going  to run on Ubuntu and derived).

Sigue leyendo

Porting a Drupal 7 module to Drupal 8 (a real life example) #5- css and js modifications

Drupal 8’s beta version was released a few month ago and now it is time to start porting modules. To demonstrate how to do it, we’re going to use a real module called scroll_to_top, which allow us to scroll to top when we are reading an article and we want to go to the menu for example.

If you prefer watching videos, here is the screencast version of this series.

In this chapter of the series we are going to make some bit changes in the css and javascript scripts that our module brings in the Drupal 7 version.

Sigue leyendo

Drupal 8 Configuration Management Initiative

Introduction

In Drupal 7 it isn’t always clear-cut whether something belongs in the “configuration” or “content” realm. Are vocabularies configuration? Are taxonomy terms configuration? And what about a taxonomy term whose ID is used as a contextual filter in a View?.

Another annoying issue with Drupal 7 is that modules are free to set their own standards for storing configuration, so it is common to find sites where configuration is scattered among variables, database tables, objects exported via CTools, Features, and other places. Modules like Features at times need some “black magic” to guess where and how relevant configuration is stored.

Inspired by this issues, Drupal community started an initiative, specifically the Configuration Management Initiative that have been working to solve them and thanks to this we have now an easy way to work with a great configuration system.

In Drupal 8, configuration is less subjective: Drupal has an “Export Configuration” function that exports all the site configuration (and of course you can “Import Configuration” to deploy them in another site easily); if something is not there, it is not considered to be configuration. And with this, it’s clear what is configuration and is not. 🙂

Sigue leyendo

Porting a Drupal 7 module to Drupal 8 (a real life example) #4- making it work (almost)

Drupal 8’s beta version was released a few month ago and now it is time to start porting modules. To demonstrate how to do it, we’re going to use a real module called scroll_to_top, which allow us to scroll to top when we are reading an article and we want to go to the menu for example.

If you prefer watching videos, here is the screencast version of this series.

In this chapter of the series we are going to make our module work by adding correctly css and javascript files that its need to show up the button when the user scroll down.

Sigue leyendo

Porting a Drupal 7 module to Drupal 8 (a real life example) #3- configuration form

Drupal 8’s beta version was released a few month ago and now it is time to start porting modules. To demonstrate how to do it, we’re going to use a real module called scroll_to_top, which allow us to scroll to top when we are reading an article and we want to go to the menu for example.

If you prefer watching videos, here is the screencast version of this series.

Drupal modules often provide an administrator with a settings page so that various configuration options can be tuned and setup using the web interface. In this chapter we are going to explore to create a configuration form and save values in the configuration management.

Sigue leyendo

Porting a Drupal 7 module to Drupal 8 (a real life example) #2- menu links and routing

Drupal 8’s beta version was released a few month ago and now it is time to start porting modules. To demonstrate how to do it, we’re going to use a real module called scroll_to_top, which allow us to scroll to top when we are reading an article and we want to go to the menu for example.

If you prefer watching videos, here is the screencast version of this series.

In Drupal 7, hook_menu() was probably the most implemented hook because it was used to define paths to Drupal and connect these paths with callback functions. It was also responsible for creating menu links and a bunch of other stuff, but they were replaced and in this second chapter we’re going to see how to port it.

 

Sigue leyendo