May 08 2017
May 08

The DrupalCamp Frankfurt 2017 took place on April 22 and 23 at the university Frankfurt/Bockenheim. But it kept some of us busy for quite a while in advance.

My colleagues Jan, Kerstin and I were part of the organizational team of the Drupal Camp in Frankfurt, and together with other members of the Drupal user group Rhein-Main and supporters from the Drupal e.V. and the community we did our best to make this weekend a great event for everyone involved. We already started with the rough planning of the event back in 2016, but it was not until the beginning of this year that we worked out the details. It is funny how – after months of planning – the event comes nearer and you suddenly realize that you’re running out of time. As usual when organizing an event, the last few weeks before the camp have been the most stressful for us, with everyone on the edge sometimes, a slack channel that didn’t stop blinking and lots of Google documents where we shared information about finances, sponsors, todos, …  But in the end, we got everything important done and still liked each other – I guess this already can be considered a success ;)

For the organizers the camp started on Friday afternoon, where we prepared everything at the university, for some people at the extended sprint, and for the rest it started on Friday evening at the Irish Pub. It was great to see all these Drupal people again, and we were really happy that so many joined us on Friday already.

On Saturday we started with our welcome session. Afterwards we heard the keynote from Antje Lorch, who talked about “Why you will be contributing to Drupal” and the importance of not only taking the advantages of an open source software, but also giving back – and that everyone of us is able to do so, not only coders, but also people who want to add translations, documentation, review patches, test issues etc.

After that, the regular sessions started – and I think we had some interesting topics for everyone. We’ve been really happy how many people submitted their session, so thanks again to everyone who shared a topic with us! Unfortunately I didn’t find the time to attend many of them, as there was a lot to do like welcoming attendees at the registration desk, checking the session rooms, refilling drinks, cooking coffee, preparing food, and just being around to help people who had questions. But of course I didn’t miss the session of our Cocomori Jose Luis Bellido, who talked about “Get the most out of display modes”. It was his first session held in English ever, and he did a really good job!

Saturday evening we had a get-together at the restaurant and bar Depot 1899 in Frankfurt, and the night ended in the well-known “Clubkeller” – it seems to become a good tradition.

The start on Sunday was a bit hard but still we managed to set up everything in time. Again the day was packed with interesting sessions and a lot of interesting talks with other community members. On this day I could only attend Ashish Jain’s session about “Women in Tech/Drupal”, where of course I have some personal interest in the topic. He talked about the opportunities that are given to women by his company based in India, and I think they already achieved a lot. Making women feel welcome in the tech area is an important topic, so I really appreciate that he came up with this session.

Some of our colleagues have attended a Drupal Camp for the first time. Some of them are real Drupal newbies, others already have good knowledge about Drupal. And I’m especially happy that all of those first time visitors liked the camp and the atmosphere a lot. Everyone found sessions that fit their level of knowledge and everyone enjoyed her/his stay – I think this demonstrates quite well how welcoming the community is and that everyone should take the chance and visit a camp or a local meetup if it’s somewhere near her/his place.

After all I’d like to thank the other members of the organizational team, all the helpers and supporters from the Drupal e.V. and the community, the speakers and sponsors, where of course I’d like to give a special thanks to Cocomore not only for being a silver sponsor but also for allowing us to dedicate some time to the organization of the event, and last but not least to everyone who attended. Without you this wouldn’t have been such a great weekend. See you soon at some of the following events like Drupal Business and Community Heidelberg on July 14-16, Drupal Summer Barcelona on June 29 to July 2 and DrupalCamp Schwerin on October 21 and 22

Apr 06 2017
Apr 06

In March, this year’s Drupal Developer Days, also simply known as DDD, took place in Seville, Spain. The Dev Days are an annual, international event organized by the Drupal community, which initially started in 2010 in Munich, Germany, and since then has travelled to several European cities through the years. The event attracts Drupal developers from all over the world, who get together to learn more about the latest Drupal developments and of course to code along the greatest minds of the community to continuously improve the CMS.

At Cocomore AG we supported this year’s event as Gold Sponsor because we think this kind of initiatives brings together the large community of developers as well as people mainly interested in Drupal itself and therefore helps to constantly improve and develop the CMS. And we feel it is our duty to support the people who make this all possible. Additionally, one of our team members, Jose Luis Bellido (jlbellido), was part of the organization team.

The overall topic for the Drupal Developer Days 2017 was the 500th anniversary of the first circumnavigation of the globe by Magellan. Not only were the logo and the website built around this idea, also the venue was chosen accordingly: It was an amazing fortress located in a theme park, and to help setting the mood the volunteers dressed as pirates. We happily joined the initiative with our tropical Cocomore stand, decorated with palms and parrots, and some stickers and cards designed to go along with the adventure theme.


Some job application cards we brought.

Personally, for me and my colleagues this were the highlights of this year’s DDD:

  • The venue, a replica of the fortress known as Ciudad Heróica of Cartagena de Indias: This was for sure the biggest highlight and a welcomed surprise for all attendees. An incredible and inspiring location that stands for expeditions and adventures.
  • All Keynotes were delivered by women: It’s a little bit too easy to find all-male lineups of speakers in tech events, and we are aware of how often brilliant women don’t get the recognition that they deserve. Therefore, we really appreciate the decision of the organizers to select four women to hold the keynotes.
  • All sprints in the same room: Due to the venue’s characteristics, all sprints, sponsors’ stands and sessions were located at the same place. It allowed the participants to share their experiences more easily.
  • Sessions and workshops: A high-quality and diverse selection of sessions and workshops was held during the whole week. Sessions such as Search and Beyond with Elastic Search or Challenges of using a single theme for a complex multi-site Drupal 8 installation, and workshops like Getting up to speed with testing on Drupal 8 are perfect examples of how enriching the Dev Days can be.


Last but not least, we would like to thank to the organizers and everybody who was involved on this amazing event, where we enjoyed a whole week in contact with other Drupal heroes/heroines and got many new ideas to apply to our projects.

Feb 13 2017
Feb 13

From A Small Start-up To The Big Agency - A Retrospective Of More Than A Decade Of Agency Life

Agency life - a term which brings about numerous results in social networks and search engines. After more than eleven years at Cocomore I came to understand the real meaning of this term. In short, working in an agency is a world of its own. Although I have to admit that my pool of comparative experiences is relatively limited and relates to university years, internship and my dissertation as well as statements of my wife, friends and clients. That is why it is time for me to get to know things from a different perspective and to leave Cocomore. Before I leave, I would like to share some of my experiences from the previous years. And who knows, maybe I will be able to contribute a follow-up of this article from a different perspective at some point.

Building our IT department

A decade is a very long time. But as always, if you are busy time flies by. And in fact I was never bored during my time at Cocomore. Working in an agency offers enough challenges, variety and momentum to prevent any kind of dullness or boredom. And I think this is exactly the reason I stayed for this long - in addition to my fantastic team. Sure, agency life can be very stressful at times as well, but this way I could learn a lot very quickly. A desk job where I'm just waiting for time to pass has always been a daunting thought to me.

My insight into agency life began at the end of 2005, when I started at Cocomore immediately after graduating with a media informatics major. At that time it was still a rather small agency with about 15 employees and some freelancers. The IT department was in the process of being set up and consisted of two permanent staff members (including me) and three student trainees. One of these students at the time is now our head of software development, by the way, and in charge of more than 20 employees. The degree of specialization was not as high as it is today either: in a small company everyone must be able to do everything for a fast and flexible work environment. My tasks were not limited to software development - I also took on administration tasks for web servers and the in-house infrastructure, supported the graphics department with image processing, and was also responsible for the design of IT projects as a consultant. In the course of time I gave up some of these tasks, and new ones were added.

With the increasing size of Cocomore and new technical possibilities, the subject areas of the agency and the employees’ fields of activity became more and more specialized - our work gained professionalism. I remember standing in the basement in front of the in-house mail server to get it running again at the beginning of my career (which I successfully did) - in times of cloud service providers and "software as a service" many IT experts will never face a situation like this. Even here at Cocomore, the mail system, which had caused the problem at that time, has been outsourced by now - and none of the colleagues have to run into the basement anymore for the regular server check-up.

There are, of course, plenty of anecdotes like this one. If, for example, I think about the last few weeks in our old building when Cocomore had grown drastically in contrast to the office space, and numerous people had to share a single DSL connection, I feel thrown back to sharing an apartment with several roommates during my studies. Later on we moved into our current building close to Frankfurt’s central station, which has an elevator, air-conditioned rooms and a dedicated leased line. So, some things have become more professional and better after the move. And while we used to occupy only one floor, we are now claiming 4 floors as well as two other locations for a current total of 160 employees.

In general, the comparison of an agency with apartment sharing is not too absurd in my opinion. You work together, you eat together, you empty and fill the dishwasher in the kitchen together and you party together (often). There were times when I saw my colleagues more than my wife. This is certainly also a factor that distinguishes working in an agency from public administration or a large corporation and owes the term "agency life" part of its meaning. Over the years it became clear to me that the almost family-like cohesion among colleagues strongly depends on the size of the company. Back in the day when there were only 15 people here, everybody knew each other and you saw each other daily in the corridor; with around 160 colleagues this is no longer the case. Although the roommate feeling from back then has been lost to some extent, the team spirit at Cocomore is still strong. This also applies across the globe: at the end of 2013, our office in Seville opened, where many of my direct colleagues from software development are based.

Technical innovations that changed my work as a developer

Over the past eleven years, work has changed not only due to the growing teams and structural changes, but also in terms of new departments and services. A lot has happened on a technological level as well. When I started at Cocomore, I was working on a central development server using FTP. In practice, this meant that all the developers who were there at the time were connected to the server and made their code adjustments there. The code was then copied from there to the test or live environment. Of course this did not always happen without complications - because if everyone is working in the same system, you have to communicate very well in order to avoid accidentally overwriting the code changes of a colleague.

Then CVS was introduced, a version management for code. Here the code of each developer was entered centrally and from there played to the different environments. It was progress, even though CVS handling was not exactly the best. But it prevented developers from interacting unintentionally. Subversion (SVN) followed, which was much better in terms of handling and offered the possibility to create development branches and thus to handle different software for different environments. Especially in the sometimes quite dynamic agency environment this was a great help. And then Git came. Actually, I cannot even imagine working with anything other than Git now. The ability to create feature-branches quickly and easily, to work decentralized and to re-assemble different development branches without any major effort has, in my opinion, revolutionized software development. And all those who still work with Subversion (if there is still anyone out there), I strongly advise to switch.

A lot has happened regarding IDEs for code editing as well. During those eleven years I have used quite a few different IDEs (if that is what you want to call all of them), from simple text editor in Windows, or vi(m) on Linux, to Eclipse, NetBeans, and PHPStorm. Like Git, I do not want to miss PHPStorm nowadays. In addition, the possibilities of software development, particularly in the area of PHP, have improved dramatically in recent years. When I think about the limited possibilities for developing at the time and what software development looks like in 2017, my decision is very much in favor of today's time. At least from the point of view of a developer not everything used to be better back in the days.

At the beginning I mentioned that I also used to take on tasks in administration at Cocomore. For a few years now we have had our own system administrators, who can do this much better than me. But I was still active in the DevOps area and responsible for deploying software or setting up MySQL replications. Here, too, a lot has changed: While in the past there were only physical servers, which were stored in a rack and could actually be touched, a lot is now regulated via virtual servers. Thanks to VMWare and Virtualbox you can easily and quickly create a new virtual environment and then throw it away immediately. And in times of Docker and the use of containers, the whole thing gets even better and faster. Never before has it been this easy to create environments and reject them. In combination with cloud service providers, a very efficient and cost-effective solution. In addition, there are many more developments, such as Jenkins, which can easily automate processes. Deployments are carried out today with one click. Previously, this required much more effort with manual procedures and checklists. If someone had told me this in 2005, I would have dismissed it as science fiction. And I am looking forward to the things yet to come.

Speaking of science fiction: During those eleven years there have been even more revolutionary upheavals. Ten years ago, for example, the smartphone made its way to the market. Before then, mobile surfing on the Internet was not really usable, especially since the trend initially went towards increasingly smaller mobile phones. I think, in 2005 I had a Nokia 3310. I could use it to make calls and write text messages on a green display. There was WAP for surfing on the internet, but that was expensive and far from today's standard. The smartphone has not only revolutionized the world for the users, but also for web development. In 2005 nobody spoke of Responsive Design. Today, almost every website is built this way, and the “mobile first” approach is very common.

Becoming part of the Drupal community

A very significant part of my work at Cocomore was also the development of Drupal. Prior to specializing in this, we had actually programmed everything ourselves. However, a new IT manager brought a breath of fresh air and the approach to fall back on already existing processes in order to be able to provide functions faster, cheaper and better. It was the obvious next step to use freely available software, which is continuously being tested and further developed by a large community - a concept that was plausible for everyone. I was involved in the decision-making process at the time and for a variety of reasons, the choice fell on Drupal. And we have not regretted this decision.

In early 2007 the 5.0 version just came out. With this new version, which still had one or another initial bugs, we decided to build a larger Web 2.0 customer portal on a Drupal basis. We had accomplished this within just three months, with an amazing functionality for that time. Because of this positive experience, the growing Drupal community, the resulting future security as well as the great flexibility of the system we decided to make Drupal our core technology. From then on, most of the projects at Cocomore have been implemented with Drupal and we have never regretted it. For about a decade we have been using Drupal not only for our customer projects, but have also actively contributed to its development. There are not many agencies in Germany that can claim this.

Cocomore enabled employees to travel to Drupal meetings all across Europe, so we could exchange information with the community. A trip to Denver, Colorado in the U.S. was part of it, too. To date, Cocomore is a very active member of the Drupal community - in both Frankfurt and Seville. I am particularly proud of my Spanish coworkers who have accomplished that the Drupal Developer Days, one of the most important Drupal events, are held in Seville this year. And a Drupal Camp in Frankfurt is in its preparation process as well.

What’s left to say…

Building the Drupal community has definitely been one of my highlights at Cocomore. There have also been many funny experiences throughout the years, such as telephone conferences with India - it takes some time getting used to the accent and mentality. The same goes for some clients. We still have a very good relationship with many of them, especially, of course, with our long standing clients. But in the case of one or the other, who have gone separate ways over time, quotes and descriptions from the website "Customers from Hell" can be applied quite well. Luckily I had only few of this sort, otherwise I would probably not have stayed with Cocomore for eleven years.

I still have a lot of stories from my time at Cocomore, which would be enough to write a book - but I might tell those rather unofficially during an after-work round of beer. In the end, I would like to focus on one thing: I started as a small developer at Cocomore and have worked my way up to lead developer and team leader, right up to being co-director of the entire software department at Cocomore. I was able to work on many (large) projects, got to know fantastic people and different nationalities. I have felt like an important part of a family in my team. I would like to wish Cocomore a successful future and use this opportunity to thank all of you who have been with me during all these years and have "endured" me for so long ;-). We will stay in touch.

Nov 17 2016
Nov 17

With our blog series “Cocomore Job Check” we are introducing typical jobs in the digital industry and offering insights to the agency life here at Cocomore. Next to marketing, IT and development are part of our core business. We are talking with Mehmet Tunay about his job as a backend developer and its perks.

Kimberly: Mehmet, how long have you been at Cocomore and what are your responsibilities?
Mehmet: I started working at Cocomore six years ago and have been in charge of the agency’s web projects since then. If a client wants to integrate a user registration or searching feature on their website, for instance, it falls into my area of responsibility. I am in charge of programming in the backend and making sure that websites work the way they should. My area of expertise are developments in the content management system (CMS) Drupal and .NET (Microsoft Framework).

How did you choose this profession and how did you end up at Cocomore?
I have tried out a lot before getting into the digital industry (laughs). During my computer science studies at the University Darmstadt I was already working in the Cargo Management Department at Fraport and even had my own travel agency for a while. But IT is and remains my passion, and that’s how I got to Cocomore as a backend developer.

Which web projects are you currently working on and how do you organize your work day?
Currently I am working on a project for a client in the aviation sector. Planning new features, programming and controlling progresses – for a developer, there are lots of tasks to coordinate every day. In order to meet the client’s expectations in the final stages, an agile approach is important. That’s why we work according to the Scrum Method at Cocomore: Web projects are realized and finalized step by step and under constant communication with the client.

What do you like most about your job?
The job of a programmer is very future-oriented and there are always new technologies to familiarize yourself with. An active exchange of experiences is therefore crucial and there is a great cooperation and cohesion among developers. That’s why I think it’s fantastic that I have the opportunity at Cocomore to participate in conferences and camps for developers together with my team. This way, we were able to talk to industry colleagues in Munich, Barcelona, Berlin or Brussels over the last few years and to learn a bunch of new things.

What makes your job as a backend developer so remarkable at Cocomore?
Cocomore is an official Drupal partner. This CMS is an international open source technology that’s existing with the input of independent programmers. Our developer team is always exchanging new findings and ideas with colleagues from the Drupal community as well. This way, the system will continue to be advanced and Cocomore’s clients profit from the best possible technical implementation of their web projects.

What advice would you give to aspiring developers?
Stay ambitious, disciplined and have willingness to always develop further. If you want to work for an agency, you should be able to work in a well-organized way. Next to interesting projects, there will be helpful coworkers and a great atmosphere waiting for you.

Oct 06 2016
Oct 06

After a week on the Emerald Island my colleague Carsten and I are back from DrupalCon Dublin. Like every year we have seen people that we don’t get to see as much as we would like to. We have attended sessions and learned new things that we want to apply in our daily business. And since the sessions are already available on video, there is still a great deal of interesting topics to explore! You can find the videos in this YouTube playlist and it’s also worth checking the schedule of the conference.

Our favorite sessions  

How to create content layouts in Drupal 8 by Dasjo and Inky3d

There are several methods to define layouts in Drupal and there have been changes from Drupal 7 to Drupal 8. This video session presents useful examples that allow you to take informed decisions about which route to take in your next project.

Drupal 8: Pursue for best practices by bbujisic

Another session that aims to ease the pain of migrating to Drupal 8: In this case we learn about real world problems and some thoughts about how to solve them. Configuration management is one of the main talking points here.

Advanced web services with JSON API by e0ipso

After a couple of years being part of nearly every big Drupal conference, I know that decoupling Drupal is more than a buzzword. To expose data from Drupal we can select from a number of different options and JSON API is one of them. It implements an open specification that tries to prevent discussions about response formatting, meanwhile it resolves some of the common problems in traditional REST implementations, as this session shows.

Drupal 8 and the Panels Ecosystem by japerry and EclipseGc

This session is about the current status of the Panels ecosystem in Drupal 8. At the same time the most common parts of it are explained to everyone who is not really experienced in using them.

4x High performance for Drupal - Step by Step - The Ultimate Beginner’s Guide by Fabianx

A short overview and introduction into the different options to improve the performance of your Drupal site. This session does not just handle the possibilities within Drupal itself but the whole technical stack including alternatives in PHP, on the server, the client cache or database optimization. There is not just one but multiple screws to adjust the performance of your site. And you have to consider them all.

Search and beyond with Elasticsearch by floretan

This session handles real life examples for Elasticsearch, a search engine also built on Apache Lucene as Apache Solr. At Cocomore we are working very intensive with Apache Solr, but after a short research and after having watched this session we might also be using Elasticsearch very soon.

People metrics: How to use team data to produce positive change by aastaneh

Everybody knows technical metrics like CPU, memory or benchmarks. But how to measure your team? How to improve yourself and the results of your team? This session handles real life examples about how Acquia is trying to solve this gap and how to build more successful and happy teams. If your team is only handling daily business there is no time for improvements. But first you need to know what your team members are doing the whole day and if they are happy with their duties. By measuring the metrics and knowing the results you can see where the problems are and then start to solve them and improve the daily work for the team. The session shows how to start and what you can do.

Social events

As usual, DrupalCon was accompanied by social events. On Monday night we joined an event organized by Amazee Labs called Storytelling Tour Dublin. There we learned about Irish tales and songs, meanwhile two heavily customized buses gave us a ride. It was a special and charming event and I can only say thank you for having been invited to it.

Putting aside a visit to Temple Bar, on Thursday night we attended the traditional Trivia Night, a real highlight of every DrupalCon and this year organized by the Irish Drupal Community. We always have tons of fun while we try to prove how savvy we are about Drupal knowledge. And it is always a good opportunity to have a beer and meet new people!

A big THANKS to everyone involved

Every year DrupalCon is a wonderful event. We would like to thank the organizers, volunteers, sponsors and speakers for making it possible, and the Drupal community at large, just for being awesome.

         

Upcoming events

After a great Drupal event the first thing that comes to my mind is: Do I have to wait a full year for the next one? Well, for the next European DrupalCon for sure. It will take place in Vienna. But there are some other wonderful Drupal gatherings coming up where you will be able to meet us:

Drupal Day 2016: Santiago de Compostela

A one day event focusing completely on developers that will take place in Santiago de Compostela, Spain, in the region of Galicia. Galicia is famous for its food: fresh seafood, cheese, octopus, meat… The Drupal Community is awesome (the Spanish one is noisy, funny and active) and the place is just great so: How could we miss it? One caveat though: it will probably be 100 percent in Spanish.

DrupalCamp Munich 2016

A DrupalCamp in the south of Germany. There have been already a couple of Drupal events in Munich including the DrupalCon in 2012. The next one will again be a big and well organized DrupalCamp including topics like plain PHP and Symfony. There will be good sessions, good German resp. Bavarian food and very good beer. Come for the code, stay for the community: In Munich you can find the best of everything. 

DrupalDevDays 2017 Seville

A Drupal event organized by the Drupal community. There are sessions happening, but the star feature are the sprints. Five days coding alongside other developers, contributing to Drupal Core or some contrib modules. This time it will happen in Seville, home of our Spanish Cocomore office, so it will be a really special event for us. We are looking forward to welcoming you here! And my colleague Jose Luis Bellido is one of the organizers.

DrupalCamp Spain 2017: Madrid

For the second time the DrupalCamp Spain will happen in Madrid, this time in the city center. The Spanish community is big and well organized, and this Drupal Camps always deliver high quality sessions and a great party. And this time it will be easier to reach! Please take into account that this edition will happen between Friday and Saturday, instead of Saturday and Sunday as usual. But this means that you will not have to wake up early for sessions after the official party!

