Showing posts with label Drupal 8. Show all posts
Showing posts with label Drupal 8. Show all posts

Tuesday, June 21, 2016

Drupal 7 on PHP 7

We're happy to announce that last week

we successfully upgraded a really complex Drupal 7 based web app to PHP 7 and it works like a charm!


From the upgrade we can measure and feel the performance boost coming with PHP 7! (30-100% performance increase along with a lower memory consumption).

Exact versions? We upgraded from Ubuntu 14.04 LTS and PHP 5.5.9 to Ubuntu 16.04 LTS and PHP 7.0.4 (currently).

Is it a complex project? Yes. It has 277 enabled modules (core, contrib, feature and custom modules together).

Is it a mission critical application? Yes, it's far from a website. It handles sensitive information and used continuously on a daily basis as the heartbeat of an enterprise.

Drupal.org says PHP 7 is not fully supported by Drupal 7 - there is an issue with a solution reviewed and tested by the community, but still open currently. However, there is no aggregated info out there regarding PHP 7 support of contrib modules.

How we took to the liberty of upgrading? How we handled the risks? Simply: we have tests. Yes, automated tests. We have 373 casperjs tests, plus phpunit tests for classes responsible for critical calculations set up as part of a nightly build based on continuous (daily) delivery workflow.

The moral of this story


1. Don't be afraid of running Drupal 7 on PHP 7. Try it, test it and be happy :)
2. Write tests. It's worth it. Of course, this complex D7 project would have been the last to be updated to PHP 7, but we were able to produce quite a nice test coverage, and in this way it came out first! Tests gave us confidence.

We’ve chosen Drupal 8 for most of our new projects since Drupal 8 beta and a huge advantage of Drupal 8 is that it supports PHP 7 out-of-the-box, so you don't have worry about this. But now we see that for projects started in Drupal 7 the future is bright as well.

Friday, January 15, 2016

Summary of 2015

The year 2015 was stirring for us, particularly in relation to the release of Drupal 8. We didn't wait for the stable release, we launched the first Corporate D8 site in Hungary in April, the Gravity R&D.
Currently, we are working on our second D8 project ThermalCorvinus, which is also going to be the first Slovakian D8 site. Additionally, we were working on projects such as, MABIASZ, Iota, Rustique, Plast-Ex, SlovakLines, Új Szó, Slovnaft and others.

Up to now our biggest professional success has been our newest Swiss HR software launched at the end of the year. It's a cloud based SAAS solution. The trial version are still freely available! If you would like to give it a try please just let us know, we will help you onboard. :)
On top of all this we have contributed our OTP module, also freely available to anyone interested.


Together in a Community

The Hungarian Drupal Association took off last year, with a Brainsumist between the board members. The community arranges Drupal Users Group every month, the 10th held in our little home. We delegate a board member to the Slovakian Drupal Association too!

We attended more DrupalCamps and DrupalCons, we were in Kolozsvár, Bratislava and Barcelona as well.
One of the biggest programs was Drupalaton in Keszthely with our company being the premier diamond sponsor of the event. In addition, we held two presentations in accordance with D8. If you would like to receive any further information, click HERE.
In the end of the year our CTO had a presentation on the Hungarian WebKonf regarding D8’s CMIs.

Building the Team

We’ve introduced an internal motivation ritual for the projects’ milestones and launches to commemorate our successes.
We consider teamspirit as important as individual motivation, this is why we routinely organize teambuildings. In 2015, for example, we went to the Capa Center’s interactive high-tech exhibition; yet contrastingly, Brainsum’s anniversary was celebrated with a BubbleBall match.


In November, we spent a weekend in Győrújbaráthely at the impressive Villa Corvina.
At the Christmas Party we summarized our achievements and performance over the year. Also we touched on our future plans and personal challenges for 2016.

Thursday, May 7, 2015

Our first Drupal 8 site was launched on 10th of April!

Last year in Amsterdam at the DrupalCon, after the first official Drupal 8 beta release we were sitting enthusiastically and felt the courage to offer Drupal 8 to a client.

Not for a complex system though, just for a corporate website. Views is in core and there will be an upgrade path between beta releases -- at least we thought at the time. So what could go wrong? Well we know that anything :) So we tried to be careful.


The client was selected carefully

  • Our client Gravity Research & Development is known by its recommendation engine. They are an innovative IT service company so choosing an innovative platform for their new website is a good fit.
  • We already maintained the client's legacy Drupal 7 site so their needs were well-known for us. 
  • Does this mean that we charge the client with our learning process? No! From the beginning we counted with a large investment on our side + we were generous when it came to change requests.
  • We created the wireframes and the graphic design too, so we had chance to discuss these with the developers.
  • The scope of the new site was very limited: a one page site with a couple of additional simple subpages (by the end this had changed a lot)
  • 1 language only


We set some principles for the project

  • Using only Drupal core and no contrib modules
  • Trying to minimize custom module development


The start: Drupal 8 beta6

  • When we started the actual development, Drupal 8 was in beta 6 and we realized that no official beta to beta upgrade path will be available. No panic, we will only upgrade to the stable release. (There is a contrib module which has upgrade path from beta9, but we haven't tested it yet)
  • On our weekly internal training sessions we focused on Drupal 8. This way not only the 2 involved developers had to solve the issues, but the whole team was there to help and to learn at the same time.


What worked well

  • TWIG template engine and template debugging.
     
  • Core configuration management. Works like a charm on the admin UI and it has drush support as well.


Custom module development

A views plugin to handle custom navigation tabs (note that there are tabs below the content area too).
We will show this in a separate post later.


Struggle with simple things


Bye-bye drupal_goto(), hello RouteSubscriberBase!

The nice thing with using new technologies is that even the easiest thing can become a real pain. 
One example: we had to redirect all node view pages to the corresponding custom page and even activate the right tab. For this a simple redirect with some additional information after a # for Javascript is enough.
But in Drupal 8 the good old drupal_goto() doesn't exist anymore. We had to figure out the Symfony way and ended up with two files (classes) as we had to override the NodeViewController and the RouteSubscriberBase instead of that single drupal_goto. We will show a working example on this in a separate post.


YML

In Drupal 8 a lot of declarative things (info files, menu hooks etc.) are placed in YML files and this is good. But the current IDEs (we use PHPStorm and Netbeans) the Drupal 8 - YML support is limited and it can take really a long time till you find out that you made a typo somewhere in your YMLs. I hope that this will get better with time.


Our next Drupal 8 project?

Gravityrd.com is up and running, but we still don't recommend Drupal 8 for complex projects. Most of the documentation on the web is obsolete, things are still changing and there are a lot of critical issues left. On the other hand we believe that this is the future so it's worth it to invest time to learn and adapt early. We are already planning our first headless Drupal 8 project, so that we can benefit from its in-built webservice support.

Last week we hosted the Drupal User Group meetup in Budapest, where we shared our experience with the local community. Check out the presentation slides about creating the first production Drupal 8 client site in Hungary.