See you soon!

Sep 29 2016
Sep 29

Are you thinking to start developing with Drupal 8?

This blog post is the third (and last) one of a series, where we want to share our experiences developing with Drupal 8 after having faced our first real project with it. In previous blog posts we have talked about some recommendations and documentation resources that will help you master the Drupal 8 learning curve. In this article, we will take a look at some tools that will make your life as a developer easier by saving time and avoiding common errors. Let’s get started!

Drupal Console

Drupal Console is a suite of tools that runs on a command line interface to generate boilerplate code and interact with Drupal 8. Using the Drupal console you will drastically increase your development speed, for sure! It’s very easy to use: Each command is guided and helps you to set the proper parameters for every command you run. It provides a big list of commands that are very useful in your daily work with Drupal. Some of them are:

Other Drupal Console features that we find interesting are:

What’s more, Drupal Console will not only allow you to save time (which means money) but also to learn how some of the components you can build in Drupal are implemented. For instance, when you generate a new content entity for your project, you can check the generated code and learn how it is built. From my point of view, using the Drupal Console is a must if you are going to face a Drupal 8 project. Your team will definitely save time by avoiding typos as well as other common and minor errors when developing custom modules in your projects.

Join the community

The chief maintainers of the project are doing a great job but any help is always welcome. As developers, who use an open source software it is our duty to contribute to the software we use in our projects and help to improve its quality. As a Drupal agency, Cocomore has worked on this great project with some issues and new features like:

Our experience working on the project was very pleasant, partially due to quick feedback from the maintainers and other users. Don’t wait any longer, head over to the project to contribute, check the issue queue and work with it. You will learn a lot and at the same time you will contribute to the project!

XDebug

If you are going to face a Drupal 8 project, it is crucial to start using XDebug in your local environment. Xdebug is an extension of PHP, which provides debugging and profiling capabilities. It will help you debug your PHP code step by step. This will allow you to have more information about the context, the trace of the thread, etc. Within it, you will be able to find out where errors of your project are located in your code and you will be able to fix them much faster than using other debugging techniques. Most of the IDEs like PHPStorm or NetBeans have extensions for using XDebug and provide a UI for debugging your project with it. Additionally, there are several plugins and extensions for most common browsers like XDebug Helper for Chrome. Those plugins or extensions will help you set up the configuration needed to start debugging a page in the browser.

In this blog post I will not go into detail about how to install XDebug. If you use PHPStorm, you will find helpful information in the official documentation from Jetbrains.

Tuning your services.yml and settings.php files

Another tool you will love when working with Drupal 8 is the debug tool provided by Twig Engine. Since Twig was introduced as the new template engine for Drupal 8, developers are able to use its debugging tool. The Drupal 8 implementation adds information about:

This information is quite helpful because you will, for instance, be able to know which template you can overwrite to customize the output in your project. This was not possible in previous versions where you had to remember, what the pattern was for overwriting the template you needed to customize. Additionally, there are other development configurations which you are probably interested in, for example Debugging compiled templates.

How Can I debug my templates?

Twig provides some debugging functions like dump(), which prints the value of the given variable. But if you miss using XDebug within the Twig templates, you are lucky because you can use the Twig XDebug module. It provides a new twig function breakpoint() according to the module description:

“The breakpoint will open in a file (BreakpointExtension.php) outside your Twig template, but you'll be able to inspect any variables available at the breakpoint in the template.”

You will be in charge of your templates again!

Web Profiler

If you were using the Web Profiler module in previous versions of Drupal, you have to know that it has been merged into the Devel module as a submodule in Drupal 8. Web Profiler is a bundle of the Symfony Console for Drupal 8. It provides a toolbar at the bottom of the page where admins can check important information for profiling your websites. You will be able to check the database queries run, the cache effectiveness, views and much more. It was particularly helpful for us to check the database queries run when a certain page was requested and to filter them. If you want to learn more about the features provided by this module, you can check the article Web Profiler in Drupal 8 by Joe Fender from Drupalize.me where you can find a detailed list of the features provided by this module.

Keep reading

Like we said at the beginning, this blog post is the third (and last) of a series we wrote about recommendations and thoughts that might be helpful if you are thinking about starting your first Drupal 8 project. We hope that you will enjoy developing your Drupal 8 project as much as we have with our favorite CMS. Thanks for reading and sharing.

Sep 22 2016
Sep 22

Next week two Cocomories will travel to Dublin to attend this year’s European DrupalCon. Carsten Müller and I are really looking forward to join the community again and to contribute and learn as much as we can about Drupal. There’s just no better place for that and of course we’ll have a blast!

The event will be held at the Convention Centre Dublin. There will be a lot of different sessions, divided by three levels and 14 different tracks, so it’s fair to say that everyone will be able to find an interesting one at almost any given time. Check the official program and if that’s not enough you can attend one of the numerous BoF’s. What’s a BoF, you ask? As stated in the DrupalCon official site, “Birds of a Feather”-Sessions (BoFs) are informal gatherings of like-minded individuals who wish to discuss a certain topic without a pre-planned agenda.

Then, you also have the opportunity to join the code sprints, for contributing something back to the Drupal project and the big ecosystem of contributed modules. Remember that you don’t need to be a developer in order to participate. In case you have never attended to a sprint there will be mentors to help you. And don’t be afraid: new people are always welcome. You will learn a lot and it will be fun! Check the official website to get more information.

I have already added some sessions to my schedule. I’m really interested in how panels and layouts in general work in Drupal 8. Luckily there are some sessions covering that, like “How to create content layouts in Drupal 8”. I’m also really looking forward to see “Advanced web services with JSON API”, to learn about Commerce in Drupal 8 and even to start finding out about “How the routing system could work in Drupal 9”.

After writing the article I’m even more pumped about the event. Please say hello if you see us there! :-)

Sep 19 2016
Sep 19

The CMS (Content Management System) Drupal is an open source software that is further developed very frequently. As the update from Drupal 7 to Drupal 8 brought lots of changes, my colleagues Jose, Eduardo and I participated in the Acquia exam to get the new Drupal 8 certificate. We are proud to announce that we were the first three developers to receive the official certificate “Acquia Certified Developer - Drupal 8” in Germany and Spain. And we are still the only ones in Spain with a certificate right now. For everyone who is thinking about doing the certification, I would like to share some thoughts about it.

I recommend anyone who wants to take the exam, to go to one of the official Testing Centers. There are many of them worldwide, unfortunately none in my hometown Seville, so I had to do the online exam. For this you need a Windows or iOS computer. There is a chat option on the Kryterion online support page, where you get help in case there are any difficulties with launching the online exam. In my case, I had to reschedule the exam due to the technical problems, but afterwards everything was fixed by the Kryterion support service.

To avoid possible problems as much as you can, download the document “Prepare Your Exam” and follow the instructions. It’s important to know that you need administrator rights and that the ports 80 and 443 have to be open. Acquia recommends to use an external camera for the test, but I think the integrated one should work just fine and it’s easier to configure.

The exam takes about 90 minutes and contains 60 questions about Drupal 8. Check out the Acquia website for further details about the format and content of the test. What’s important: You do not simply pass the test just because you paid money for it. You really have to proof your experience in working with Drupal 8. The questions are not too tricky for those, who use Drupal on a regular basis.

At the time that I was able to start the exam, I was really nervous – not the best state to take a test. Luckily there is plenty of time to calm yourself down, answer the questions and review them. Some of the questions involve code and are a little bit longer, but normally they are really concise.

To prepare the exam the most important thing is to develop constantly during some months and trying to face as many different scenarios as possible. Other than that, I found the d8cards.com website really useful and interesting, plus it has even more information than is needed for the exam. Reading the documentation about CMI at Drupal.org is also always a good thing to do!

During the exam you can mark the questions to be reviewed later. When you answer the last question you will see a page with all your answers and the questions you have marked to review. And when you finally submit the exam, you will almost automatically receive the results. You need 65 percent correct answers to pass the exam. I’m proud to report that I got a 90 percent. This is not bad considering that a 25 percent of the test is about frontend and I’m usually a backend-developer.

If you pass the exam, you will receive an email with a badge and a certificate that can be printed out. Along with that you see your scores by sections: fundamentals, site building, frontend and backend. Sadly you don’t get to know which questions you failed.

In the end your name will appear at the Acquia Certification Registry. I hope my report about the certification process is useful to you and if you decide to take the exam: Good luck! :-)

Jun 08 2016
Jun 08

Are you thinking about developing with Drupal 8?

This blog post is the second one in a series of three in which we are trying to share our Drupal 8 experiences with you. In our previous blog post we talked about some thoughts and recommendations that will help you climb the Drupal 8 learning curve. In this one we will discuss some learning resources and points where you will find very good talks, examples or documentation that will make your life easier. Let’s start!

Change records for Drupal core

One of the most useful documentation points that helped me a lot was the change records for Drupal Core. If you have some experience with Drupal 7(or not) you will find all the API changes made in Drupal here. You can search by keywords and filter by several parameters. Each change record is well documented with examples and is linked with the issues that introduced the change, so you will be able to inspect the whole patch and the discussion around the issue.

Drupal 8 Contrib porting tracker

Before the drupal 8 contrib porting tracker project the information about the status of the different contrib modules wasn’t centralized in the same place. Some of them started working in Github to make the development and the review process easier. Because of that, if you wanted to know the status of a concrete project, you had to find out where the main repository was located or look for an issue titled “Drupal 8” or “Drupal 8 port”, etc. Aside from that, each company or person had to build their own spreadsheets about the status of the different contrib modules, duplicating efforts.

In the attempt to solve this, the contrib porting tracker was announced a few months ago, which is a meta project that holds issues that represent the porting status of various projects. Now the information is centralized in the same place. You can also find the information as a kanban board for better visualization.

Drupal API documentation

Documentation of Drupal’s API is one of the strongest features of Drupal, thanks to hundreds of contributors that work hard to keep it in a good state. It’s very well documented and structured. You can find the version for Drupal 8 at: https://api.drupal.org/api/drupal/8

Youtube channel of the Drupal Association

The Drupal Association has a youtube channel where you can find most sessions of the different DrupalCons and other important events recorded. All sessions are quite interesting and cover different topics like Dev Ops, Theming, Business & Strategy.

If you missed any of these talks you will have the opportunity to watch them here and learn from the best!

The examples module

The examples module is essential if you are looking for examples in your daily work. As you can read on the main project page

“The Examples for Developers project aims to provide high-quality, well-documented API examples for a broad range of Drupal core functionality.”

For the Drupal 8 version some examples have been added, such as:

  • D8 plugin example.
  • Config Entity example.
  • Tour example.

Other examples that were available in prior versions have been ported to D8, like:

  • Block example
  • Cache example
  • Field example

More examples are still not ported, so your help is needed! When contributing with some examples you’ll learn a topic in detail and at the same time you will be helping others with it.

You can find the complete list with the status of each example at [meta] Port examples to D8.

Keep reading

Like we said in the beginning, this blog post is one in the series that we write about recommendations and thoughts that will be helpful if you are thinking about starting your first Drupal 8 project. 

We hope that this will make the learning curve easier for you!

May 23 2016
May 23

Are you thinking about developing with Drupal 8?

At Cocomore we have faced the learning curve of Drupal 8 when developing our first real project with the new version of Drupal, which was just released a few weeks ago. As part of our company’s philosophy we want to share with others what we have learned and try to make the learning curve of Drupal 8 easier for you.

This is the first of three blog posts, where we will cover some reflections, learning & documentation resources and useful tools. If you are going to face your first project with Drupal 8, this series of blog posts will be helpful to you.

Before you start developing your first Drupal 8 project, and if you have some experience developing with Drupal 7, you will get some ideas here that would be great to keep in mind.

Just keep the concepts and good practices in mind. Forget everything else.

Most of your knowledge about how to face some problems or requirements in Drupal 7 is not necessary in Drupal 8. This is not bad news because the concepts are the same. We can say that the “how” changed, but not the “what”. So reset yourself and learn how to develop your formatters, widgets, etc. in Drupal 8.

Read and learn modern PHP concepts.

Now Drupal is much more object oriented than in the previous version. If you have been living on an island, new concepts like traits, dependency injection or others will probably be new for you. Those concepts are common in other modern PHP frameworks like Symfony. So once you learn them, you will start to get off the island and you will become a more professional developer. A good read for this purpose is PHP: The right way where you’ll find the best practices and concepts about modern PHP development.

Don’t stay on the surface. Dig in the concept.

Each time you learn how to do something new, don’t stay on the surface but go deeper, spending some time on learning why that decision was made, what design pattern is used or how it is implemented. Doing this will make you learn faster and faster, and you will understand the whole picture, and therefore make better decisions in the future.

Reset and review your current development process.

Drupal 8 has tons of very important features like the new Configuration management system, which will allow you to export/import configurations between different environments. Because of that and other important new features you will probably need to adapt your current scripts and tools to Drupal 8 and review each of them. Here are some interesting resources to find out more about configuration management:

 

The best examples you can find are in core!

Drupal 8 was and is changing fast, the examples that you can find in other blog posts are probably deprecated by now, they don’t work or can be improved. Because of that, try to search for some examples in Drupal core before you start looking for “how to” blog posts! On the one hand you will always find updated examples and best practices about developing with Drupal. On the other hand you will learn how Drupal is built and your knowledge about Drupal will increase!

Keep reading

Like we said at the beginning, this blog post is one in the series that we write about recommendations and thoughts that will be helpful to you if you are thinking about starting your first Drupal 8 project. We hope that you will enjoy this series of blog posts!

May 02 2016
May 02

Each year, a different location is picked for the DrupalCamp in Spain. The weekend before last it took place in the beautiful city of Granada. Like many times in the past, part of Cocomore’s team travelled there to attend this event and to learn from the interesting talks concerning Drupal, PHP development and tech in general.

Our favorite talks

As in the years before, this DrupalCamp kept the exceptional level of sessions and inspired us to try new ideas in our own projects. At the end, we had to choose which talks we wanted to attend. These are some of them:

 

We participated by giving a session!

Display modes talk, photo by Josef (Amazee labs)

One of our Cocomoris, Jose Luis Bellido, was giving a session about “Display modes” and how we can develop most of the common requirements of our projects with those components. We hope that attendees enjoyed the talk at least as much as we did preparing it. If you want to know more, you can find the slides of this session here.

The level of the sessions was really high, and there were a lot of them that we didn’t have the opportunity to attend because of the tight schedule, but the videos of every session will be available on the Spanish Drupal Association video channel. We are really looking forward watching them!

Extra activities

Every DrupalCamp is special, not only because of the great sessions, sprints and trainings, but also because of the extra activities around the event that facilitate interactions between the attendees in a relaxed environment. This year, the organizers gave us the opportunity to visit Alhambra, where we were fascinated by this awesome set of monuments, the most visited in Spain.

Alhambra photo by Josef (Amazee labs)

They also organized a nice party on Saturday night. They rented a place called “Fusión Pasión” and a DJ was playing really cool music. It is also worth to mention that they set up a big screen on which we could see the photos that people posted on twitter with the hashtag #DrupalEsFiesta. Summarizing, the night was really fun and we could share great moments with great people.

People

Without a doubt, the most important experience of this event is connecting with other tech professionals, sharing knowledge and experiences with like-minded people from several countries. Now it’s our turn to incorporate this new and fresh knowledge in our daily work to further improve our ability to create successful projects for our clients.

We would like to say a BIG THANK YOU to all organizers of this edition of the DrupalCamp (the local group, the Drupal Spanish Association, collaborators) who made it possible. You rule!

Group photo by Josef (Amazee labs)

See you at DrupalCamp Madrid 2017!

Interesting links:

Jan 20 2016
Jan 20

The new year has started with a Drupal 8 Workshop for several developers from Cocomore. The workshop was prepared internally and its main aim was to show a rough overview of innovations in Drupal 8. 

The new Drupal 8

On the 19th of November, 2015 the first version of Drupal 8 was officially released. Two Cocomoris have already worked on a Drupal 8 project during the last year and have seen Drupal on its way through the first release. Since there are several new Drupal 8 projects in our pipelines or have already started, it seems to be reasonable to share the experience with other developers. 

A workshop from Germany to Spain

The workshop attended altogether 6 developer: 3 backend and 3 frontend developer. Two of them are working in our office in Spain, so there was a need to setup a technical environment. The spanish guys saw and heard us via video chat and they participated in our mind map, which was hung up on the wall, via video stream. In Sevilla they had a similar setup so that we also had the possibility to track their notes. 

(above: Setup in Frankfurt, below: Setup in Sevilla)

What was it about?

To get an overview of terms and topics around Drupal 8, we started creating a mind map and collected all tags. We wrote down every topic or tag that we combine with Drupal 8. All in all we got about 60 headwords and we ordered them systematically. We combined our experiences not only in Drupal 8 but also in Drupal 7. Our key issues were for example core, local setup or theming. Afterwards we discussed all other topics and subordinated them to the different key issues. The most interesting topics were those, which have no unambiguous assignment, such as preprocessing. This topic may relate to core and / or theming. After several discussions, we developed a core area which contents more than one term and subordinated different other terms. You can see our result in the following picture:

Frontend changes in Drupal 8

Now I'll give you a short insight into frontend changes in Drupal 8.

Twig and Kint

The template engine changed from PHP Template to Twig. This is an important step into the right direction for frontend developers, because we get more control over the HTML output. It's easier for us to define our own CSS classes, to decide where and when we add a new div container and to work without the extensive standard Drupal markup. Twig itself is delivered with a cool feature: debug. In services.yml (sites/default/services.yml) we can set the parameter twig.config by using the variable debug: true. Thus we get additional information as HTML comments in which template files the data is rendered. We get not only the name of the used template but also file name suggestions in case we want to overwrite the template. You can find a step-by-step tutorial on how you set up the debug mode here.

By using the Twig function dump() the output is an array showing the data that is sent to the frontend. This array is shown completely and may be incomprehensible on bigger projects or a lot of content. For all of you who might find this output confusing, there is a module called kint and it's been delivered in the Devel module. After enabling, we get the same data as from dump() by using kint() though it's displayed as a dropdown and you can hide all redundant information to search tightly focused. 

SMACSS and BEAM

As I already mentioned, we have the opportunity to decide which HTML elements get which CSS classes. For keeping readability and accessibility, it is advisable to use standards like SMACSS (besides, the book is really worth reading and easy to understand) and BEM

Stylesheets and jQuery

Drupal easily gets overloaded by stylesheets that are loaded by modules or (base) themes. For preventing this, there is a value in our theme.info.yml in which we can remove unnecessary stylesheets. Just put all those files in stylesheets-remove. In addition, Drupal is not loading the huge JavaScript library jQuery anymore. If you still need, just implement it as a dependency in your Drupal 8 libraries

Base-Themes: Classy and Stable

Drupal 8 delivers two new standard themes in its core. Classy and Stable are themes, that are defined as base themes. The difference between them is the markup. While Classy uses readable and semantic CSS classes, Stable only delivers the important classes in example for the Drupal Toolbar. As default, the Stable theme gets the base theme for custom themes unless there is no further configuration on that. By setting the parameter base theme to false in the theme.info.yml, you can prevent Drupal from doing so. 

All these points are the base for a comfortable development and will accompany us in the next few years in Drupal 8 projects.

Dec 10 2015
Dec 10

Past 5th of December took place in Murcia a new edition of DrupalDay Spain. DrupalDay is an event focused on Drupal developers, organized by different local communities each year with the help of the Spanish Drupal Association (AED). Shorter and more focused, it has been held at different points of the country like Barcelona, Santander, Valencia, Bilbao and this year it took place in Murcia.

 

Dec 09 2015
Dec 09

A short introduction in performance optimization and debugging of MySQL databases

The following text gives you a short introduction about possibilities to optimize the speed of read and write operations in a MySQL database. Furthermore some possibilities are explained how to debug MySQL.

Hint: Generally it makes sense to use as much RAM as possible on the system because it is a lot faster than the hard drive. With more RAM it is possible to cache more MySQL data. This is a huge performance improvement and will have impact on the settings listed below.

In MySQL it is possible to change settings during runtime. These changes are temporarily and are only for the current instance of MySQL. You must change the settings again for the next instance or if the database is restarted.

But there is the possibility to make changes permanent in the my.cnf (for Unix-based systems and Windows systems) or my.ini (Windows systems only) file.

On Linux Debian based systems the my.cnf file is located in /etc/my.cnf. The my.ini file can be stored under C:\my.ini. Any other places on your system are also possible. You can get a more precise overview here.

Here are some examples for MySQL settings for development and production systems.

Settings for development-systems

Logging

The MySQL logs store all activities of MySQL (start, stop, insert, update, delete, ...). The logs can give you really useful informations about your database but writing of the logs is also slowing down the performance.

So it is recommended to think first before enabling every log possibility. Especially in production systems it is maybe not the best idea but for development it is very helpful.

The logging is disabled per default but you can enable it with the following entries in your my.cnf (my.ini):

[mysqld]

log-bin --> bin_log will be activated

log --> general_log will be activated

log-error --> error_log will be activated

log-slow-queries --> slow_queries_log will be activated

   -The bin_log saves among other informations changes on the database, the table structures or the duration of operations.

log_bin=/var/log/mysql/mysql_bin.log → path where the log-file should be saved

   - The slow_query_log stores all MySQL requests where the duration tooks longer than the time set in „long_query_time“. There is no general rule for the size of the „long_query_time“. It depends how much requests to the database took to much time. But for a website for example to total time of delivery should not take longer than one second.

log_slow_queries = /var/log/mysql/mysql-slow.log → path where the slow_queries_log-file should be saved

long_query_time = 2 → determines at which execution time the logging should log

   - The error_log saves informations about errors occuring during the runtime of a MySQL-Server

log_error=/var/log/mysql/mysql_error.log → path where the error_log-file should be saved

  - The general_log could be helpful for determining requests to the MySQL-Server or to find out which users are connected to the database.

general_log_file = /var/log/mysql/mysql.log → path where the general_log-file should be saved

Settings for all systems

Optimizing caching for read performance

To improve the read performance of MySQL the previous mentioned settings can be used in the my.cnf (my.ini). Please consider that the query cache is disabled by default since MySQL version 5.6.

   - Query Cache: should be named "result cache" because it is caching the results of the queries (+hash, + affected tables). This improves the read performance (select operations). It caches the results of the select queries. It works fine if many identical select-queries are performed. Therefore it is useful to write many identical or nearly similar select queries or to use stored procedures. If the queries are not similar because the order of the statements is different the hash value will be different. If this is the case the cache can not be used because the previous result will not be found because of the different hash value.

The query cache is not used for insert, update or delete statements.

query_cache_type = 1 → enabled the query cache

query_cache_limit = 1M → maximum size of a single result to be cached

query_cache_size = 32M → maximum total size of all cached results

If the number of threads is higher than 10, the query cache becomes a bottle neck. In this case it is better to disable the query cache.

show global status like 'thread%'; → shows how many threads are running.

Recommendation: Monitoring of the amount of threads and the caching

   - Table Definition Cache: This cache is used to store the table definitions, so these do not have to be checked over and over again. The table definitions will be stored in the cache in the memory which makes it much more faster.

table_definition_cache = 400 → should be big enough to store the whole amount of tables in all databases on the server.

 

select count(*) from information_schema.tables; → show the total amount of tables on this server

   - Table Open Cache: This is used to store the amount of tables that are open by MySQL simultaneously. This should be as high as possible.  

table_open_cache = 400 → how much tables can MySQL open simultaneously.

                         Calculation: Amount of simultaneous MySQL connections * 1 to 20 Tables

  - InnoDB buffer pool size: This is one of the most important setting because it reduces the read and write access to the hard drive when accessing tables. The table data is stored in the RAM and all read and write access will be handled in the RAM before the results are written physically to the disc. The RAM is much more faster than the disc - that is why this cache should get as much RAM as possible, especially if it is a dedicated MySQL server.  

innodb_buffer_pool_size = should be 50% – 80% of the available RAM

Improving the write performance

   - InnoDB log file size: This setting is for the size of the innodb files iblog0 and iblog1. These files should ideally be big enough to handle 60 seconds or up to one hour of sql statements.

Innodb_log_file_size = 1MB – 4GB → should be as big as possible. But the bigger this size is the more time it takes afterwards for recovery if there is a crash.

There is a general rule to calculate the size of the InnoDB log files:

innodb_os_log_written / uptime = ?kb per second

kb per second * 60 seconds * 60 minutes = X

consider a possible peak, so also add a high rate, default 5

=> kb per second * 60 seconds * 60 minutes * peak (5) = X

To change the settings on a server please consider the following steps:

  1. service mysql stop

  2. move or delegate the files iblog0 and iblog1

  3. change the my.cnf (my.ini) settings

  4. service mysql start - the both log files should be restored again

   - innodb_flush_log_at_trx_commit: This setting determines when the log buffer should be written from RAM to disc.

possible values:

   0: once per second (good if there is much traffic) - the log buffer will be written once per second into the log file and the cache in the RAM is cleared. Exception: if there is a transaction in progress.

   1: (default) the log buffer will be written to the log file on every commit of a transaction and the buffer will be cleared in RAM.

   2: the data will be written simultaneous to the RAM log buffer and the log file on disc. The log buffer in the RAM will be written to disc on every commit and the buffer in the RAM will be cleared once a second. 

Conclusion

The default settings of MySQL are not the best choice. You should modify the settings fitting to your environment depending if it is a dedicated database server, the size of the RAM etc. You should also consider the type of environment, a dev or test environment probably does not need as much RAM as the production environment where much more users are accessing the system at the same time. It is also recommended to optimize the production environment for read and write performance. A test or development system is maybe not the first priority, here the system needs to be optimized for debugging purposes. Another important setting is the consideration of Master/Slave setups and the optimization of the replication. Also keep in mind to monitor your production environment, especially the most important values like the amount of simultaneous threads or the usage of cahces and RAM. So you can see easily if there is a bottleneck that needs to be improved. As you can see it is important to keep always an eye on you database(s).

Nov 30 2015
Nov 30

DrupalDay is an event focused on Drupal developers, organized by different local communities each year with the help of the Spanish Drupal Association (AED). Shorter and more focused, it has been held at different points of the country like Barcelona, Santander, Valencia and Bilbao. This year the time has come to celebrate the new edition that will happen the next 5th of December in Murcia!                              

This edition, with the recent news of the first release of Drupal 8 out, the event will be focused at the new features that the new version brings to all users. There will be workshops and talks about different topics, and targeted to all levels of experience, with some well-known speakers. You can take a look at the schedule.

Here at Cocomore we have been working with Drupal 8 for a real project for some time already, and we have faced some problems and challenges that we want to share with the Community. This is why I will be presenting a session called “From D7 to D8: This is my experience”. In this talk I’ll be explaining, from my point of view, what the most important changes as a developer are, you have to learn for starting developing in Drupal 8 if you have some experience developing at Drupal 7. I’ll be sharing all the resources, techniques or tricks that have been helpful to me in order to climb the learning curve of Drupal 8.

We’ll be present again in one of the more important events in Spain about Drupal, learning and sharing with others our knowledge about our favorite CMS!

We hope to see you there!

Logo from DrupalDay Murcia

Nov 25 2015
Nov 25

After five years of development, Drupal 8 was finally launched on November 19th, 2015. To mark this event, over 200 release parties were celebrated all over the world and there was of course one in Frankfurt. Nearby the Cocomore Office, at the Meatpackers restaurant, members of the Drupal User Group Rhein-Main came together to celebrate the release with thousands of others. Cocomore sponsored the event with Drupal 8 party hats, table cards, streamers and balloons. To be honest, we might have looked strange with our party hats on at the beginning. Even the waitress asked what we were doing. After we brought her into the loop, she understood that we weren’t just any nerdy guys. However there were still some other looks directed to us. But luckily, more and more guests came and the party started ­– and it was the complete opposite of a typical party a la „Big Bang Theory“. And as we know that good parties come with happy guests, Cocomore and our partner Bright Solutions (http://www.brightsolutions.de) arranged food and beverages for everyone.

 

Besides our party in Frankfurt, Cocomore was also represented at further events in Sevilla and Cordoba that evening. Some of our colleagues even gave a talk and explained the new features that come with Drupal’s new version. 

 

 

And there’s a lot to tell: everything is object-oriented now and there are a bunch of improvements according to the latest technology. You will find a list with all the new features here: https://www.drupal.org/drupal-8.0. By the combination of the framework Symfony 2 with Drupal, all functions of these two popular systems can be used in only one system. Cocomore used both frameworks for many different projects for a long time. Finally with Drupal 8, we can use the best features of both frameworks in one system. This innovation allows a better, more efficient and cost effective realization of projects and meets increased requirements related to an interconnected world.

If you have and further questions concerning Drupal 8, don’t hesitate to contact us.

Nov 18 2015
Nov 18

As you all probably know, Drupal 8 will finally be released on Thursday 19th. We have been looking forward to that event here in Cocomore, as everyone involved in the great community of Drupal and, as it will happen in a great number of cities around the world, we will be celebrating!

In Frankfurt, our colleagues from the head office will join the Frankfurter Drupal community to drink some beers and share the excitement, talking about experiences with the past betas and release candidates, and the future to come. If you happen to be close please join! https://groups.drupal.org/node/488518 In Sevilla, our collegue Jose Luis Bellido will deliver a session about the new features of Drupal 8 and then everyone will go to have some drinks together. At this moment about 40 people are planning to join! If you can attend please sign up in the event page https://groups.drupal.org/node/488518. It will be a blast! Finally, I will be in Cordoba, my hometown, talking about Drupal and Drupal 8. Because there is not a Drupal community itself that I know there this session will be a little bit different, showing not only all the new and shiny features of Drupal 8, but also all the great things that made us love Drupal before! So it will be a really special day for me. If you want to join me please sign up here. After that we will have some time to talk all together and, of course, have some drinks.

I hope that you can join and say hello or, at least, have fun anywhere you are!

Nov 04 2015
Nov 04

The DrupalCamp Essen is meanwhile a firm institution. For the 4th time already the DrupalCamp Essen took place in the middle of the Ruhr area in the  Unperfekthaus and as usual we had been looking forward to finally seeing all the nice people from the community again for quite a while. Since none of the three of us (Kerstin, Jan, Ela) works as a developer, we had been especially curious to see if there would be relevant and interesting sessions for us, and we were not disappointed. 

Of course there were a number of presentations concerning Drupal 8, but, as a solution architect who develops on the brink at most, I rather focused on more general topics. Tobias Stöckler, for example, talked about how to get the most out of a PHPStorm , Karsten Planz covered  PHPUnit Testing and Nicole Schwarz allowed a Blick über den Drupal-Tellerrand and demonstrated, what other CMS can do better, especially in regards to media management and usability.

Stephem Luckow covered a carefree use of  Skype, GoogleDocs und ähnlichen Diensten. This was, at large, not a new topic, but some of the details in the Skype user agreements were quite surprising after all, and it became clear once again, that the awareness in regards to data protection is often forgotten quickly when it comes to one’s own convenience. Manuel Pistner explained, how to create SaaS Anwendungen mit DrupalHere especially one approach was interesting, where she determined whether it was worth it to invest time and energy into a new idea.

The highlight was, of course, the game show by Mark Engelhardt and Ronald Krentz: Pictionary with Drupal modules. Neither expenses nor efforts were spared to realize the whole thing technologically in order for the audience to be able to follow, and the candidates gave everything - especially during the bonus pantomime rounds. Thanks to you both and all participants, it was really fun!

But even apart from that the community did not come off badly. For one, time was used for personal conversations, to meet new people and spend the night at the Rock & Metal joint. But we also used the opportunity to talk with interested people about the next DrupaCamp in the works, and a member meeting of the Drupal e. V. took place as well.

Since we already left on Sunday around noon and therefore missed the final session, here a virtual applause to the speakers, participants and sponsors and especially to the organization committee: Thank you for making the camp possible once again, we will definitely be back! But for now we will see you in Heidelberg (https://groups.drupal.org/node/466133)or - in case DrupalCamp in Spain comes up at that time for me personally (http://2016.drupalcamp.es/- in Munich or Frankfurt :)

Oct 08 2015
Oct 08

This year DrupalCon was in Barcelona and my first DrupalCon. Therefore i attented the First Time Attendee Social on Monday afternoon. This event was for all people that had never attended to a Drupalcon before. The goal of the event was to meet other ''Newbies''. For reaching this goal there was a Bingo-Game with a lot of tasks like:
 - meet someone who has met Dries Buytaert
 - meet a freelancer
 - meet someone who will attend the Sprints on friday
 - meet someone from Barcelona
 - meet someone from the Spanish Drupal Association
and much more.

A lot of interesting sessions were hold from monday till thursday. On friday were the sprints where everybody had the option to resolve the last open issues for Drupal 8 (Release Candidate 1 was published on October, 7th 2015 :) ). On friday morning was a 2 hour First Time Sprinter Workshop for all the people who never contributed to Drupal 8 before.

There were too much interesting sessions for this blog post so i want to summarize some of them.

Let´s build it on Drupal 8 (hold by mon_franco):

In this session Montaña Franco talked about some new features of Drupal 8 like the new block layout and the reusability of blocks or the new module tours which brings detailed informations about Drupal modules.

Furthermore she talked about the following topics:

  • Drupal 8 is now fully responsive

  • Drupal 8´s better mulitingual behavior

  • The new import/export of configurations between 2 or more Drupal instances

  • New core modules like views and quickedit

 

Caring about quality as a team (hold by rodrigoaguilera and pcambra)

Rodrigo Aquilera and Pedro Cambra talked in this session about things like the importance of code reviews in software projects. They mentioned that a software team should review everything and during the review each member is equal.

They talked also about drupal´s coding standards, tests (manual and automated), continous integration (e.g. jenkins) and the PMD mess detector. At the end of the session they presented some helpful tools like patches, pull requests, gerrit and redmine.

 

Symfony2: The journey from the request to the response (hold by saro0h)

In this session Sarah Khalil gave a short introduction into the philosophy of Symfony2, depency injection in Drupal and templating. She also explained how HTTPRequests in Symfony are handled with all the different layers.

 

 

Behat+Mink+PhantomJS = Test ALL THE THINGS! (hold by michellesanver)

Michelle Sanver gave an overview about tools for automated testing. She explained what BDD (Behavior Driven Development) and Gherkin (and the hooks, scenarios and steps) is. She talked about how easy it is to write automated tests and which of the tools should be used.

Michelle also presented the PHP VCR Tool, a HTTP Recorder for phpunit tests and other tools. Two of the main features of the PHP VCR are that the recorded tests run faster and can be used in an offline-mode.

 

Entity Storage, the Drupal 8 way (hold by plach)

In this session talked Francesco Placella about the changes with entities and fields between Drupal 7 and Drupal 8. He pointed out that one of the most important changes is that fields can no longer be reused (shared) between different content types. He also talked about the new entity query API.

 

Conclusion

My first DrupalCon is over. I learned a lot of new things and a lot about the new Drupal Version 8. It´s now time to apply all the new knowledge about drupal, symfony and the other stuff. And maybe there will be my next DrupalCon in the next year in Dublin. We´ll see.

Oct 03 2015
Oct 03

DrupalCon Barcelona has finished. It was a really successful event again.
There have been more than 2030 people attended the Con.

You should take a look into the recorded sessions, that are already online. There are always interesting sessions for everyone.
Some small feedback about the sessions you can also find here.
After the registration process we tried to find the best for ourselves. Some of us joined the "First-Attendee Social Event", the "Business Summit" or the "Extended Sprints".

From Tuesday to Thursday there were sessions held.

I had a very interesting presentation about the Lingotek module, presented by Rob Bailey (robertdbailey), Christian Lopez Espinola (penyaskito), Matt Smith (smithworx). Lingotek is a powerfull Cloud Based Translation Management System (TSM) that helps you to make your application multilingual.

Sessions that i can recommend you:

Let's build it on Drupal 8:
In this session we could get a deep view to the Drupal 8 Administration backend for sitebuilders. With the live demo we put focus on the most important powerfull improvements like:
- New content administration
- Blocks and layouts.
- Configuration of content types and new fields.
- Form and view display.
- Multilingual.
- Configuration management.


Features for Drupal 8:
Features module get more interesting. In Drupal 8, Features will return to it's original mission of bundling functionality rather than just managing configuration. Now that Drupal 8 has configuration management (CMI) built into core, what's the role of the Features module in Drupal 8? Check out the video.

Behat+Mink+PhantomJS:
In this talk we got information how to use Behat+Mink+PhantomJS to accomplish screenshot comparison, testing the JavaScript implementations and the PHP code using the same human-readable language: Behat's Gherkin.

Tesing with monkeys:
Monkey testing (stochastic testing or Mark Testing) is an automated test that runs with no specific test in mind. We saw different tools for testing front-end, back-end and infrastructure which harness chaos and randomness to uncover unknown weakness in your Drupal projects.

I will not list the whole sessions here, so please take a look at the videos hosted on youtube.

The most important imformation, that Dries gave us is of course the release date for Drupal 8 (October 7th, 2015):

In the "Closing Session" we were proud to hear that the next DrupalConEurope will be in Dublin(26-30 Sep.2016). Drupal Con will be also in Mumbai (12-21 Feb. 2016) and New Orleans (09-13 May. 2016).

One of the best in the Con was of course the TriviaNight. We had to know 70 questions about Drupal. Our team reached a good score somewhere in the middle of the chart :).

Next Events/Camps in Europe:

DrupalCamp Essen 2015, 25-25 October
The DrupalCamp takes place for the 4th time in Essen in the Unperfekthaus. The location is really nice, so we expect a cool weekend with many nice people. There won’t be any English sessions, as it’s focused on the German community.

DrupalCamp Heidelberg 2016, 20-21 February
There are not a lot of details right now, but you will find some Cocomories there for sure!

DrupalCamp Granada 2016, 22-24 April
Granada will held the Spanish Drupalcamp in 2016. In Andalucia, south of Spain, and between the ski station of Sierra Nevada and the Mediterranean Sea, Granada is a beautiful city with an old history and profound Muslim roots, mostly known because of tapas and the compound of the Alhambra and the Generalife, a pleasure palace with great gardens, one of the most visited monuments of Spain and a must see. The event itself will welcome not only the enthusiastic Spanish community but also the growing number of visitors from other countries, that ensures a fair number of sessions held in English.


In the meanwhile we will apply all the new knowledge and gather some more, that we will be eager to share here or in the way of sessions in those events.


Thank you and see you soon!

Oct 01 2015
Oct 01

Introduction
Drupalcon Barcelona has finished and we are back at our offices, with the head full of ideas about how to improve our daily work, the conviction that Drupal 8 will be here soon and it will allow us to achieve amazing things in future projects, and the batteries recharged after having such a great time with such great people.
Because there are too many sessions to be able to attend every interesting one, even if you have been in Barcelona, and because the videos are already available online, we would want to highlight some of the sessions that we liked. Because we don’t want to write a long post with unrelated sessions we will be publishing a series, one by each member of the team that was in Barcelona, and today it’s my turn :-)

Sessions that I recommend

Configuration Deployment Best Practices in Drupal 8

I'm sure that by now you know that one of the coolest features of Drupal 8 is CMI. And we will have to adapt to the new configuration system, including our deployment method and workflow. If you want to know beforehand how it will look like you should totally watch this session.

Drupal 8 Plugin Deep Dive

The Plugin system has largely replaced the hook_info pattern that was common in Drupal 7. It provides a new Api to define discoverable classes that need to implement a given interface to extend the system functionality. If you want to define your own plugin system for a new cool functionality or you just want to understand what it's happening when you define a form, widget or a formatter you have to watch this session.

Expose Drupal with RESTful

The RESTful module helps you to expose your Drupal content taking into account all the good practices and principles, having the developers and not the site builders as target users.

Making Drupal fly

The fastest Drupal ever is here! If you want to know all the amazing stuff that is already in Drupal 8 or that it will come in the future to make our sites faster and our caches smarter then you can't miss this session.

Community Keynotes by David Rozas and Mike Bell

Two topics in one hour, but both related with the people, the real faces that create the community and work every day. The first one, by David, exposes the results of an academic research about the community, and how not only the commits but also the human relationships make Drupal grow. The second one, by Mike, was a courageous declaration about mental health in the open source world, and how this topic is a difficult one to talk about, but how important it is.

Visual Regression Testing

In this session was explained how important is to constantly monitor live systems and how we can check not only that the site is alive but it looks how it should at any moment.

Next steps
As I said before, this is a post in a series, so you can expect articles from my colleagues highlighting some sessions and talking about their experience.
We have a lot of community events in our pipeline, where you will be able to find some Cocomories (please say hello if you see us!).

DrupalCamp Essen 2015, 25-25 October
The DrupalCamp takes place for the 4th time in Essen in the Unperfekthaus. The location is really nice, so we expect a cool weekend with many nice people. There won’t be any English sessions, as it’s focused on the German community.

DrupalCamp Heidelberg 2016, 20-21 February
There are not a lot of details right now, but you will find some Cocomories there for sure!

DrupalCamp Granada 2016, 22-24 April
Granada will held the Spanish Drupalcamp in 2016. In Andalucia, south of Spain, and between the ski station of Sierra Nevada and the Mediterranean Sea, Granada is a beautiful city with an old history and profound Muslim roots, mostly known because of tapas and the compound of the Alhambra and the Generalife, a pleasure palace with great gardens, one of the most visited monuments of Spain and a must see. The event itself will welcome not only the enthusiastic Spanish community but also the growing number of visitors from other countries, that ensures a fair number of sessions held in English.


In the meanwhile we will apply all the new knowledge and gather some more, that we will be eager to share here or in the way of sessions in those events.


Thank you and see you soon!
 

Sep 25 2015
Sep 25

On the last day, many sessions were held and a keynote took place early in the morning again. Initially, David Rozas made a presentation on Community-Contribution and following this, Mike Bell gave a moving speech about Mental Health. I was impressed about this talk: He spoke really openly about his BurnOut last year that requires a lot of courage. At this point I want to thank him therefore.

Mike Bell: Thank you for your speech! Just great!

As many others thought so, there were a standing ovation and cheers following his speech.

After the sessions one of the highlights of this year's DrupalCon came; the closing session. We all waited anxiously to the fact where and when the next DrupalCon would take place in Europe. Once the locations of DrupalCon USA (New Orleans) and Asia (Mumbai) were announced, it finally happened. The announcement of the next DrupalCon in Europe. A short film and a musical interlude with vocals betrayed us, that it would be Dublin, Ireland.

Later that night, slightly away from the DrupalCon, the Trivia night took place.

Here it was all about answering 70 questions on the topics of Drupal and open source. For instance, company logos had to be named or nicknames of Drupal users had to be found out through pictures. Questions about individual sessions during DrupalCon or maintainer of modules were also queried. Our team of Frankfurt performed, despite the seriousness of the issues, very well and took a good place in the midfield.

On Friday were the sprints and we were allowed to use Drupal 8. For all sprint-inexperienced, there was a First-Time Attendee Workshop. Here, the procedure of sprints was explained and how to start best with his first ticket for Drupal 8. Several mentors provided advice and support during the all-day sprints.

Saludos desde Barcelona!

Philip

Sep 22 2015
Sep 22

Hola! On Tuesday the DrupalCon 2015 in Barcelona has officially started. It is the day when the lectures are starting, the group photo  is to be shot and the first day after greetings, sprints and parties with the community. This morning the Drupal founder Dries Buytaert opened his „Driesnote“ with the skeptical question "Is Drupal losing momentum?" and answered it at the same time with "Yes!". After all, the users are impatiently awaiting Drupal 8, which has been being developed for the last 5 years. Especially since there was already a Code Freeze in the end of 2012.

But Dries immediately took the wind out of the sails, by showing that every big major release is preceded by a lull but there is also always a steeply raising right after the official release. It was the same when Drupal 6 and 7 were released. Let's hope he proves right again, when on 07th October 2015 Drupal 8 Release Candidate 1 comes.

And we can look forward to many changes and advancements. For me as a frontend developer, it will be considerably easier by using the new template language {{Twig}} to write functions or variables in the respective templates. It's a 180-degree turn to the PHPTemplate development as we already know of Drupal 7.

It means full control:

-       no more divitis
-       no more CSS classes soup
-       no more Drupal standard markup and classes
-       no more annoying about the markup and not knowing where it comes from actually
-       no more using regex, just to change a CSS class
 
But that means also, for instance, we can attach and remove CSS files on the new info.yml much easier. As well as that jQuery is no longer loaded innately and you are now able to set some Javascript files depending f.e. on a framework. Furthermore, that the standard logo and many icons in SVG are no longer in PNG delivered. And that was done very much in terms of accessibility SMACSS & BEM.


It is a very important and essential step and there should be no more obstacles from the front end to the boom. 

Adiós

Christoph Gahmann

Sep 17 2015
Sep 17

At the weekend (20.09.2015) Cocomore will attend the DrupalCon in Barcelona with five participants (3 Backend Developers and 2 Frontend Developers):

Mehmet Tunay, Backend

Carsten Müller, Backend

Jesús Sánchez Balsera, Backend

Philip Bönisch, Frontend

and Christoph Gahmann, Frontend

The Con will be located in Barcelona International Convention Center. We are going to attend the extended sprints to contribute the Drupal 8 Core.

There will be a lot of interesting sessions, BoFs, Training and Social Events. It was very hard to pick sessions trought 10 parallel tracks. Checkout the program here: https://events.drupal.org/barcelona2015/program

The main goal of some of our participants is to get in touch with Drupal 8. I strongly recommend new drupal developer to contribute to Drupal. There will be the „First-Time Sprinter Workshop“. Join this event, if you are new to Drupal Contribution.

In advance I recommend the following sessions:

Beginner level:

Let's build it on Drupal 8

Features for Drupal 8

Building amazing searches with Search API

Webform vs. Entityform: Exposing forms to end users

Intermediate:

Expose Drupal with RESTful

PhpStorm for Drupal Development

Entity storage, the Drupal 8 way

Configuration management in Drupal 8

How Drupal 8 builds your pages?

There are a lot of interesting sessions for everybody. So keep in mind, that you check out the videos, if you cannot attend the Con.

We will see AGAIN this weekend how amazing the Drupal community is!!! There is always a lovely get-together in Drupal Events. Thank you guys.

Looking forward to see you in Barcelona !!!

Best, Mehmet Tunay

Jun 30 2015
Jun 30

Queries are the centerpiece of MySQL and they have high optimization potential (in conjunction with indexes). This is specially true for big databases (whatever big means). Modern PHP frameworks tend to execute dozens of queries. Thus, as a first step, it is required to know what the slow queries are. A built-in solution for that is the MySQL slow query log. This can either be activated in my.cnf or dynamically with the --slow_query_log option. In both cases, long_query_time should be reduced to an appropriate value. Most Linux distributions come up with a default value of 1 or more seconds. But this turns out too slow for web applications as you want to achieve an overall response time of a few hundreds of milliseconds. So depending on your needs of performance choose a value of 0.1 or 0.01 seconds.

SQL consists of 2 different types of queries: Those who belong to the Data definition language (DDL) and those who are working with data (Data manipulation language, DML). DDL queries have usually no performance implications. But there is an exception of this rule of thumb: ALTER TABLE statements can be very time-consuming, if a table contains millions of records and uses (unique) indexes. We will cover a practice in a minute. DML queries again can be divided into INSERT statements and other CRUD statements (SELECT, UPDATE and DELETE) on the other hand. Those statements can be optimized with several techniques. Most of this blog post will address this type of statement.

Optimizing ALTER TABLE statements

Imagine you have an accounts table with millions of records and you want to extend it with a field for a phone number. A direct execution of ALTER TABLE would certainly lead to major load. The trick is to avoid index ad-hoc re-calculation. Hence, we drop all indexes and copy the table to an extra table and perform structural changes there.

  1. Set innodb_buffer_pool_size appropriately (Be aware: For performing structural changes, a high buffer pool size can speed up things; Being live however, a high size will lead to memory shortages)
  2. (Optional) Backup the database
  3. Drop all indexes except primary key and foreign keys
    DROP index ...
  4. 4. Copy the table and apply structural changes. Use a similar name, for example with suffix '_new'.

    CREATE TABLE IF NOT EXISTS `Accounts_new`
      id` int(11) NOT NULL AUTO_INCREMENT,
      `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      PRIMARY KEY (`id`),
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
      ALTER TABLE `Accounts_new` ADD `phone` VARCHAR(255 ) NOT NULL;

  5. Copy data with INSERT INTO ... SELECT. Just select the columns that are used in the new table.
    INSERT INTO Accounts_new SELECT `id`, `email`,  `city`, null FROM Accounts;
  6. Rename the table. In case of used foreign keys disable the foreign key check.

    SET foreign_key_checks = 0;
      DROP TABLE Accounts;
      ALTER TABLE Accounts_new RENAME Accounts;
      SET foreign_key_checks = 1;

  7. Create all indexes including foreign keys.
    CREATE index ...

Two steps require major efforts. First, copying all the data to the new table will take some time; Second, rebuilding all indexes can last a long time (it depends on the number of indexes and whether they are unique or not).


Optimizing insertions

INSERT queries should be merged, if possible. A single query that creates 10 rows is faster than 10 sole queries. However, this technique has its limits, especially, if MySQL runs out of memory. If you want to import a whole database, then you can switch off some consistency checks, for example foreign_key_checks=0, unique_checks=0. Moreover, autocommit=0 can also help.


Optimizing SELECT statements

SELECT, UPDATE and DELETE statements have one thing in common: It is the way they filter results (with the WHERE clause). This can turn out as a complex task, especially for big tables. Big means tables having a row count from 100 000. Tables having more than one million rows should definitely be included into query optimization. For the sake of simplicity, we concentrate on SELECT queries. It is the most frequently used case anyway.


1) Use EXPLAIN

If you want to optimize your query, you should know how MySQL executes it. You can use EXPLAIN to get the query execution plan. With MySQL Version 5.6 it is possible to use explain for insert, update and delete statements.

EXPLAIN SELECT * FROM Users WHERE uid = 1;

The result contains several useful informations about the query:


column Description select_type Is the query a simple query (primary) or is it a compounded query (join or subquery)? type This is extremely important for joins or subqueries: How is this query joined? The best types are: const, ref, eq_ref. Worse types are: range, index, all. Attention: do not mix up index with ref/eq_ref! For further informations, please visit the MySQL docs. possible keys A list of indexes which could be used to optimize the speed of the query. key The used index key_len The length of the index. Shorter indexes tend to perform better. ref Which column is used for the index scan? rows Estimated number of rows that have to be compared with the filter criteria. This number should be as low as possible. extra Additional information about the query. Attention: Do not mix up Using index with ref/eq_ref!

MySQL docs: http://dev.mysql.com/doc/refman/5.0/en/explain-output.html

If the query is a simple query (i.e. no joins or subqueries are used), then EXPLAIN will return a single line where select_type is set to SIMPLE. To get a good performance, it is important to use an existing index. This is the case when type is equal to ref and possible_keys and key suggest an index.

If joins are used, the returned result will contain a line per table. Joining tables should always be done by a foreign key comparison. In this case the type of an EXPLAIN is eq_ref. Avoid to leave out foreign keys. Try to avoid joins on different attribute types, for instance a varchar field and an integer field. This will make MySQL do a lot of type conversions which is simply not good.


2) Use existing indexes

Indexes are ordered by (at least) an attribute by design. Thus, they can be applied to queries which are filtering by this attribute, either as exact filter (WHERE x = 'y') or as range query (WHERE timestamp >= 123). Indexes are not applicable if you use any function in the WHERE clause, for instance WHERE SUBSTR(name, 0, 4) = 'Alex'. The following list shows which WHERE clauses can be handled by indexes:

WHERE x = 'y' check.png

WHERE timestamp >= 123 check.png

WHERE timestamp BETWEEN 123 AND 456 check.png

WHERE name LIKE ('Ale%') check.png

WHERE name LIKE ('%Ale%') error.png

WHERE SUBSTR(name, 0, 4) = 'Alex' error.png

If you have more than one filter criterion in the query, your index should include all used columns as well. Imagine you have the following indexes: name_IDX, firstname_IDX, firstname_name_IDX and name_firstname_IDX. Then the query

# Using composite indexes
SELECT * FROM Users WHERE firstname = 'Alex' AND name = 'Saal'

... could be optimized with firstname_IDX, firstname_name_IDX but not with name_firstname_IDX because of the order of the columns! The order has to be the same in the query as well as in the index. It is like using a telephone book. A telephone book is ordered by last name, then by first name. It is much more easy to first look for all persons with the desired last name and have a list with only a few persons. It does not make sense at all to browse the whole telephone book looking for people with a wanted first name and then comparing the last name in step 2.

Keeping this image in mind: It is always good to have a selective index. You can use an index which includes a gender of a customer. But this reduces the data set only by a half. Instead, it is much more pleasant to have an index like e-mail address or a unique index like Social Security Number. Be selective! As a rule of thumb, there are 3 levels of selectivity:

  • Primary key or unique key (best; those clauses will return a single row immediately)
  • An index matching the WHERE clause, or a prefix index (useful for text fields)
  • No key or index is applicable (worst)

Furthermore, firstname_name_IDX matches better than firstname_IDX and will be preferred by MySQL. Note that firstname_name_IDX can also be used for queries like

# Filtering the first name
SELECT * FROM Users WHERE firstname = 'Alex'

It is therefore neither necessary nor recommended having both indexes created simultaneously.

The indexes are always read from left to the right. If you have an index containing multiple columns - index names (column_firstname, column_familyname) - the order of your filters in the query should follow the same order. Otherwise the index can not be used. So if you filter without using the first column (column_firstname is not used in the query) in the index, but assuming that the filter is also used by just filtering for the second column (column_familyname) in the index, the index is not used. Therefore it is sometimes better to add a second index using just the second column. Check the statement by using EXPLAIN to check which index is used or not. For examples see the chapter about table indexes below.


3) Or Statements

The mysql query optimizer can not use indexes if the OR statement is used, so try to avoid OR statements!


4) Optimization of GROUP BY/ORDER BY queries

Sometimes you are facing queries that aggregate or sort rows:

# GROUP BY / ORDER BY
SELECT role, count(*) FROM Users WHERE registration_ts > 140000000 GROUP BY role;
SELECT id, username FROM Users WHERE registration_ts > 140000000 ORDER BY username;

What MySQL does is:

  1. Selection of Users by WHERE registration_ts > 140000000,
  2. Order results of step 1 (no matter if GROUP BY role or ORDER BY username is used)
  3. Projection to the desired columns by SELECT role or SELECT id, username

The hardest step is sorting. This is where indexes can help a lot. They contain a sorted list of records dependent to their definition. This is extremely helpful in particular if you have a lot of data in that table (Complexity of sorting algorithms is O(n*log(n))). How to define the index to optimize this query? Choose first the column filtered in the WHERE clause, then those in GROUP BY/ORDER BY (in the same order as in the query!). If it is possible to add the columns of SELECT to the index (after the columns of GROUP BY/ORDER BY) to gain some performance (this technique is called covering index). It is not always reasonable to use covering indexes: If the whole index gets too big, then you probably won't gain any time.

Extending the example of a telephone book: It is helpful, if you have requests like "Tell me how many persons have the last name 'Smith'" (This is a GROUP BY) or "Give me a list of all persons ordered by last name and first name" (ORDER BY).

In the previous example use the following indexes:

  • registration_role_IDX for the GROUP BY statement
  • registration_username_IDX for the ORDER BY statement

5) Usage of subqueries

When it comes to complex queries, MySQL (especially before 5.6) is optimized for using JOIN statements. However, in some cases a subquery can be more efficient if you use both GROUP BY and ORDER BY on different tables. In that case, an index cannot be used, if you join the tables. Defining a main query and subquery avoids this problem, as each query acts on its own table and is able to use any available index.

# Case A: Query as INNER JOIN
SELECT
    a.id AS account_id,
    p.id AS product_id,
    TRIM(SUBSTRING(p.name, 1, 30)) AS product_name,
    COUNT(*) AS count
FROM Accounts a
INNER JOIN Orders o ON a.id = o.account_id
INNER JOIN Products p ON p.id = o.product_id
GROUP BY p.id
ORDER BY a.id

# Case B: Subquery
SELECT account_id, product_id, product_name, count
FROM (SELECT
    a.id AS account_id,
    p.id AS product_id,
    TRIM(SUBSTRING(p.name, 1, 30)) AS product_name,
    COUNT(*) AS count
  FROM Accounts a
  INNER JOIN Orders o ON a.id = o.account_id
  INNER JOIN Products p ON p.id = o.product_id
  GROUP BY p.id) as product
ORDER BY account_id

In that case, the query has been split up to an outer query and a subquery (line 2-10). Case A would make MySQL create a temporary table and use filesort. Case B can avoid that. It depends on the size of each table, which way is superior.

Other MySQL blog posts

Jun 29 2015
Jun 29

Queries are the centerpiece of MySQL and they have high optimization potential (in conjunction with indexes). This is specially true for big databases (whatever big means). Modern PHP frameworks tend to execute dozens of queries. Thus, as a first step, it is required to know what the slow queries are. A built-in solution for that is the MySQL slow query log. This can either be activated in my.cnf or dynamically with the --slow_query_log option. In both cases, long_query_time should be reduced to an appropriate value. Most Linux distributions come up with a default value of 1 or more seconds. But this turns out too slow for web applications as you want to achieve an overall response time of a few hundreds of milliseconds. So depending on your needs of performance choose a value of 0.1 or 0.01 seconds.

SQL consists of 2 different types of queries: Those who belong to the Data definition language (DDL) and those who are working with data (Data manipulation language, DML). DDL queries have usually no performance implications. But there is an exception of this rule of thumb: ALTER TABLE statements can be very time-consuming, if a table contains millions of records and uses (unique) indexes. We will cover a practice in a minute. DML queries again can be divided into INSERT statements and other CRUD statements (SELECT, UPDATE and DELETE) on the other hand. Those statements can be optimized with several techniques. Most of this blog post will address this type of statement.

Optimizing ALTER TABLE statements

Imagine you have an accounts table with millions of records and you want to extend it with a field for a phone number. A direct execution of ALTER TABLE would certainly lead to major load. The trick is to avoid index ad-hoc re-calculation. Hence, we drop all indexes and copy the table to an extra table and perform structural changes there.

1. Set innodb_buffer_pool_size appropriately (Be aware: For performing structural changes, a high buffer pool size can speed up things; Being live however, a high size will lead to memory shortages)

2. (Optional) Backup the database

3. Drop all indexes except primary key and foreign keys

DROP index ... 

4. Copy the table and apply structural changes. Use a similar name, for example with suffix '_new'.

CREATE TABLE IF NOT EXISTS `Accounts_new`

  id` int(11) NOT NULL AUTO_INCREMENT,

  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,

  `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,

  PRIMARY KEY (`id`),

  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

  ALTER TABLE `Accounts_new` ADD `phone` VARCHAR(255 ) NOT NULL;

5. Copy data with INSERT INTO ... SELECT. Just select the columns that are used in the new table.

INSERT INTO Accounts_new SELECT `id`, `email`,  `city`, null FROM Accounts;

6. Rename the table. In case of used foreign keys disable the foreign key check.

SET foreign_key_checks = 0;

  DROP TABLE Accounts;

  ALTER TABLE Accounts_new RENAME Accounts;

  SET foreign_key_checks = 1;

7. Create all indexes including foreign keys.

CREATE index ...

Two steps require major efforts. First, copying all the data to the new table will take some time; Second, rebuilding all indexes can last a long time (it depends on the number of indexes and whether they are unique or not).

Optimizing insertions

INSERT queries should be merged, if possible. A single query that creates 10 rows is faster than 10 sole queries. However, this technique has its limits, especially, if MySQL runs out of memory. If you want to import a whole database, then you can switch off some consistency checks, for example foreign_key_checks=0, unique_checks=0. Moreover, autocommit=0 can also help.

Optimizing SELECT statements

SELECT, UPDATE and DELETE statements have one thing in common: It is the way they filter results (with the WHERE clause). This can turn out as a complex task, especially for big tables. Big means tables having a row count from 100 000. Tables having more than one million rows should definitely be included into query optimization. For the sake of simplicity, we concentrate on SELECT queries. It is the most frequently used case anyway.

1) Use EXPLAIN

If you want to optimize your query, you should know how MySQL executes it. You can use EXPLAIN to get the query execution plan. With MySQL Version 5.6 it is possible to use explain for insert, update and delete statements.

EXPLAIN SELECT * FROM Users WHERE uid = 1; 

The result contains several useful informations about the query:

column description select_type  Is the query a simple query (primary) or is it a compounded query (join or subquery)? type This is extremely important for joins or subqueries: How is this query joined? The best types are: const, ref, eq_ref. Worse types are: range, index, all. Attention: do not mix up index with ref/eq_ref! For further informations, please visit the MySQL docs. possible keys A list of indexes which could be used to optimize the speed of the query. key The used index key_len The length of the index. Shorter indexes tend to perform better. ref Which column is used for the index scan? rows Estimated number of rows that have to be compared with the filter criteria. This number should be as low as possible. extra Additional information about the query. Attention: Do not mix up Using index with ref/eq_ref!

If the query is a simple query (i.e. no joins or subqueries are used), then EXPLAIN will return a single line where select_type is set to SIMPLE. To get a good performance, it is important to use an existing index. This is the case when type is equal to ref and possible_keys and key suggest an index.

If joins are used, the returned result will contain a line per table. Joining tables should always be done by a foreign key comparison. In this case the type of an EXPLAIN is eq_ref. Avoid to leave out foreign keys. Try to avoid joins on different attribute types, for instance a varchar field and an integer field. This will make MySQL do a lot of type conversions which is simply not good.

2) Use existing indexes

Indexes are ordered by (at least) an attribute by design. Thus, they can be applied to queries which are filtering by this attribute, either as exact filter (WHERE x = 'y') or as range query (WHERE timestamp >= 123). Indexes are not applicable if you use any function in the WHERE clause, for instance WHERE SUBSTR(name, 0, 4) = 'Alex'. The following list shows which WHERE clauses can be handled by indexes:

WHERE x = 'y'  WHERE timestamp >= 123 WHERE timestamp BETWEEN 123 AND 456 WHERE name LIKE ('Ale%') WHERE name LIKE ('%Ale%')   WHERE SUBSTR(name, 0, 4) = 'Alex'

If you have more than one filter criterion in the query, your index should include all used columns as well. Imagine you have the following indexes: name_IDX, firstname_IDX, firstname_name_IDX and name_firstname_IDX. Then the query

# Using composite indexes

SELECT * FROM Users WHERE firstname = 'Alex' AND name = 'Saal'

... could be optimized with firstname_IDX, firstname_name_IDX but not with name_firstname_IDX because of the order of the columns! The order has to be the same in the query as well as in the index. It is like using a telephone book. A telephone book is ordered by last name, then by first name. It is much more easy to first look for all persons with the desired last name and have a list with only a few persons. It does not make sense at all to browse the whole telephone book looking for people with a wanted first name and then comparing the last name in step 2.

Keeping this image in mind: It is always good to have a selective index. You can use an index which includes a gender of a customer. But this reduces the data set only by a half. Instead, it is much more pleasant to have an index like e-mail address or a unique index like Social Security Number. Be selective! As a rule of thumb, there are 3 levels of selectivity:

• Primary key or unique key (best; those clauses will return a single row immediately)

• An index matching the WHERE clause, or a prefix index (useful for text fields)

• No key or index is applicable (worst)

Furthermore, firstname_name_IDX matches better than firstname_IDX and will be preferred by MySQL. Note that firstname_name_IDX can also be used for queries like

# Filtering the first name

SELECT * FROM Users WHERE firstname = 'Alex'

It is therefore neither necessary nor recommended having both indexes created simultaneously.

The indexes are always read from left to the right. If you have an index containing multiple columns - index names (column_firstname, column_familyname) - the order of your filters in the query should follow the same order. Otherwise the index can not be used. So if you filter without using the first column (column_firstname is not used in the query) in the index, but assuming that the filter is also used by just filtering for the second column (column_familyname) in the index, the index is not used. Therefore it is sometimes better to add a second index using just the second column. Check the statement by using EXPLAIN to check which index is used or not. For examples see the chapter about table indexes below.

3) Or Statements

The mysql query optimizer can not use indexes if the OR statement is used, so try to avoid OR statements!

4) Optimization of GROUP BY/ORDER BY queries

Sometimes you are facing queries that aggregate or sort rows:

# GROUP BY / ORDER BY

SELECT role, count(*) FROM Users WHERE registration_ts > 140000000 GROUP BY role;

SELECT id, username FROM Users WHERE registration_ts > 140000000 ORDER BY username;

What MySQL does is:

1. Selection of Users by WHERE registration_ts > 140000000,

2. Order results of step 1 (no matter if GROUP BY role or ORDER BY username is used)

3. Projection to the desired columns by SELECT role or SELECT id, username

The hardest step is sorting. This is where indexes can help a lot. They contain a sorted list of records dependent to their definition. This is extremely helpful in particular if you have a lot of data in that table (Complexity of sorting algorithms is O(n*log(n))). How to define the index to optimize this query? Choose first the column filtered in the WHERE clause, then those in GROUP BY/ORDER BY (in the same order as in the query!). If it is possible to add the columns of SELECT to the index (after the columns of GROUP BY/ORDER BY) to gain some performance (this technique is called covering index). It is not always reasonable to use covering indexes: If the whole index gets too big, then you probably won't gain any time.

Extending the example of a telephone book: It is helpful, if you have requests like "Tell me how many persons have the last name 'Smith'" (This is a GROUP BY) or "Give me a list of all persons ordered by last name and first name" (ORDER BY).

In the previous example use the following indexes:

• registration_role_IDX for the GROUP BY statement

• registration_username_IDX for the ORDER BY statement

5) Usage of subqueries

When it comes to complex queries, MySQL (especially before 5.6) is optimized for using JOIN statements. However, in some cases a subquery can be more efficient if you use both GROUP BY and ORDER BY on different tables. In that case, an index cannot be used, if you join the tables. Defining a main query and subquery avoids this problem, as each query acts on its own table and is able to use any available index.

# Case A: Query as INNER JOIN

SELECT

    a.id AS account_id,

    p.id AS product_id,

    TRIM(SUBSTRING(p.name, 1, 30)) AS product_name,

    COUNT(*) AS count

FROM Accounts a

INNER JOIN Orders o ON a.id = o.account_id

INNER JOIN Products p ON p.id = o.product_id

GROUP BY p.id

ORDER BY a.id

# Case B: Subquery

SELECT account_id, product_id, product_name, count

FROM (SELECT

    a.id AS account_id,

    p.id AS product_id,

    TRIM(SUBSTRING(p.name, 1, 30)) AS product_name,

    COUNT(*) AS count

  FROM Accounts a

  INNER JOIN Orders o ON a.id = o.account_id

  INNER JOIN Products p ON p.id = o.product_id

  GROUP BY p.id) as product

ORDER BY account_id

In that case, the query has been split up to an outer query and a subquery (line 2-10). Case A would make MySQL create a temporary table and use filesort. Case B can avoid that. It depends on the size of each table, which way is superior.

Jun 05 2015
Jun 05

Backups are very important for every application, especially if a lot of data is stored in your database. For a website with few updates it is not so important to do backups regularly, you can just take the backup of last week for restoring the site and if there was just one or two updates, you can add them manually afterwards. But if you run a community site with user generated content and a lot of input the topic backup & recovery becomes a lot more important but also complex. If the last backup is from last night you have to consider all the updates that were made in the meantime. Because you don’t know what the users have entered, it is impossible to add these changes afterwards manually. That is why you need a backup strategy that also considers the storing of all updates in the time between two full backups.

There are four methods for backup and recovery a MySQL database. All other methods are based on these 4 methods. These are logical and physically backup methods.

Physical backups

Storing the binary MySQL files

With this method the real MySQL database files for the tables, in which all data is physically stored on the hard disk, are copied to a save location. If a backup is needed the files can be copied back to the server.

Backup

service mysql stop;
cp -R /var/lib/mysql/database_name target
service mysql start;


Recovery

service mysql stop;
cp -R /path/to/backup/database_name /var/lib/mysql/database_name
service mysql start;

Advantages:

  • fast
  • easy for backup
  • multiple files, if one is broken, hopefully just this table is lost, not the whole database

Disadvantages:
  • takes a lot of diskspace, all the indexes etc. are copied too
  • The database has to switched off for a certain time during the backup
  • Restoring can become a little complex
  • you need special permissions on the operation system

LVM snapshot

Linux provides a Logical Volume Manager (LVM) (http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) and is a layer to manage the filesystem. The LVM provides the ability to create snapshots of any logical volume. So, you create a backup of the physical volume which can be easily used for recovering in the future. This is one of the best and easiest solutions, it is very fast, very easy and the potntial error level is very low. You don't have to set your database or application offline, there will be no locks on the tables and you get a stable snapshot of the current status.

Backup # create the snapshot
lvcreate -l100%FREE -s -n mysql-backup /data/databases

# Create a mount-point and mount the volume/snapshot
mkdir -p /mnt/snapshot
mount /data/databases/mysql-backup /mnt/snapshot

# Do the backup and copy it to a separate system
tar -cf /tmp/dbbackup_YYYMMDD_H:i:s.tar /mnt/snapshot
cp /tmp/dbbackup_YYYMMDD_H:i:s.tar ip:/path/to/backups/

# Now remove the mount and the snapshot
umount /mnt/snapshot
lvremove /data/databases/mysql-backup


Recovery # copy back the backup to your server
cp ip:/path/to/backups/dbbackup_YYYMMDD_His.tar  /tmp/

# stop the database
service mysql stop;
# remove the old database files
rm -R /var/lib/mysql/database_name

# copy the backup
cp /tmp/dbbackup_YYYMMDD_His.tar .

# unpack the files
tar xvf dbbackup_YYYMMDD_His.tar

restart the database
service mysql start;

Advantages:

  • very fast
  • easy
  • no stop of the database, no lock on tables

Disadvantages:
  • LVM needed
  • maybe root access for the operation system needed

Logical backups

mysqldump

A mysql dump is a common strategy for backups. This is a logical backup, means the structure and the content of the database are exported into a special file in a special format. This is done by using the MySQL syntax and stores all relevant information’s that are needed to rebuild the database. Normally there is a statement to create the database again, statements to rebuild the tables and their structure and then statements to import the data into the tables itself. All these information’s are stored in one file and this can be copied to a save location. When a backup is needed the file can be imported and the database will be restored with the information’s stored in the file.

Backup

# create the dump
mysqldump --add-drop-database -u Username -pPassword database_name > dump_database_name_YYYMMDD_His.mysql


Recovery

# drop the old table and insert the backup dump data
mysql -u Username -pPassword database_name < dump_database_name_YYYMMDD_His.mysql


Advantages:
  • Very easy
  • Can be done by users without special permissions on the operation system, esp. root permissions
  • The indexes are not stored, so this backup does not uses as much disk space as a physical file backup
  • You can have a look into the backup and also search in it, data manipulation is also possible if something has to be changed

Disadvantages:
  • Slower than a physical backup
  • Slower in recovery, because everything has to be imported first and then the indexes have to be built again
  • One file, if this is broken the backup is not possible

Hints:

  • --lock-all-tables: locks all tables during creation of the dump, so the application cannot access them, avoids data inconsistences!
  • --single-transaction: the whole dump is executed as an transaction, so the application can still access and write the database, the dump is made via transaction
  • --master-data: set the location of the master in a database replication, so the slave knows the position and where to start with the replication
  • --add-drop-database: add a DROP DATABASE statement before each CREATE DATABASE statement

Innobackup

There are special tools to create a innobackup, see also http://dev.mysql.com/doc/mysql-enterprise-backup/3.8/en/ihb-meb-compatib....
This is a special case for databases where the storage engine innodb is used. As innodb became the default storage engine and mysisam will be removed in the future, this is also a very common possibility to create a database backup. It is nearly the same as a normal MySQL dump but also considers the special possibilities of innodb like foreign key constraints etc. There is the MySQL Enterprise Backup (MEB) (http://www.mysql.com/products/enterprise/backup.html) for creating innobackups, but it costs money.

There is also an open source tool from percona named xtrabackup - http://www.percona.com/software/percona-xtrabackup. There is a free version available but also a enterprise edition which also costs money. As percona (http://www.percona.com) offers a lot of useful tools around mysql, this is maybe also a good choice for your MySQL toolkit. There are also other tools from percona which help to improve you daily live with MySQL.

Hints

Master-Slave replication for backups and avoiding downtimes

A special hint at this point: if possible, use a master-slave replication and use the slave for building the backups, so the main system if not affected and performance for the application is not affected. It is also a good setup to avoid long downtimes of your application. If one server crashes you can switch to the other with your application and it will stay online. In the meantime you can repair the broken system and then restore the old setup. So, if the master breaks, you can switch to the salve and it becomes master. If the slave fails, just the read requests of your application have to be routed to the master.

Fromdual Bman

Fromdual.com offers the tool fromdual_bman (http://fromdual.com/mysql-backup-manager-mysql_bman) which is a wrapper for seven different backup methods (the ones mentioned above and combinations of them).

Backup location

A backup is always better than no backup. But if the backup is stored on the same logical disk on the server where your website also runs on, you mabe get in trouble. If the disk crashes your website is offline and you also loose your backup. In this case it is impossible to restore your website on another server and bring it back online. So, always save your backups on another logical volume or on another server. If the data is very important also consider to save your backups on multiple locations maybe also in other data centers. In a case of fire or something similar your backup can be fetched from somewhere else and recovery can run in another data center.

Uuuups Queries - Accident on database

So called uuuups queries are queries where accidentially a wrong query was executed in a production system. This mostly happens because somebody executes the query manually by accident. There are multiple reasons why this can happen, for example mixing up the consoles etc.

Time is the key, so you have to act immediately!

Stop the database and your application immediately! Set your application to maintenance mode!

Two possibilities:
  1. no database replication

    You can only reimport the last backup, whenever it was made. Hopefully it was made not long time ago, maybe last night. By this you loose all changes between your last backup and the time of your uuuups query. Or, if you know the changes that were made in this time, you can fix the changes manually or by writing a script which does the changes for you.

  2. a running database replication
    You can reimport the last backup. By using a replication you automatically get the binary logs where MySQL writes the databases changes to be executed on the slave server. You can use these binary logs to create a point in time recovery, that means you can recover everything until the execution of the wrong query. After the import of the dump you can execute the mysql binary logs containing either the statements (statement based replication) or the changed rows (row based replication). Because all the changes are stored in these files you get all the changes that were made in the time of your last backup and the time the uuups query was executed. Do not forget to avoid the execution of the uuups query again, it is also in the binary logs! You can edit the binary logs by using the myqlbinlog tool (http://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html) and delete the uuups query from the log. This has to be done on both servers, on the master and on the slave. But when one of the servers (use the master first) is recovered you can enable you application again by just using this first server. After that you can recover the slave server and restart the replication. If you are an experienced user you can also start the recovering of the master and the slave server together, so both systems are nearly back at the same time. But so not mix up the systems, else you have to start from the beginning and your application stays offline.

We hope these hints can help you in your daily life with MySQL. There are also other posts about MySQL. Because in this post there was a lot about database replication mentioned, the post about MySQL - setup is also interesting for you.

Other MySQL blog posts

Jun 04 2015
Jun 04

Backups are very important for every application, especially if a lot of data is stored in your database. For a website with few updates it is not so important to do backups regularly, you can just take the backup of last week for restoring the site and if there was just one or two updates, you can add them manually afterwards. But if you run a community site with user generated content and a lot of input the topic backup & recovery becomes a lot more important but also complex. If the last backup is from last night you have to consider all the updates that were made in the meantime. Because you don’t know what the users have entered, it is impossible to add these changes afterwards manually. That is why you need a backup strategy that also considers the storing of all updates in the time between two full backups.

There are four methods for backup and recovery a MySQL database. All other methods are based on these 4 methods. These are logical and physically backup methods.

Physical backups

Storing the binary MySQL files

With this method the real MySQL database files for the tables, in which all data is physically stored on the hard disk, are copied to a save location. If a backup is needed the files can be copied back to the server.

Backup 

service mysql stop;

cp -R /var/lib/mysql/database_name target

service mysql start;

Recovery 

service mysql stop;

cp -R /path/to/backup/database_name /var/lib/mysql/database_name

service mysql start;

Advantages: 

• fast

• easy for backup

• multiple files, if one is broken, hopefully just this table is lost, not the whole database

Disadvantages: 

• takes a lot of diskspace, all the indexes etc. are copied too

• The database has to switched off for a certain time during the backup

• Restoring can become a little complex

• you need special permissions on the operation system

LVM snapshot

Linux provides a Logical Volume Manager (LVM) (http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) and is a layer to manage the filesystem. The LVM provides the ability to create snapshots of any logical volume. So, you create a backup of the physical volume which can be easily used for recovering in the future. This is one of the best and easiest solutions, it is very fast, very easy and the potntial error level is very low. You don't have to set your database or application offline, there will be no locks on the tables and you get a stable snapshot of the current status.

Backup 

# create the snapshot

lvcreate -l100%FREE -s -n mysql-backup /data/databases

# Create a mount-point and mount the volume/snapshot

mkdir -p /mnt/snapshot

mount /data/databases/mysql-backup /mnt/snapshot

# Do the backup and copy it to a separate system

tar -cf /tmp/dbbackup_YYYMMDD_H:i:s.tar /mnt/snapshot

cp /tmp/dbbackup_YYYMMDD_H:i:s.tar ip:/path/to/backups/

# Now remove the mount and the snapshot

umount /mnt/snapshot

lvremove /data/databases/mysql-backup

Recovery 

# copy back the backup to your server

cp ip:/path/to/backups/dbbackup_YYYMMDD_His.tar  /tmp/

# stop the database

service mysql stop; 

# remove the old database files

rm -R /var/lib/mysql/database_name 

# copy the backup

cp /tmp/dbbackup_YYYMMDD_His.tar .

# unpack the files

tar xvf dbbackup_YYYMMDD_His.tar

restart the database

service mysql start;

Advantages: 

• very fast

• easy

• no stop of the database, no lock on tables

Disadvantages: 

• LVM needed

• maybe root access for the operation system needed

Logical backups

mysqldump

A mysql dump is a common strategy for backups. This is a logical backup, means the structure and the content of the database are exported into a special file in a special format. This is done by using the MySQL syntax and stores all relevant information’s that are needed to rebuild the database. Normally there is a statement to create the database again, statements to rebuild the tables and their structure and then statements to import the data into the tables itself. All these information’s are stored in one file and this can be copied to a save location. When a backup is needed the file can be imported and the database will be restored with the information’s stored in the file.

Backup 

# create the dump 

mysqldump --add-drop-database -u Username -pPassword database_name > dump_database_name_YYYMMDD_His.mysql

Recovery 

# drop the old table and insert the backup dump data

mysql -u Username -pPassword database_name < dump_database_name_YYYMMDD_His.mysql

Advantages: 

• Very easy

• Can be done by users without special permissions on the operation system, esp. root permissions

• The indexes are not stored, so this backup does not uses as much disk space as a physical file backup

• You can have a look into the backup and also search in it, data manipulation is also possible if something has to be changed

Disadvantages: 

• Slower than a physical backup

• Slower in recovery, because everything has to be imported first and then the indexes have to be built again

• One file, if this is broken the backup is not possible

Hints: 

• --lock-all-tables: locks all tables during creation of the dump, so the application cannot access them, avoids data inconsistences!

• --single-transaction: the whole dump is executed as an transaction, so the application can still access and write the database, the dump is made via transaction

• --master-data: set the location of the master in a database replication, so the slave knows the position and where to start with the replication

• --add-drop-database: add a DROP DATABASE statement before each CREATE DATABASE statement

Innobackup

There are special tools to create a innobackup, see also here.This is a special case for databases where the storage engine innodb is used. As innodb became the default storage engine and mysisam will be removed in the future, this is also a very common possibility to create a database backup. It is nearly the same as a normal MySQL dump but also considers the special possibilities of innodb like foreign key constraints etc. There is the MySQL Enterprise Backup (MEB) (http://www.mysql.com/products/enterprise/backup.html) for creating innobackups, but it costs money.  There is also an open source tool from percona named xtrabackup - http://www.percona.com/software/percona-xtrabackup. There is a free version available but also a enterprise edition which also costs money. As percona offers a lot of useful tools around mysql, this is maybe also a good choice for your MySQL toolkit. There are also other tools from percona which help to improve you daily live with MySQL.

Hints

Master-Slave replication for backups and avoiding downtimes

A special hint at this point: if possible, use a master-slave replication and use the slave for building the backups, so the main system if not affected and performance for the application is not affected. It is also a good setup to avoid long downtimes of your application. If one server crashes you can switch to the other with your application and it will stay online. In the meantime you can repair the broken system and then restore the old setup. So, if the master breaks, you can switch to the salve and it becomes master. If the slave fails, just the read requests of your application have to be routed to the master.

Fromdual Bman

Fromdual.com offers the tool fromdual_bman which is a wrapper for seven different backup methods (the ones mentioned above and combinations of them).

Backup location

A backup is always better than no backup. But if the backup is stored on the same logical disk on the server where your website also runs on, you mabe get in trouble. If the disk crashes your website is offline and you also loose your backup. In this case it is impossible to restore your website on another server and bring it back online. So, always save your backups on another logical volume or on another server. If the data is very important also consider to save your backups on multiple locations maybe also in other data centers. In a case of fire or something similar your backup can be fetched from somewhere else and recovery can run in another data center.

Uuuups Queries - Accident on database

So called uuuups queries are queries where accidentially a wrong query was executed in a production system. This mostly happens because somebody executes the query manually by accident. There are multiple reasons why this can happen, for example mixing up the consoles etc.

Time is the key, so you have to act immediately!

Stop the database and your application immediately! Set your application to maintenance mode!

Two possibilities: 

1. No database replication

You can only reimport the last backup, whenever it was made. Hopefully it was made not long time ago, maybe last night. By this you loose all changes between your last backup and the time of your uuuups query. Or, if you know the changes that were made in this time, you can fix the changes manually or by writing a script which does the changes for you.

2. A running database replication

You can reimport the last backup. By using a replication you automatically get the binary logs where MySQL writes the databases changes to be executed on the slave server. You can use these binary logs to create a point in time recovery, that means you can recover everything until the execution of the wrong query. After the import of the dump you can execute the mysql binary logs containing either the statements (statement based replication) or the changed rows (row based replication). Because all the changes are stored in these files you get all the changes that were made in the time of your last backup and the time the uuups query was executed. Do not forget to avoid the execution of the uuups query again, it is also in the binary logs! You can edit the binary logs by using the myqlbinlog tool (http://dev.mysql.com/doc/refman/5.0/en/mysqlbinlog.html) and delete the uuups query from the log. This has to be done on both servers, on the master and on the slave. But when one of the servers (use the master first) is recovered you can enable you application again by just using this first server. After that you can recover the slave server and restart the replication. If you are an experienced user you can also start the recovering of the master and the slave server together, so both systems are nearly back at the same time. But so not mix up the systems, else you have to start from the beginning and your application stays offline.

We hope these hints can help you in your daily life with MySQL. There are also other posts about MySQL. Because in this post there was a lot about database replication mentioned, the post about MySQL - setup is also interesting for you.

May 29 2015
May 29

Last week, some colleagues from Cocomore and I attended DrupalCamp Spain 2015. Spanish Drupal community is awesome, and they have put all their efforts in making an unforgettable event again in this 6th edition (the 5th I have attended).

The event was divided into different activities for the three days: Business Day and Sprints on Friday, and sessions on Saturday and Sunday.

Starting my session.
Starting my session. Photo: pakmanlh (https://twitter.com/pakmanlh/status/602105515745910786)

I participated as speaker talking about dos and dont’s building a Drupal 8 site. We looked at our experiences with managing the project structure, the different ways of using Composer for managing your project, different merging strategies, evaluated the status of contrib and how we managed to reduce the risk of using betas by writing Behat tests and doing Continuous integration.

The topic is quite relevant, so got a lot of questions at the end and during all weekend. Keep them coming if you think I can help you!

Recording: https://vimeo.com/129005035
Slides: https://docs.google.com/presentation/d/1FPABmI1GVOUJzmS09JCXzObQuYhzU3rg...

DrupalCamp Spain is a well settled event already, so it’s attracting more and more international participants every year. Social events are well-planned and attractive, and the event is having more English sessions every year. I’m looking forward to next edition!

Visiting the tabancos.
Visiting the tabancos. Photo: juampy (https://twitter.com/juampynr/status/602192531636559872)

That’s a wrap! DrupalCamp Spain 2015 was an amazing event and I for sure will be there again next year. Thanks to the organization for their hospitality, it was real fun sharing those days with you!

Attachment Size thinking_about_a_drupal_8_project-_here_is_my_story_drupalcampspain2015_public.pdf 3.97 MB
May 28 2015
May 28

Last week, some colleagues from Cocomore and I attended DrupalCamp Spain 2015. Spanish Drupal community is awesome, and they have put all their efforts in making an unforgettable event again in this 6th edition (the 5th I have attended).

The event was divided into different activities for the three days: Business Day and Sprints on Friday, and sessions on Saturday and Sunday.

Starting my session.
Starting my session. Photo: pakmanlh (https://twitter.com/pakmanlh/status/602105515745910786)

I participated as speaker talking about dos and dont’s building a Drupal 8 site. We looked at our experiences with managing the project structure, the different ways of using Composer for managing your project, different merging strategies, evaluated the status of contrib and how we managed to reduce the risk of using betas by writing Behat tests and doing Continuous integration.

The topic is quite relevant, so got a lot of questions at the end and during all weekend. Keep them coming if you think I can help you!

Recording: https://vimeo.com/129005035

Slides: https://docs.google.com/presentation/d/1FPABmI1GVOUJzmS09JCXzObQuYhzU3rg...

DrupalCamp Spain is a well settled event already, so it’s attracting more and more international participants every year. Social events are well-planned and attractive, and the event is having more English sessions every year. I’m looking forward to next edition!

Visiting the tabancos.
Visiting the tabancos. Photo: juampy (https://twitter.com/juampynr/status/602192531636559872)

That’s a wrap! DrupalCamp Spain 2015 was an amazing event and I for sure will be there again next year. Thanks to the organization for their hospitality, it was real fun sharing those days with you!

May 12 2015
May 12

When setting up a MySQL Server there are a lot of things to consider. Most requirements depend on the intended usage of the system.

Beginning with the hardware requirements, this series of blogposts consists of our own experience, operating several hundred MySQL instances as well as a recent workshop our team attended. Before you now start optimizing your MySQL instance, consider the following: Standards are more important in multi-instance setups than individual performance tuning. Standards allow for easier debugging and give you a better handling for security related incidents. We strongly recommend the use of configuration management tools, like puppet or Chef for environments that are supposed to be consistent over all your systems.

The MySQL default settings, as of version 5.6 are great - and apart from larger systems, hardly any changes are necessary. For a standard LAMP stack, hosting a blog or a small website, not a lot of optimization is needed. Todays CMS come with sufficient configurations and tampering with the back end itself can cause more harm than it will help optimizing performance. These articles are mostly interesting, if you are developing your own applications. This first article focuses on the design of the underlying platform. It makes an estimated 10%-20% of the possible performance tuning. Nevertheless, if your application is poorly designed or it is not optimized, it will become quite expensive to try and fix the system the hardware-way. So, the first step is always to ensure a well structured and optimized application. We will address this in a future article.


Hardware / Operation system

Here are some general hardware considerations, viable for most setups:

CPU

MySQL does NOT scale a single query to multi-cores. (one query = one core). So it is better for your instance to have less - but faster - cores than vice versa. Try to avoid multi-CPU (note: multiple physical CPU, not cores), systems with a lot of ram. Usually CPU's have a direct bus to their RAM-banks. If RAM on a bank held be another CPU needs to be addressed, there will be overhead. In high performance setups rather go for a hexa- or octa-core than two quad-core CPU.

RAM

RAM has become a cheap resource these days. Use as much RAM as possible but it should match the database-size and have some extra space for the operating system and the application if existent on the same machine. If the database is served mostly or completely from RAM, it tends to have fast read speeds and only needs to write to disk, not to read from them, in most cases. This will be a very huge performance optimization, because operations in the RAM are easily 100 times faster than an SSD.

HDD

If you are using conventional, magnetic storage, faster turning disks are preferred. Try to go for 15k/RPM+. SSD or solid state drives are obviously even better than that and outperform every other storage medium at random IOPS (input output per seconds). For the RAID setup, go for RAID10 (better) or RAID1 (cheaper) but avoid RAID5/6 etc because the performance is bad at random writes. The less read/write operations from disk the better the performance.

File system

If you are not sure about the file system, go with the recommended type of your operating system. In general that means: Stay with ext4. In the very unlikely event of file system problem, the most common will make debugging a lot easier and in the long term, this outweighs the possible performance gain of other file systems by far.

I/O scheduler

The standard scheduler on a lot of operation systems is CFQ (Completely Fair Queuing). For databases, consider switching to NOOP or Deadline. Find out the scheduler your system is using

cat /sys/block/sda/queue/scheduler

This will give you an output like

noop [deadline] cfq

where the used scheduler is shown in brackets. As of kernel 2.6.10 it is possible to change the scheduler at runtime. You will need root permissions to do so.

echo noop > /sys/block/sda/queue/scheduler

to set your scheduler to noop. This setting is not persistent and will be reset at reboot. To make a setting permanent, it needs to be given to the kernel as a parameter at boot time.

elevator=<scheduler>

needs to be added, where <scheduler> needs to be noop or deadline.


Storage engine

If starting a new database, especially with MySQL 5.6, InnoDB will be be the standard engine. For already running projects, there is a way to convert MyISAM tables to InnoDB. This is usually not recommended as the performance gain will only impact very high performance databases and there is always a risk involved.

General Setup

Operation system

The decision for the operation system is one of the less important. At Cocomore we stay with the Ubuntu LTS versions. As mentioned in the beginning, systems that are setup the same way make configuration and debugging way easier and improve stability. The problem with LTS systems is that they oftentimes only offer relatively old packages. The default on Ubuntu 14.04, released in April 2014 is MySQL 5,5.

There are a couple of ways to install newer versions. As of February 2015, the newest stable MySQL version ist 5.6. This can be installed from the Ubuntu universe repository. Oracle themselves offer a repository for MySQL as well, you might need to login first, though. We recommend using the latest stable release, as of February 2015, this is version 5.6.


Database Replication

There are two possibilities:
  • statement based - In MySQL 5.1.4 and earlier, binary logging and replication used this format exclusively.
  • row based

Statement based replication stores the SQL statement in the binary log and will be executed on the slave server. This has the disadvantage that for example time updates etc. will also be executed as said within the statement. Because of this, there is a chance of inconsistency between Master and slave because the time or random statement will lead to different results on the different servers.

Row base replication is superior because only the results of a statement (the changed rows), will be stored in the binary logs and then the appropriate rows will be changed to the new result on the slave. But this requires much more disk space, because now not just the sql statement is stored any more but the whole rows which are changed.

The replication method can be changed on the fly, but we recommend the row based replication to avoid inconsistency between Master and Slave. Diskspace became very cheap, so there is no need to use the statement based replication.

As of MySQL 5.1.8, the server can change the binary logging format in real time according to the type of event using mixed-format logging. When the mixed format is in effect, statement-based logging is used by default, but automatically switches to row-based logging in particular cases.

High availability solutions

If your database goes down, your application will not work anymore. Therefore we recommend a high availability setup for your system if your application should stay online although there are some troubles in the background. There are some possibilities to ensure high availability for your database. The simple ones are easier and less expensive as an gallera cluster for example. It depends on the worth of your application how mush time and mone you want to spend to keep your application always online.


Master - Slave setup

  • sell also Master - Slave setup
  • simple asynchronous replication
  • in case of failure, switch to the slave and recover the master
  • switching can be done manually or automatically for example using Heartbeat

Active / passive cluster

  • same as before using a master - slave replication
  • using a vitual IP address which points to the master
  • underlying system is a SAN or DRBD
  • Heartbeat is switching the virtual IP address to the other system (slave) in case of error

mysql_ha_active_passive_cluster.jpg

Gallera cluster

  • see also Gallera cluster
  • Gallera is a cluster system of multiple environments with multiple masters which are all synchronized
  • there is a load-balancer switching the load to the different master databases
  • Gallera is synchronizing the multiple master databases, if statements are executed
  • works as long as the majority of the masters is online and connected to Gallera, therefore it has to be always an odd-numbered amount of Master databases
  • If one Master db crashes the others are still online and the crashed one can be repaired

mysql_ha_gallera_cluster.jpg

Conclusion

The first step for optimization is always your application itself. But there are also other possibilities to tune up your system by choosing the right hardware, the right operations system (OS), the correct file system and the best storage engine of MySQL itself for your application. With newer MySQL Versions new features but also performance improvements are delivered. Currently MySQL Version 5.6 (February 2015) is a very good way to deal with.

To ensure that your application is not going down if your database goes down there are possibilities to ensure high availability using database replications and different setups. It depends on your budget which solutions can be used, but always consider all possibilities of improvements (Hardware, DB tuning, replication or application tuning) and the estimated effect, so you can choose the improvement with the best cost-value ratio.

If you have questions or you need help with your application, please do not hesitate to contact us.

In our next post we will provide you some informations how to improve your MySQL settings in the my.cnf itself.

Other MySQL blog posts

Jan 02 2015
Jan 02
Drupal Commerce Delivery Partner

For eight years now, Cocomore builds large but also smaller websites with Drupal. Since then the team, the amount of projects and the possibilities have become more extensive. There were special solutions for special requirements in the past, for example content management systems (CMS) for managing content in websites (Wordpress, Jooma, Drupal) or e-Commerce systems for managing online shops like Magento. But those times are gone. In future, the challenge will be to integrate all these standalone systems to “rich-content-systems”, which will offer all the above mentioned functions within one big full service solution.

The integration and the interaction of these systems with each other offer the opportunity to use all the convenient functions of the different components together. That way, it will be possible to present the users a much better online solution with much more and much better functions. Just displaying a photo and some text for a product in a shop is not sufficient anymore today. The modern user expects more, especially concerning interactions with the shop itself like videos, custom reports, votings or a discussion board where he can get much more information and where he can interchange with others about the products. A pioneer in this sector is Amazon, where the user can comment and vote for a product - so users can get feedback from other users. Moreover, videos and further information is shown. This is today’s standard. This is what the user expects and every other shop in the web needs to come up to this mark.

Drupal Commerce is based on these means for interaction. Drupal has never been just a content management system, but also a framework with much more possibilities than just managing content. Drupal Commerce takes these advantages of Drupal and integrates an online shop on top. Consequently, all aspects of Drupal as a content management system, as a framework and also as a shop are combined. All features in one system. The usage of interfaces for migrating content or data from one system into another is not needed any more.

Since November 2014 the Cocomore AG is official Drupal Commerce Delivery Partner. The first aim of this partnership is a better establishment of Drupal Commerce in the German market. Therefore, some adaptions are needed for a better and smoother integration. The current strategy is to enlarge the existing Drupal Commerce distribution or to create a new German installation profile which fits the German market out of the box. In the current status,

Cocomore and the Commerce Guys are creating a concept to integrate further payment and tracking systems of logistic providers to make it fit better to German customers. Moreover, the consideration of the German system of taxation or the integration of several bonus programs, for example payback(.de), are planned. As soon as this concept phase is finished, the implementation can start. Then there are no barriers for Drupal Commerce anymore to become more famous in Germany. And with the implementation of first big lighthouse projects there will be good examples to set Drupal Commerce as the first choice for other customers as well. The future is based on cross-linked systems, and especially for big customers the interaction and integration of e-Commerce, CRM (customer relationship management) and personalization is a must-have today.

Nowadays, an online shop has to offer a special shopping experience for the end user to stand out from competitors, because the next online shop is just a click away.

Cocomore wants to help his customers to master this challenge by using Drupal and Drupal Commerce – either in e-Commerce or in another sector. Online communication becomes more and more important and it is impossible to succeed without it these days. With the sectors communication and IT the Cocomore AG offers – starting with the idea and concept, via arts and creation, up to implementation and management of the content - everything in one place.

Jan 01 2015
Jan 01
Drupal Commerce Delivery Partner

For eight years now, Cocomore builds large but also smaller websites with Drupal. Since then the team, the amount of projects and the possibilities have become more extensive. There were special solutions for special requirements in the past, for example content management systems (CMS) for managing content in websites (Wordpress, Jooma, Drupal) or e-Commerce systems for managing online shops like Magento. But those times are gone. In future, the challenge will be to integrate all these standalone systems to “rich-content-systems”, which will offer all the above mentioned functions within one big full service solution.

The integration and the interaction of these systems with each other offer the opportunity to use all the convenient functions of the different components together. That way, it will be possible to present the users a much better online solution with much more and much better functions. Just displaying a photo and some text for a product in a shop is not sufficient anymore today. The modern user expects more, especially concerning interactions with the shop itself like videos, custom reports, votings or a discussion board where he can get much more information and where he can interchange with others about the products. A pioneer in this sector is Amazon, where the user can comment and vote for a product - so users can get feedback from other users. Moreover, videos and further information is shown. This is today’s standard. This is what the user expects and every other shop in the web needs to come up to this mark.

Drupal Commerce is based on these means for interaction. Drupal has never been just a content management system, but also a framework with much more possibilities than just managing content. Drupal Commerce takes these advantages of Drupal and integrates an online shop on top. Consequently, all aspects of Drupal as a content management system, as a framework and also as a shop are combined. All features in one system. The usage of interfaces for migrating content or data from one system into another is not needed any more.

Since November 2014 the Cocomore AG is official Drupal Commerce Delivery Partner. The first aim of this partnership is a better establishment of Drupal Commerce in the German market. Therefore, some adaptions are needed for a better and smoother integration. The current strategy is to enlarge the existing Drupal Commerce distribution or to create a new German installation profile which fits the German market out of the box. In the current status,

Cocomore and the Commerce Guys are creating a concept to integrate further payment and tracking systems of logistic providers to make it fit better to German customers. Moreover, the consideration of the German system of taxation or the integration of several bonus programs, for example payback(.de), are planned. As soon as this concept phase is finished, the implementation can start. Then there are no barriers for Drupal Commerce anymore to become more famous in Germany. And with the implementation of first big lighthouse projects there will be good examples to set Drupal Commerce as the first choice for other customers as well. The future is based on cross-linked systems, and especially for big customers the interaction and integration of e-Commerce, CRM (customer relationship management) and personalization is a must-have today.

Nowadays, an online shop has to offer a special shopping experience for the end user to stand out from competitors, because the next online shop is just a click away.

Cocomore wants to help his customers to master this challenge by using Drupal and Drupal Commerce – either in e-Commerce or in another sector. Online communication becomes more and more important and it is impossible to succeed without it these days. With the sectors communication and IT the Cocomore AG offers – starting with the idea and concept, via arts and creation, up to implementation and management of the content - everything in one place.

Oct 21 2014
Oct 21
img_20141001_152214-smile_0.jpg

Some weeks ago (29th Sept - 3rd Oct) Cocomore attended the European DrupalCon in Amsterdam with five colleagues: penyaskito (Christian López), kfritsche (Karl Fritsche), jsbalsera (Jesús Sánchez), LoMo (Lowell Montgomery) and Carsten Müller where there, and we also attended to the extended sprints before and after the Con. The numbers of this Drupalcon are impressive: more than 2300 attendees from over 64 countries. There were more than 100 sessions so, either if you came or not, you will find the link to all the DrupalCon Amsterdam sessions handful!

Diary

Saturday - Getting there

On Saturday we travelled to Amsterdam. It’s like always an exciting day, looking forward to see again not only friends from the community and new people to know, but also being able to reunite again coworkers who live almost 2000 kms away. And when you get into the airport you start recognizing people from other events, or only because we all wear Drupal t-shirts!

Sunday - Extended Sprints

The extended Sprints were hosted at Berlage Meet & Workspace, an amazing place just near to the Centre Station. There was plenty of space there to sit and help working in Drupal 8 core. As always is great to work with all the people from the community.

Monday - Sprints and Community Summit

On Monday the Sprints moved to the conference venue, Amsterdam RAI. The place there was even bigger for all the sprinting people (around 180 sprinters) and you could see people working not only in Drupal Core but also in important projects like Drupal Commerce or Drush. Karl joined the Community Summit and participate in the group about training experiences.

Tuesday - Start of Sessions

There were 120 sessions this year. so it was a really hard decision to choose between them. You can access to the complete program including links to the recorded videos at the DrupalCon Amsterdam website. The Opening Session, or prenote, was mostly a history of DrupalCon told by people which lives were changed there. Some histories were fun and some others were beautiful, but there were time to include some jokes and fun parts with a curious recreation of some events. Then came the Keynote by Dries Buytaert, and the Drupal 8 Beta One was announced! The keynote was a discussion about how to make the Drupal project development sustainable, by making the contribution more attractive to people and organizations. After that the traditional Group Photo was taken.

As you can see, tons of people :-)

15399906982_2ee1d506c1_o_0.jpg

Wednesday

On Wednesday the beta was finally released, so everyone could just download and install it, and make all the needed testing. This day’s Keynote was delivered by Cory Doctorow, science fiction writer and the co-editor of Boing Boing, among other achievements. You can access to the Wednesday schedule and access to all the sessions descriptions and videos. But this day was also strange, because all the Spanish community, with ours Christian and Jesús among them, looked really agitated. As we knew the day after they were invited to assist to a secret meeting by the Drupal Association, because the city selected to held the next DrupalCon was Barcelona, and they should know in advance.

Thursday

On Thursday there wasn’t a Keynote, but instead a number of small but interesting Drupal Lightning Talks. We want to remark the Console module, based in the Symfony Console Component: a CLI tool that helps creating new modules, controllers, etc automatically. And the #D8in8 initiative looks like a great way to involve a company into learning and contributing in Drupal 8. Lowell made a awesome job summarizing the Q&A with Dries that we can only recommend you to read, although you can also hear the audio. Again, the schedule is available online with links to the sessions descriptions and videos. At the end there was the Closing session, where they talked about future events like DrupalCon Bogotá and DrupalCon Barcelona was unveiled. That same night we assisted to the Trivia Night, hosted by the Irish group. It was tons of fun, but really hard. Our team was named 1396891800, because the timestamp when Heartbleed was announced, and thanks to Christian we won the prize to the best handwriting!

Friday - Mentored Core Sprints

Fridays was all about sprinting. Karl and Christian worked as mentors helping people, and Carsten, Jesús and Lowell were sprinting.

Saturday - Extended Sprints

On Saturday we went back to Berlage Meet & Workspace, so we were sprinting again.

Sunday - Goodbye Amsterdam

At the end all the good things have to end, and we had to get into the airport and travel back to our respective cities, Christian and Jesús travelling to Sevilla and Carsten, Karl and Lowell to Frankfurt. It was a really great DrupalCon, but we expect Barcelona to be even better!

Sessions

We attended to a bunch of a great collection of sessions, so we want to recommend some of them that we found really interesting:

What's next?

DrupalCamp Berlin

There is the DrupalCamp Berlin happening at the 15th and 16th of November in our capital. We are looking forward to meet you there again.

DrupalCon in Barcelona!

The next european DrupalCon will happen in Barcelona. We are happy about the decision made by the Drupal Association and we are looking forward to see you all again next year in the sunny city of Barcelona!

Thanks!

So it was a great DrupalCon. We can only say thank you to the organizers, the mentors, the local group and all the outstanding people that are part of this amazing community. We are proud to be part of it. img-20140928-wa0001_0.jpg
Oct 20 2014
Oct 20

img_20141001_152214-smile_0.jpg

Some weeks ago (29th Sept - 3rd Oct) Cocomore attended the European DrupalCon in Amsterdam with five colleagues: penyaskito (Christian López), kfritsche (Karl Fritsche), jsbalsera (Jesús Sánchez), LoMo (Lowell Montgomery) and Carsten Müller were there, and we also attended to the extended sprints before and after the Con. The numbers of this DrupalCon are impressive: more than 2300 attendees from over 64 countries. There were more than 100 sessions so, either if you came or not, you will find the link to all the DrupalCon Amsterdam sessions handful!

Diary
Saturday - Getting there

On Saturday we travelled to Amsterdam. It’s like always an exciting day, looking forward to see again not only friends from the community and new people to know, but also being able to reunite again coworkers who live almost 2000 kms away. And when you get into the airport you start recognizing people from other events, or only because we all wear Drupal t-shirts!

Sunday - Extended Sprints

The extended Sprints were hosted at Berlage Meet & Workspace, an amazing place just near to the Centre Station. There was plenty of space there to sit and help working in Drupal 8 core. As always is great to work with all the people from the community.

Monday - Sprints and Community Summit

On Monday the Sprints moved to the conference venue, Amsterdam RAI. The place there was even bigger for all the sprinting people (around 180 sprinters) and you could see people working not only in Drupal Core but also in important projects like Drupal Commerce or Drush. Karl joined the Community Summit and participate in the group about training experiences.

Tuesday - Start of Sessions

There were 120 sessions this year. so it was a really hard decision to choose between them. You can access to the complete program including links to the recorded videos at the DrupalCon Amsterdam website. The Opening Session, or prenote, was mostly a history of DrupalCon told by people which lives were changed there. Some histories were fun and some others were beautiful, but there were time to include some jokes and fun parts with a curious recreation of some events. Then came the Keynote by Dries Buytaert, and the Drupal 8 Beta One was announced! The keynote was a discussion about how to make the Drupal project development sustainable, by making the contribution more attractive to people and organizations. After that the traditional Group Photo was taken.

As you can see, tons of people :-)

15399906982_2ee1d506c1_o_0.jpg

Wednesday

On Wednesday the beta was finally released, so everyone could just download and install it, and make all the needed testing. This day’s Keynote was delivered by Cory Doctorow, science fiction writer and the co-editor of Boing Boing, among other achievements. You can access to the Wednesday schedule and access to all the sessions descriptions and videos. But this day was also strange, because all the Spanish community, with ours Christian and Jesús among them, looked really agitated. As we knew the day after they were invited to assist to a secret meeting by the Drupal Association, because the city selected to held the next DrupalCon was Barcelona, and they should know in advance.

Thursday

On Thursday there wasn’t a Keynote, but instead a number of small but interesting Drupal Lightning Talks. We want to remark the Console module, based in the Symfony Console Component: a CLI tool that helps creating new modules, controllers, etc automatically. And the #D8in8 initiative looks like a great way to involve a company into learning and contributing in Drupal 8. Lowell made a awesome job summarizing the Q&A with Dries that we can only recommend you to read, although you can also hear the audio. Again, the schedule is available online with links to the sessions descriptions and videos. At the end there was the Closing session, where they talked about future events like DrupalCon Bogotá and DrupalCon Barcelona was unveiled. That same night we assisted to the Trivia Night, hosted by the Irish group. It was tons of fun, but really hard. Our team was named 1396891800, because the timestamp when Heartbleed was announced, and thanks to Christian we won the prize to the best handwriting!

Friday - Mentored Core Sprints

Fridays was all about sprinting. Karl and Christian worked as mentors helping people, and Carsten, Jesús and Lowell were sprinting.

Saturday - Extended Sprints

On Saturday we went back to Berlage Meet & Workspace, so we were sprinting again.

Sunday - Goodbye Amsterdam

All the good things have to end, and we had to get into the airport and travel back to our respective cities, Christian and Jesús travelling to Sevilla and Carsten, Karl and Lowell to Frankfurt. It was a really great DrupalCon, but we expect Barcelona to be even better!

Sessions

We attended to a bunch of a great collection of sessions, so we want to recommend some of them that we found really interesting:

What's next?

DrupalCamp Berlin

There is the DrupalCamp Berlin happening at the 15th and 16th of November in our capital. We are looking forward to meet you there again.

DrupalCon in Barcelona!

The next european DrupalCon will happen in Barcelona. We are happy about the decision made by the Drupal Association and we are looking forward to see you all again next year in the sunny city of Barcelona!

Thanks!

So it was a great DrupalCon. We can only say thank you to the organizers, the mentors, the local group and all the outstanding people that are part of this amazing community. We are proud to be part of it.

img-20140928-wa0001_0.jpg

Oct 09 2014
Oct 09

Field collections is a nice contributed module that extends the default Drupal entity functionality by creating a new entity field that can be composed by other fields. With this module we solve problems like creating complex entities where we want to store multiple different values into one single field. This works because Drupal lets us assign unlimited values for a field, which links to the field collection entity where we have multiple fields, thats how we "grouped" multiple fields into one field.

At a basic usage, field collections is not difficult to add to our entity, but when we want to do some advanced stuff, this module can be very complex. Here I will show how to do some magic with it, programatically.

Obtain the values of the child fields

How to access the field collection values of an entity? Field collections store field collection items, which are the values of this kind of field. The field collection items use an ID, and with this ID we can find other fields. It also defines a new entity type called “field_collection_item”.

  1. Access to all values of a field collection on an existing entity, using Field API // Get the items of a field collection, from a node
    $field_node_example_values = field_get_items('node', $node, 'field_node_example');

    // Use a field collection helper function to get all the field collection item ids
    $field_node_example_ids = field_collection_field_item_to_ids($field_node_example_values);
    // By default, Drupal don't load the field collection items
    $field_node_example_fc_items = field_collection_item_load_multiple($field_node_example_ids);

    // Loop over every field collection item and get the values for each field
    foreach ( field_node_example_fc_items as $item) {
        $fc_field_values = field_get_items('field_collection_item', $item, 'field_inside_fc');
    }

  2. Access to all values of a field collection on an existing entity, using an entity wrapper

    $node_wrapper = entity_metadata_wrapper('node', $nid);
    // Loop over the collections until we find which we have to modify
    foreach ($node_wrapper->field_example->value() as $field_example_value) {
       // Wrap it with Entity API
       $fc_wrapper = entity_metadata_wrapper('field_collection_item', $field_example_value);
       $fc_field_value = $fc_wrapper->field_example_child->value();
    }

Alter the child fields

Now let's see how we can modify or remove items from an existing field collection of an entity. To do things easily, I prefer to use here an entity wrapper.

  1. Alter the value of one of the fields of a concrete field collection item $fc_item = field_collection_item_load($item_id);

    // Check there's no problem with the item
    if (!$fc_item) {
      return;
    }

    // Wrap it before modifying
    $fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $fc_item);
    $field_value = $fc_item_wrapper->field_example->value();
       ... change $field_value ...
    $fc_item_wrapper->field_example->set($field_value);
    $fc_item_wrapper->save();

  2. Delete a field collection item

    $fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $item_id);
    $fc_item_wrapper->delete();

Create a field_collection_item

Field collection items use a “entity host”, which is the entity to whom the field collection is attached. To add a new field collection item to an existing field collection field, we have to create it and set its entity host, then we can assing values to every single field of the field collection item and save it.

// Create a field_collection_item entity
$fc_item = entity_create('field_collection_item', array('field_name' => 'field_example_is_a_field_collection'));

// Attach it to the node
$fc_item->setHostEntity('node', $node);

// Check there's no problem with the item
if (!$fc_item) {
  return;
}

// Wrap it with Entity API
$fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $fc_item);

// Assign values to its fields
foreach($fc_item_values as $field_name => $field_value){
  $fc_item_wrapper->$field_name->set($field_value);
}

$fc_item_wrapper->save();


Alter a field_collection field into a form

When we are creating or editing a node (or any other entity) we use a form, and to modify it usually the hook_form_alter is used. Here are some interesting examples of how to alter the field collection widget.

  1. Change the options for a select box on all the field collection items and don't display the remove button for the first item. $field_name = 'field_collection_example';
    $fp_langcode = $form[$field_name]['#language'];
    $options = array( … );
    foreach (element_children($form[$field_name][$fp_langcode]) as $child) {
      // All the unlimited values fields have the “Add more” button as a child, but it's not a field collection item
      if (is_numeric($child)) {
        $form[$field_name][$fp_langcode][$child]['field_selectable'][$fp_langcode]['#options'] = $options;

        // Don't display the remove button for the first field collection item
        if ($child == 0) {
          unset($form[$field_name][$fp_langcode][$child]['remove_button']);
        }
      }
    }

  2. The field collection field stores some state information about it on $form_state. With this information we can know, realtime, how many items we have on the form and take decisions about it. For example, we have an unlimited values field collection field, but we want to limit the number of items depending on some certain circunstances. With this example, we can control a field to not display more than 3 field collection items on the form. $field_name = 'field_collection_example';
    $fp_langcode = $form[$field_name]['#language'];

    // Get state information about this field
    $fp_parents = $form[$field_name][$fp_langcode]['#field_parents'];
    $field_state = field_form_get_state($fp_parents, $field_name, $fp_langcode, $form_state);

    // The field state will change everytime we click on “Add more”, after the ajax call is triggered and the form is re-rendered to display the changes.

    // The user can see a maximum of 3 field collection items
    $items_limit = 3;
    if ($field_state['items_count'] < $items_limit) {
      // I want to change the “Add more” button title
      $form[$field_name][$fp_langcode]['add_more']['#value'] = t('Add another');
    }
    else {
      unset($form[$field_name][$fp_langcode]['add_more']);
    }

Clone field_collections from an existing node to a new node

Finally, here is an example of how to assign some default values to a field collection on a node creation form. As you can suspect, this is tricky if the value to clone is only one field collection item, but if we want to clone more than one, it's a problem because Drupal by default will only provide the form widget to enter the first item values (and wait for you to click on “Add more”).

The technique is to reproduce what Drupal does when the Field API attaches the fields to the node form. Using this way, Drupal will provide all the form structure we need to see all the values that come from the node we want to use as origin, but this has a problem and is that doing it this way we are assigning the same field collection items to two different nodes and if one of the nodes changes the values of one of the items, this will be reflected on the other node. The solution is to reset the item_id and revision_id values for the items on the new node, so we get the default values we want and they will be stored as new field collection items attached to the new node.

    $original_node = node_load(123);
    $node_type = 'my_custom_type';
   
    // Get the fields defined for this node type;
    $node_fields =  field_info_instances('node', $node_type);

    // Re-create the fields for the original node, like when editing it
    $tmpform = array();
    $tmpform['#node'] = $original_node;
    $tmpform['type']['#value'] = $node_type;
    $tmpform_state = array( 'build_info' => array('form_id' => $form['#form_id']) );
    field_attach_form('node', $original_node, $tmpform, $tmpform_state, entity_language('node', $original_node));

    // Here we have on $tmpform the form structure we need and with the default values.
    // We can choose what fields to clone, but in this example we will loop over all the node fields and clone all of them
    foreach($node_fields as $field_name => $field_settings) {
      // Copy the form structure
      $form[$field_name] = $tmpform[$field_name];
      // Copy state information about this field
      $form_state['field'][$field_name] = $tmpform_state['field'][$field_name];

      // When copying the field_collection structure, reset the id of the entities and
      // they will be created again with a new id.
      $langcode = field_language('node', $original_node, $field_name);
      if ($form_state['field'][$field_name][$langcode]['field']['type'] == 'field_collection') {
        $field_childs = &$form_state['field'][$field_name][$langcode]['entity'];
        foreach(element_children($field_childs) as $idx => $fc_entity) {
          $field_childs[$idx]->item_id = NULL;
          $field_childs[$idx]->revision_id = NULL;
        }
      }
   }

Oct 08 2014
Oct 08

Field collections is a nice contributed module that extends the default Drupal entity functionality by creating a new entity field that can be composed by other fields. With this module we solve problems like creating complex entities where we want to store multiple different values into one single field. This works because Drupal lets us assign unlimited values for a field, which links to the field collection entity where we have multiple fields, thats how we "grouped" multiple fields into one field.

At a basic usage, field collections is not difficult to add to our entity, but when we want to do some advanced stuff, this module can be very complex. Here I will show how to do some magic with it, programatically.

Obtain the values of the child fields

How to access the field collection values of an entity? Field collections store field collection items, which are the values of this kind of field. The field collection items use an ID, and with this ID we can find other fields. It also defines a new entity type called “field_collection_item”.

  1. Access to all values of a field collection on an existing entity, using Field API // Get the items of a field collection, from a node
    $field_node_example_values = field_get_items('node', $node, 'field_node_example');

    // Use a field collection helper function to get all the field collection item ids
    $field_node_example_ids = field_collection_field_item_to_ids($field_node_example_values);
    // By default, Drupal don't load the field collection items
    $field_node_example_fc_items = field_collection_item_load_multiple($field_node_example_ids);

    // Loop over every field collection item and get the values for each field
    foreach ( field_node_example_fc_items as $item) {
        $fc_field_values = field_get_items('field_collection_item', $item, 'field_inside_fc');
    }

  2. Access to all values of a field collection on an existing entity, using an entity wrapper

    $node_wrapper = entity_metadata_wrapper('node', $nid);
    // Loop over the collections until we find which we have to modify
    foreach ($node_wrapper->field_example->value() as $field_example_value) {
       // Wrap it with Entity API
       $fc_wrapper = entity_metadata_wrapper('field_collection_item', $field_example_value);
       $fc_field_value = $fc_wrapper->field_example_child->value();
    }

Alter the child fields

Now let's see how we can modify or remove items from an existing field collection of an entity. To do things easily, I prefer to use here an entity wrapper.

  1. Alter the value of one of the fields of a concrete field collection item $fc_item = field_collection_item_load($item_id);

    // Check there's no problem with the item
    if (!$fc_item) {
      return;
    }

    // Wrap it before modifying
    $fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $fc_item);
    $field_value = $fc_item_wrapper->field_example->value();
       ... change $field_value ...
    $fc_item_wrapper->field_example->set($field_value);
    $fc_item_wrapper->save();

  2. Delete a field collection item

    $fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $item_id);
    $fc_item_wrapper->delete();

Create a field_collection_item

Field collection items use a “entity host”, which is the entity to whom the field collection is attached. To add a new field collection item to an existing field collection field, we have to create it and set its entity host, then we can assing values to every single field of the field collection item and save it.

// Create a field_collection_item entity
$fc_item = entity_create('field_collection_item', array('field_name' => 'field_example_is_a_field_collection'));

// Attach it to the node
$fc_item->setHostEntity('node', $node);

// Check there's no problem with the item
if (!$fc_item) {
  return;
}

// Wrap it with Entity API
$fc_item_wrapper = entity_metadata_wrapper('field_collection_item', $fc_item);

// Assign values to its fields
foreach($fc_item_values as $field_name => $field_value){
  $fc_item_wrapper->$field_name->set($field_value);
}

$fc_item_wrapper->save();


Alter a field_collection field into a form

When we are creating or editing a node (or any other entity) we use a form, and to modify it usually the hook_form_alter is used. Here are some interesting examples of how to alter the field collection widget.

  1. Change the options for a select box on all the field collection items and don't display the remove button for the first item. $field_name = 'field_collection_example';
    $fp_langcode = $form[$field_name]['#language'];
    $options = array( … );
    foreach (element_children($form[$field_name][$fp_langcode]) as $child) {
      // All the unlimited values fields have the “Add more” button as a child, but it's not a field collection item
      if (is_numeric($child)) {
        $form[$field_name][$fp_langcode][$child]['field_selectable'][$fp_langcode]['#options'] = $options;

        // Don't display the remove button for the first field collection item
        if ($child == 0) {
          unset($form[$field_name][$fp_langcode][$child]['remove_button']);
        }
      }
    }

  2. The field collection field stores some state information about it on $form_state. With this information we can know, realtime, how many items we have on the form and take decisions about it. For example, we have an unlimited values field collection field, but we want to limit the number of items depending on some certain circunstances. With this example, we can control a field to not display more than 3 field collection items on the form. $field_name = 'field_collection_example';
    $fp_langcode = $form[$field_name]['#language'];

    // Get state information about this field
    $fp_parents = $form[$field_name][$fp_langcode]['#field_parents'];
    $field_state = field_form_get_state($fp_parents, $field_name, $fp_langcode, $form_state);

    // The field state will change everytime we click on “Add more”, after the ajax call is triggered and the form is re-rendered to display the changes.

    // The user can see a maximum of 3 field collection items
    $items_limit = 3;
    if ($field_state['items_count'] < $items_limit) {
      // I want to change the “Add more” button title
      $form[$field_name][$fp_langcode]['add_more']['#value'] = t('Add another');
    }
    else {
      unset($form[$field_name][$fp_langcode]['add_more']);
    }

Clone field_collections from an existing node to a new node

Finally, here is an example of how to assign some default values to a field collection on a node creation form. As you can suspect, this is tricky if the value to clone is only one field collection item, but if we want to clone more than one, it's a problem because Drupal by default will only provide the form widget to enter the first item values (and wait for you to click on “Add more”).

The technique is to reproduce what Drupal does when the Field API attaches the fields to the node form. Using this way, Drupal will provide all the form structure we need to see all the values that come from the node we want to use as origin, but this has a problem and is that doing it this way we are assigning the same field collection items to two different nodes and if one of the nodes changes the values of one of the items, this will be reflected on the other node. The solution is to reset the item_id and revision_id values for the items on the new node, so we get the default values we want and they will be stored as new field collection items attached to the new node.

    $original_node = node_load(123);
    $node_type = 'my_custom_type';
   
    // Get the fields defined for this node type;
    $node_fields =  field_info_instances('node', $node_type);

    // Re-create the fields for the original node, like when editing it
    $tmpform = array();
    $tmpform['#node'] = $original_node;
    $tmpform['type']['#value'] = $node_type;
    $tmpform_state = array( 'build_info' => array('form_id' => $form['#form_id']) );
    field_attach_form('node', $original_node, $tmpform, $tmpform_state, entity_language('node', $original_node));

    // Here we have on $tmpform the form structure we need and with the default values.
    // We can choose what fields to clone, but in this example we will loop over all the node fields and clone all of them
    foreach($node_fields as $field_name => $field_settings) {
      // Copy the form structure
      $form[$field_name] = $tmpform[$field_name];
      // Copy state information about this field
      $form_state['field'][$field_name] = $tmpform_state['field'][$field_name];

      // When copying the field_collection structure, reset the id of the entities and
      // they will be created again with a new id.
      $langcode = field_language('node', $original_node, $field_name);
      if ($form_state['field'][$field_name][$langcode]['field']['type'] == 'field_collection') {
        $field_childs = &$form_state['field'][$field_name][$langcode]['entity'];
        foreach(element_children($field_childs) as $idx => $fc_entity) {
          $field_childs[$idx]->item_id = NULL;
          $field_childs[$idx]->revision_id = NULL;
        }
      }
   }

Oct 06 2014
Oct 06

One Drupalcon session of particular interest to many in the community, since the first “episode”, has been the “Q&A with Dries”, a core-conversation-track session in which Dries is joined by a panel of his initiative leads and others in the “inner circle” of Drupal 8 core development. Since I’d wished, in the past, that sessions like these had a video recording to show who was talking, I brought my DSLR and a shotgun microphone this time, thinking I’d contribute the resulting video. I don’t think the video I shot was technically perfect enough to share; perhaps I could fix that, but I also realized that one panel member prefers to limit her exposure on the Web—and respect that, of course; since it’s much easier to blur or block out a face in a few images than in a video, and since you can read this summary in much less time than the hour+ -length session, I decided to provide stills from the video, along with a summary of the questions and answers, which ranged from the whimsical (a bet on how long it would be till Drupal 8 would be released as “stable”), to various business and architecture questions, and other concerns.

Q and A with Dries and panelists, Drupalcon Amsterdam

(You’ll find a more serious answer to that question if you read on...). Of course, Dries began by asking each of his panelists to introduce themselves. Those present were:

intro_gabor.jpgGábor Hojtsy, who works for Acquia and introduced himself, first, as the Drupal 6 maintainer; he also leads the Multilingual initiative for Drupal 8.

Nathaniel CatchpoleNathaniel Catchpole (catch), a major core maintainer with special focus on optimizing performance.

intro_alexpott.jpgAlex Pott, who works for ChapterThree, and supports Drupal as a core maintainer, also contributes actively in the configuration management initiative for Drupal 8.

yched introduces himselfYves Chedemois (yched), a freelancer and volunteer contributor to Drupal core, especially active as the maintainer of the Drupal 8 Field API (he formerly maintained CCK).

Wim Leers, core maintainerWim Leers (of Acquia, who works on the Spark initiative and Drupal 8 performance

Jess (xjm), who was the major heavy lifter for getting Views into Drupal 8 core, alongside her very active community mentoring role, now is most active with release planning and other steps toward getting Drupal 8 to the community.

Dries jokes and introduces himself as 'Drice'

Dries made everyone laugh, then, by introducing himself… and pronouncing his name as if it rhymed with “rice”. He followed by submitting the first questions to the panelists; these initial questions were selected from those emailed to him before the day of the session. Everyone had something to say for the first question.

Q: Are there any lessons learned, so far, from the Drupal 8 release cycle?

Alex Pott pointed out that changing core is taking longer and longer as the complexity increases and the needs of the greater Drupal community become more varied. “It’s no longer a matter of developers having a good idea and putting a patch on Drupal.org”, he said. You have to get everything reviewed and tested and re-tested, usually through many iterations, before a patch finally makes it into core.

Yves Chedemois (yched) added that it really helped having a bigger team of people assisting in the Field API initiative, compared to how things have sometimes been in the past, before the initiatives, with only one or two people working on a particular sub-system; so now he might have five or six developers actively supporting him and who are all able to review each others work, and take over from one another if anyone is ill or leaves the team. He pointed out that, of course, finding five or six people who can keep active for the full 2-3 years that has been this development cycle has been one challenge; it’s just not realistic to expect.

Gábor weighed in with the fact that the whole extra communication with the community was something that hadn’t been so present before and has helped to find people identify their strengths and find ways to contribute to the development process. Extra communications on Drupal.org, the core conversations like this Q&A session, and the initiatives, themselves, helped to build a better level of involvement and ability to contribute.

Dries also added that people asked whether the initiatives, themselves, were a success, and wanted to say that he, indeed, found them very useful for the development cycle. It helped communicate a sort of roadmap for Drupal with the key areas that needed work. Having clearly communicated, specific goals, and teams working with specific areas of interest, in turn helped gather more people to help. He pointed out that the initiatives which were most successful in gathering a team to rally to their cause tended to be the ones with leaders with the best ability to communicate their goals; and of course they also had to have great technical skills and be skilled project managers. Dries added that, if he were to do it again, he would try to get a small team together for each initiative, from the start, with individuals able to bring all important strengths to work for each initiative. It’s a lot to ask from one person.

Q: How do you best prepare for Drupal 8?

Nathaniel Catchpole (catch), suggested that if you are a site-builder, experiment with building up a Drupal 8 version of a site you want to migrate to Drupal 8, or just begin building up a site; just remember that we are just at the first beta, so things might be changing. But if you just practice building up your site structure and learn what you can do, that can be very helpful as a first step to being comfortable with Drupal 8.

Wim Leers added that it’s a good time for the community to get the input from experienced site builders who have familiarity with how things work in Drupal 7 and might find some areas where performance or user experience have been affected in a negative manner; there might still be time to fix remaining issues identified now.

Jess recommended that users who need to migrate from Drupal 6, which is scheduled for “end of life” about six months after the release of a stable Drupal 8.0.0, practice building up the functionality they need in Drupal 8, determining any areas where core functionality doesn’t fill their requirements. A lot of functionality which was formerly only in contrib is now in core, but you can identify what contrib modules you still need to see ported. Keep your Drupal 6 site running, but you can locally test and practice the migration path from Drupal 6 to Drupal 8. Currently this path lacks a user interface and has some other rough areas, but there is documentation. Then you can follow and support the development of contrib modules that are blockers for your ideal upgrade.

Alex Pott added that if you are a PHP developer, it’s a good time to be learning about all the new object-oriented stuff in core; getting your head around that. He recommended looking at PHP: The Right Way for some good tips. Themers should work on learning Twig and a new base theme, Classy, just committed to Drupal 8. But beware, the others added: the theme layer will not be frozen until closer to the final release date, so there are still some things that will change. Also, there is now a full-featured Entity API in core, so when modeling your site, think in terms of entities and think about what is really content or not.

Gábor reminded us that even if you aren’t ready to dive into Drupal 8, there are a lot of good talks, blog posts, and development surrounding bringing a lot of “Drupal 8 improvements” into Drupal 7 sites, so you can learn your way around PHPUnit, Composer, etc, as a first step to getting comfortable with Drupal 8.

Dries then opened the floor to additional questions from the audience. The first participant actually asked two questions, one more serious than the other.

Q: If you had to bet on the release date for Drupal 8, what date would that be?

That guy who asked three questions...This question got a good laugh and perhaps more discussion time than was necessary. After skipping it to take his serious question, this one actually did get some answer time; Jess made some cogent points: that it’s not a good idea to base business decisions on any predictions around the release date of Drupal 8, but that the community is betting on it being soon and successful. She suggested that any really large projects which will take years to develop are good candidates for looking at the components of Drupal 8 as appropriate building blocks and starting work. His second question was one that, perhaps other developers who haven’t yet worked (much) with Drupal 8 code, could relate to.

Q: In the past, someone who doesn’t do a lot of development could still make a simple tweak to simple module. Now there is so much code for the new Symfony-based modules. Isn’t all this code scary?

catch pointed out that once you are familiar with it, there are still lots of places you can easily make the same kind of tweaks with Views in core, and with plugins and the configuration management. yched added that most of the hooks available in Drupal 7 are still available. Gábor said that he could remember a time, not so long ago, when he’d also been daunted by the complexity and differences between the way things are done in Drupal 8 versus how they were done in Drupal 7, but after starting to work with it, you will learn the new patterns and it starts to make sense and actually be easier, in many ways. Dries added that it’s common to be daunted by the “more-lines-of-code”, but that the object orientation actually reduces the complexity and makes it easier to extend and understand, once you are familiar with the design patterns. He also pointed out that in Drupal 7 you had to know all the hooks and that now, it’s more declarative and you can work with what you want to happen, based on events. So there is less you need to learn, and less “magic”.

Wim reminded us that Drupal 8 introduces greater strictness, which translates to an increase in verbosity, but also makes it easier to find and avoid problems.

Q: How does Drupal 8 architecture matter to clients? Why should they care about developing a site in Drupal 8?

Chris Amato, aka knectar on drupal.orgChris Amato (knectar) asked this question, to which Dries began by pointing out that there is a lot more support “out-of-the-box” for things like mobile content, with responsive designs and services deeply integrated. yched added that every entity type is now natively translatable and versionable and that every field can be manipulated with the same familiar tools. Gábor added that there are lot more Views and things that can be individually tweaked to a clients needs. Even admin pages are Views-based and the modules you use will also incorporate this flexibility, so there should be less need for hacks to work around what a client needs.

The next question had to do with decoupling in Drupal 8 and so-called “headless Drupal”

Q: (paraphrased) How does “headless Drupal” and decoupling fit in and is this something we will be seeing more of in Drupal 9?

The guy who asked about headless Drupal in Drupal 9Dries said that it was really too early to know what the focus of Drupal 9 would be, but that it would likely involve greater decoupling, yes. Others pointed out that it’s already possible to do a lot with headless Drupal and that we can look for a big growth in that direction coming from contrib and possibly making its way into core before Drupal 9.

The next question brought us to the issue of documentation.

Q: Will there be some books for Drupal 8 and better documentation?

That guy who asked about documentation...Gábor started by pointing out that there is already a Drupal 8 API section, a lot of which is pretty well fleshed-out. There are still places for people to get involved and help update since there have been so many changes since the initial pages were written. And Jennifer Hodgdon is already working on a book for Drupal 8 development. Dries pointed out that there are now about 50 or so books on Drupal 7, and that things are still changing enough it’s still too early for publication of Drupal 8 books, but that we can expect a variety of books on Drupal 8 soon after its release. The API documentation and other Drupal 8 usage documentation is in various stages of completion. xjm pointed out that we need help with the documentation on drupal.org and that this is a great way to get involved.

Q: “What is being done or can be done to help bring funding to Drupal development?” (heavily paraphrased)

Rudi van Es of the local Amsterdam Drupal community

Rudi van Es, an Amsterdam-based member of the local Drupal shop, limongroen, came with this question.

Dries indicated that the Drupal Association can sometimes help find parties who would also benefit from certain development to help find funding for some projects, but that this is part of what Large Scale Drupal is working to accomplish and that maybe we also need a “Small Scale Drupal” to work more directly with individual developers. Some of the funding that has already come out of Large Scale Drupal went into improving workflows for media and publishing companies on Drupal; this effort has been added to the Workbench project. Dries also reminded us of his keynote, where he discussed better incentivizing contribution. And some organizations might be more willing or able to donate than actual time and expertise to Drupal development. Dries acknowledged that there are limits to the number of companies who are actively funding Drupal projects and initiatives and this is one of the challenges facing the community. While Wikipedia has been able to successfully crowdfund, they have a unique advantage in being able to directly access the end users; Drupal end-users are largely unaware of Drupal.

Q: Is it possible for us to reach a point where we can remove the trouble of upgrading and Drupal is just Drupal, regardless of version number?

Matt Smith, aka smithworx on Drupal.orgThat question came from Matt Smith of Lingotek, who asked a question I have asked before; a tough question. catch started by discussing what they have planned for Drupal releases now, which is already a huge improvement, that Drupal 8.1.0 and 8.2.0 can bring new functional improvements without breaking the API and that by growing slowly, they can minimize the API breakage needed when when it finally is necessary, to re-think a way of doing something and that would be the point we move to 9.x development. We might not be able to avoid breaking the API, because avoiding this can put us in a place the we have to deal with stagnation, but we will make our best efforts to minimize this going forward and it may be that in the beginning of Drupal 9, modules that have worked with each progressive minor version will, mostly not be broken by the initial changes in Drupal 9. As the architecture becomes closer to ideal, we should be able to greatly improve this, as we move forward. xjm added that the release cycle they have adopted now is like Ubuntu and there will be long-term support for some releases.

The final question taken was about tools. In short, the question was…

Q: What development tools are you (core committers) using to manage your work?

That guy again... asking the third questionThis question came, again, from the same fellow (sorry, I didn’t quite get your name), who asked “stable release date”, and the “Isn’t the big, new code complicated and scary?” questions. As the code-base becomes more and more complex, people who used to simply work with a text editor are finding it harder to manage and more and more developers are using IDEs, in particular PHPStorm, which this guy felt seems to be so prevalent now as to be almost a “soft requirement” for Drupal development.

Here, Dries suggested each of the panelists provide a quick answer about their preferred editors of choice and then wrap up the session: xjm started by saying she still mostly uses Emacs, but has started “tasting the forbidden fruit of an IDE in the form of PHPStorm” and said that without 16 years of using Emacs, it wouldn’t be a tough decision. It does make your development life a bit more sane. Gábor said that he has adopted PHPStorm. catch said that he’s still using Vim and holding out as long as he can, but will probably give in at some point and start using PHPStorm. There was brief discussion then, about fear that if everyone adopts a commercial product like PHPStorm, that this could lead to JetBrains taking advantage of us with monopolistic behavior. (Personally, I'm not worried and have respect for the offer they continue to honor: free licenses for open-source contributors.) Moving back to the panel, Alex Pott confessed that he uses PHPStorm. yched also uses PHPStorm and added that it really just makes navigating a large object-oriented codebase so much simpler; navigating between the classes, implementations, overrides, and so on. Wim Leers said that he continued to use text editors until a few months ago and has now also started using PHPStorm. Dries joked that he uses email, then confessed that he doesn’t get to code that much these days, so shouldn’t be taken as a reference, but still uses vi when he needs to make some quick changes.

Final thoughts…

It may be late in the game, but it’s a good time to help with the final work to get all the biggest bugs resolved so that Drupal 8 can be considered stable. There are lots of way to help, from identifying issues (beta testing or areas where documentation is lacking, etc), to simply verifying that bugfixes do what they are supposed to do. And there are a lot of nice tools, now, for helping review tickets. If tickets can be reviewed right away, it is more likely they just get finished before they drag on for months, require “re-rolls”, and all those hassles, and many such tickets are not difficult to review. I’m glad I made it to the Drupalcon rather than just watching/listening when I had the time.

And I should probably say that it’s been far too long since I’ve written a Drupal-related blog post here. I’m not going to make excuses: the truth is that I’ve been pretty much inundated with OtherStuff™, including some work on a complex, semi-mature project which only involves Drupal and so stopped having time to contribute, look at much actual Drupal code, or spend much time learning about all the “new things” going on. So I didn’t feel qualified to write about what was going on in the Drupal world. But I came to Cocomore for the Drupal, so I’ll work on reaching a better balance and hope to find time between all the OtherStuff™ to see you again, soon. The sprint Friday and weekend got my Drupal-thirst going again; Randi and I are already looking at a vacation rental for the full week in Barcelona next year (woohoo!), so you can count on it at least not being too long.

Oct 05 2014
Oct 05

One Drupalcon session of particular interest to many in the community, since the first “episode”, has been the “Q&A with Dries”, a core-conversation-track session in which Dries is joined by a panel of his initiative leads and others in the “inner circle” of Drupal 8 core development. Since I’d wished, in the past, that sessions like these had a video recording to show who was talking, I brought my DSLR and a shotgun microphone this time, thinking I’d contribute the resulting video. I don’t think the video I shot was technically perfect enough to share; perhaps I could fix that, but I also realized that one panel member prefers to limit her exposure on the Web—and respect that, of course; since it’s much easier to blur or block out a face in a few images than in a video, and since you can read this summary in much less time than the hour+ -length session, I decided to provide stills from the video, along with a summary of the questions and answers, which ranged from the whimsical (a bet on how long it would be till Drupal 8 would be released as “stable”), to various business and architecture questions, and other concerns.

Q and A with Dries and panelists, Drupalcon Amsterdam

(You’ll find a more serious answer to that question if you read on...). Of course, Dries began by asking each of his panelists to introduce themselves. Those present were:

intro_gabor.jpgGábor Hojtsy, who works for Acquia and introduced himself, first, as the Drupal 6 maintainer; he also leads the Multilingual initiative for Drupal 8.

Nathaniel CatchpoleNathaniel Catchpole (catch), a major core maintainer with special focus on optimizing performance.

intro_alexpott.jpgAlex Pott, who works for ChapterThree, and supports Drupal as a core maintainer, also contributes actively in the configuration management initiative for Drupal 8.

yched introduces himselfYves Chedemois (yched), a freelancer and volunteer contributor to Drupal core, especially active as the maintainer of the Drupal 8 Field API (he formerly maintained CCK).

Wim Leers, core maintainerWim Leers (of Acquia, who works on the Spark initiative and Drupal 8 performance

Jess (xjm), who was the major heavy lifter for getting Views into Drupal 8 core, alongside her very active community mentoring role, now is most active with release planning and other steps toward getting Drupal 8 to the community.

Dries jokes and introduces himself as 'Drice'

Dries made everyone laugh, then, by introducing himself… and pronouncing his name as if it rhymed with “rice”. He followed by submitting the first questions to the panelists; these initial questions were selected from those emailed to him before the day of the session. Everyone had something to say for the first question.

Q: Are there any lessons learned, so far, from the Drupal 8 release cycle?

Alex Pott pointed out that changing core is taking longer and longer as the complexity increases and the needs of the greater Drupal community become more varied. “It’s no longer a matter of developers having a good idea and putting a patch on Drupal.org”, he said. You have to get everything reviewed and tested and re-tested, usually through many iterations, before a patch finally makes it into core.

Yves Chedemois (yched) added that it really helped having a bigger team of people assisting in the Field API initiative, compared to how things have sometimes been in the past, before the initiatives, with only one or two people working on a particular sub-system; so now he might have five or six developers actively supporting him and who are all able to review each others work, and take over from one another if anyone is ill or leaves the team. He pointed out that, of course, finding five or six people who can keep active for the full 2-3 years that has been this development cycle has been one challenge; it’s just not realistic to expect.

Gábor weighed in with the fact that the whole extra communication with the community was something that hadn’t been so present before and has helped to find people identify their strengths and find ways to contribute to the development process. Extra communications on Drupal.org, the core conversations like this Q&A session, and the initiatives, themselves, helped to build a better level of involvement and ability to contribute.

Dries also added that people asked whether the initiatives, themselves, were a success, and wanted to say that he, indeed, found them very useful for the development cycle. It helped communicate a sort of roadmap for Drupal with the key areas that needed work. Having clearly communicated, specific goals, and teams working with specific areas of interest, in turn helped gather more people to help. He pointed out that the initiatives which were most successful in gathering a team to rally to their cause tended to be the ones with leaders with the best ability to communicate their goals; and of course they also had to have great technical skills and be skilled project managers. Dries added that, if he were to do it again, he would try to get a small team together for each initiative, from the start, with individuals able to bring all important strengths to work for each initiative. It’s a lot to ask from one person.

Q: How do you best prepare for Drupal 8?

Nathaniel Catchpole (catch), suggested that if you are a site-builder, experiment with building up a Drupal 8 version of a site you want to migrate to Drupal 8, or just begin building up a site; just remember that we are just at the first beta, so things might be changing. But if you just practice building up your site structure and learn what you can do, that can be very helpful as a first step to being comfortable with Drupal 8.

Wim Leers added that it’s a good time for the community to get the input from experienced site builders who have familiarity with how things work in Drupal 7 and might find some areas where performance or user experience have been affected in a negative manner; there might still be time to fix remaining issues identified now.

Jess recommended that users who need to migrate from Drupal 6, which is scheduled for “end of life” about six months after the release of a stable Drupal 8.0.0, practice building up the functionality they need in Drupal 8, determining any areas where core functionality doesn’t fill their requirements. A lot of functionality which was formerly only in contrib is now in core, but you can identify what contrib modules you still need to see ported. Keep your Drupal 6 site running, but you can locally test and practice the migration path from Drupal 6 to Drupal 8. Currently this path lacks a user interface and has some other rough areas, but there is documentation. Then you can follow and support the development of contrib modules that are blockers for your ideal upgrade.

Alex Pott added that if you are a PHP developer, it’s a good time to be learning about all the new object-oriented stuff in core; getting your head around that. He recommended looking at PHP: The Right Way for some good tips. Themers should work on learning Twig and a new base theme, Classy, just committed to Drupal 8. But beware, the others added: the theme layer will not be frozen until closer to the final release date, so there are still some things that will change. Also, there is now a full-featured Entity API in core, so when modeling your site, think in terms of entities and think about what is really content or not.

Gábor reminded us that even if you aren’t ready to dive into Drupal 8, there are a lot of good talks, blog posts, and development surrounding bringing a lot of “Drupal 8 improvements” into Drupal 7 sites, so you can learn your way around PHPUnit, Composer, etc, as a first step to getting comfortable with Drupal 8.

Dries then opened the floor to additional questions from the audience. The first participant actually asked two questions, one more serious than the other.

Q: If you had to bet on the release date for Drupal 8, what date would that be?

That guy who asked three questions...This question got a good laugh and perhaps more discussion time than was necessary. After skipping it to take his serious question, this one actually did get some answer time; Jess made some cogent points: that it’s not a good idea to base business decisions on any predictions around the release date of Drupal 8, but that the community is betting on it being soon and successful. She suggested that any really large projects which will take years to develop are good candidates for looking at the components of Drupal 8 as appropriate building blocks and starting work. His second question was one that, perhaps other developers who haven’t yet worked (much) with Drupal 8 code, could relate to.

Q: In the past, someone who doesn’t do a lot of development could still make a simple tweak to simple module. Now there is so much code for the new Symfony-based modules. Isn’t all this code scary?

catch pointed out that once you are familiar with it, there are still lots of places you can easily make the same kind of tweaks with Views in core, and with plugins and the configuration management. yched added that most of the hooks available in Drupal 7 are still available. Gábor said that he could remember a time, not so long ago, when he’d also been daunted by the complexity and differences between the way things are done in Drupal 8 versus how they were done in Drupal 7, but after starting to work with it, you will learn the new patterns and it starts to make sense and actually be easier, in many ways. Dries added that it’s common to be daunted by the “more-lines-of-code”, but that the object orientation actually reduces the complexity and makes it easier to extend and understand, once you are familiar with the design patterns. He also pointed out that in Drupal 7 you had to know all the hooks and that now, it’s more declarative and you can work with what you want to happen, based on events. So there is less you need to learn, and less “magic”.

Wim reminded us that Drupal 8 introduces greater strictness, which translates to an increase in verbosity, but also makes it easier to find and avoid problems.

Q: How does Drupal 8 architecture matter to clients? Why should they care about developing a site in Drupal 8?

Chris Amato, aka knectar on drupal.orgChris Amato (knectar) asked this question, to which Dries began by pointing out that there is a lot more support “out-of-the-box” for things like mobile content, with responsive designs and services deeply integrated. yched added that every entity type is now natively translatable and versionable and that every field can be manipulated with the same familiar tools. Gábor added that there are lot more Views and things that can be individually tweaked to a clients needs. Even admin pages are Views-based and the modules you use will also incorporate this flexibility, so there should be less need for hacks to work around what a client needs.

The next question had to do with decoupling in Drupal 8 and so-called “headless Drupal”

Q: (paraphrased) How does “headless Drupal” and decoupling fit in and is this something we will be seeing more of in Drupal 9?

The guy who asked about headless Drupal in Drupal 9Dries said that it was really too early to know what the focus of Drupal 9 would be, but that it would likely involve greater decoupling, yes. Others pointed out that it’s already possible to do a lot with headless Drupal and that we can look for a big growth in that direction coming from contrib and possibly making its way into core before Drupal 9.

The next question brought us to the issue of documentation.

Q: Will there be some books for Drupal 8 and better documentation?

That guy who asked about documentation...Gábor started by pointing out that there is already a Drupal 8 API section, a lot of which is pretty well fleshed-out. There are still places for people to get involved and help update since there have been so many changes since the initial pages were written. And Jennifer Hodgdon is already working on a book for Drupal 8 development. Dries pointed out that there are now about 50 or so books on Drupal 7, and that things are still changing enough it’s still too early for publication of Drupal 8 books, but that we can expect a variety of books on Drupal 8 soon after its release. The API documentation and other Drupal 8 usage documentation is in various stages of completion. xjm pointed out that we need help with the documentation on drupal.org and that this is a great way to get involved.

Q: “What is being done or can be done to help bring funding to Drupal development?” (heavily paraphrased)

Rudi van Es of the local Amsterdam Drupal community

Rudi van Es, an Amsterdam-based member of the local Drupal shop, limongroen, came with this question.

Dries indicated that the Drupal Association can sometimes help find parties who would also benefit from certain development to help find funding for some projects, but that this is part of what Large Scale Drupal is working to accomplish and that maybe we also need a “Small Scale Drupal” to work more directly with individual developers. Some of the funding that has already come out of Large Scale Drupal went into improving workflows for media and publishing companies on Drupal; this effort has been added to the Workbench project. Dries also reminded us of his keynote, where he discussed better incentivizing contribution. And some organizations might be more willing or able to donate than actual time and expertise to Drupal development. Dries acknowledged that there are limits to the number of companies who are actively funding Drupal projects and initiatives and this is one of the challenges facing the community. While Wikipedia has been able to successfully crowdfund, they have a unique advantage in being able to directly access the end users; Drupal end-users are largely unaware of Drupal.

Q: Is it possible for us to reach a point where we can remove the trouble of upgrading and Drupal is just Drupal, regardless of version number?

Matt Smith, aka smithworx on Drupal.orgThat question came from Matt Smith of Lingotek, who asked a question I have asked before; a tough question. catch started by discussing what they have planned for Drupal releases now, which is already a huge improvement, that Drupal 8.1.0 and 8.2.0 can bring new functional improvements without breaking the API and that by growing slowly, they can minimize the API breakage needed when when it finally is necessary, to re-think a way of doing something and that would be the point we move to 9.x development. We might not be able to avoid breaking the API, because avoiding this can put us in a place the we have to deal with stagnation, but we will make our best efforts to minimize this going forward and it may be that in the beginning of Drupal 9, modules that have worked with each progressive minor version will, mostly not be broken by the initial changes in Drupal 9. As the architecture becomes closer to ideal, we should be able to greatly improve this, as we move forward. xjm added that the release cycle they have adopted now is like Ubuntu and there will be long-term support for some releases.

The final question taken was about tools. In short, the question was…

Q: What development tools are you (core committers) using to manage your work?

That guy again... asking the third questionThis question came, again, from the same fellow (sorry, I didn’t quite get your name), who asked “stable release date”, and the “Isn’t the big, new code complicated and scary?” questions. As the code-base becomes more and more complex, people who used to simply work with a text editor are finding it harder to manage and more and more developers are using IDEs, in particular PHPStorm, which this guy felt seems to be so prevalent now as to be almost a “soft requirement” for Drupal development.

Here, Dries suggested each of the panelists provide a quick answer about their preferred editors of choice and then wrap up the session: xjm started by saying she still mostly uses Emacs, but has started “tasting the forbidden fruit of an IDE in the form of PHPStorm” and said that without 16 years of using Emacs, it wouldn’t be a tough decision. It does make your development life a bit more sane. Gábor said that he has adopted PHPStorm. catch said that he’s still using Vim and holding out as long as he can, but will probably give in at some point and start using PHPStorm. There was brief discussion then, about fear that if everyone adopts a commercial product like PHPStorm, that this could lead to JetBrains taking advantage of us with monopolistic behavior. (Personally, I'm not worried and have respect for the offer they continue to honor: free licenses for open-source contributors.) Moving back to the panel, Alex Pott confessed that he uses PHPStorm. yched also uses PHPStorm and added that it really just makes navigating a large object-oriented codebase so much simpler; navigating between the classes, implementations, overrides, and so on. Wim Leers said that he continued to use text editors until a few months ago and has now also started using PHPStorm. Dries joked that he uses email, then confessed that he doesn’t get to code that much these days, so shouldn’t be taken as a reference, but still uses vi when he needs to make some quick changes.

Final thoughts…

It may be late in the game, but it’s a good time to help with the final work to get all the biggest bugs resolved so that Drupal 8 can be considered stable. There are lots of way to help, from identifying issues (beta testing or areas where documentation is lacking, etc), to simply verifying that bugfixes do what they are supposed to do. And there are a lot of nice tools, now, for helping review tickets. If tickets can be reviewed right away, it is more likely they just get finished before they drag on for months, require “re-rolls”, and all those hassles, and many such tickets are not difficult to review. I’m glad I made it to the Drupalcon rather than just watching/listening when I had the time.

And I should probably say that it’s been far too long since I’ve written a Drupal-related blog post here. I’m not going to make excuses: the truth is that I’ve been pretty much inundated with OtherStuff™, including some work on a complex, semi-mature project which only involves Drupal and so stopped having time to contribute, look at much actual Drupal code, or spend much time learning about all the “new things” going on. So I didn’t feel qualified to write about what was going on in the Drupal world. But I came to Cocomore for the Drupal, so I’ll work on reaching a better balance and hope to find time between all the OtherStuff™ to see you again, soon. The sprint Friday and weekend got my Drupal-thirst going again; Randi and I are already looking at a vacation rental for the full week in Barcelona next year (woohoo!), so you can count on it at least not being too long.

Sep 10 2014
Sep 10

We were going DrupalCon Amsterdam 2014.There is the European DrupalCon happening from Sept. 29th to the Oct. 3rd in Amsterdam and a team of Cocomore - as one of the biggest Drupal shops in Germany and Spain - will of course attend. Christian López Espínola (penyaskito - https://www.drupal.org/u/penyaskito), Jesús Sánchez Balsera (jsbalsera - https://www.drupal.org/u/jsbalsera), Karl Fritsche (attribdd - https://www.drupal.org/u/kfritsche) and Carsten Müller (Carsten Müller - https://www.drupal.org/u/carsten-müller) will join the Drupal community for code sprinting, networking, socializing and naturally help working on the new Drupal 8 version.

We will arrive to Amsterdam on Saturday 27th to attend the Pre-DrupalCon Extended Sprints and we will also be at the Post-DrupalCon Extended Sprints. During the Con we will mix participating in the sprints with attending the amazing sessions and BoFs scheduled. Our team will work on the initiatives we've been contributing lately, mainly D8MI (Drupal 8 Multilingual Initiative, led by Gábor Hojtsy- http://hojtsy.hu/) issues, but with an eye in the critical and beta blockers issues, and to the Migrate in core initiative. Together with all the other awesome Drupal developers we will try get Drupal 8 ready for usage. The main goal is to achieve some good progress on Drupal 8 which will be a huge improvement in web development with Drupal. Who didn't watch Dries keynote at DrupalCon Austin yet – it is really worth to spend the hour and have a look at the big aims set on Drupal 8.

One whole week of sprints, meetings, discussions and socializing with the Drupal community – it will not be only great fun, but also lots of stress - but it is worth every minute. I think everybody who ever attended a Drupal event like a camp or con would agree. If you are still unsure about your participation – here you have the possibility to meet over 2000 members of the Drupal community. There will be all the roles involved in a Drupal project, from backend developers to the themers / frontend developers, designers, managers, architects, devops and more, who help to improve Drupal day by day. You can meet mostly everybody in one place and ask all the questions you might have. And, in comparison to other IT trainings or developer events, it is very cheap. If you‘re looking for a new job you can also contact all the Drupal shops there. By the way, Cocomore is also always looking for good developers, so maybe we can meet and talk about your future. Just send us an email (http://drupal.cocomore.com/contact) or contact us via Twitter (@cocomore_drupal) and we can drink something together. You can also do so if you are not looking for a new job but just want to share your time with us ;-)

We are looking forward for a great DrupalCon in Amsterdam, for amazing sessions, meeting old and new friends, the exchange of knowledge and the hopefully good progress on Drupal 8. See you there!

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web