Feed aggregator

Cruiskeen Consulting: Drupal 8 and hosting requirements

Planet Drupal -

I'm writing a little bit today about some of the concerns that folks are having about Drupal 8, the new hosting requirements it imposes, and particularly the concerns that smaller organizations will not be able to find Drupal 8 compatible hosting plans. There is a lot going on with us and with other hosting companies at the moment to support Drupal 8 and other PHP software that has more modern requirements. We don't think this will be an issue with most reliable hosting companies by the time Drupal 8 ships.

Acquia: Sustainable contribution 2/2 - Giving back is the same as making money.

Planet Drupal -

Language Undefined

Part 2 of 2 - I spoke with John Faber, Managing Partner with Chapter Three, on March 17th, 2015.

In part 1 to talk about the business advantages of contribution and sustainability when basing your business on open source software. We also touch on Drupal 8's potential power as a toolset and for attracting new developers, doing business in an open source context, and more!

Drupalize.Me: Learning Drupal 8 from Boilerplate Code

Planet Drupal -

Drupal 8 represents a lot of changes and a steep learning curve for many Drupal developers and themers. While many of these changes are exciting, there are many things to learn just to get started. One way to learn about the code involved with Drupal 8 modules and themes is to take a look at core's modules and themes for examples to follow. Another, is to use a code scaffolding tool like Drupal Console to generate boilerplate code and comments that you learn from and then customize.

Issue 197

The Weekly Drop -

Issue 197 - July, 9th 2015 From Our Sponsor Making Remote Work More Collaborative

Getting your team synchronized across large or small distances poses problems. Read about some of our tips for creating an open and collaborative working environment for remote teams. Promet’s managers walk through some of their best practices, preferred communication methods and practical tips for making remote teamwork actually work for your team members.

Articles Certification: Necessary Evil?

Drupal Association board member Donna Benjamin shares her thoughts on the Acquia certification.

One year later: the Acquia Certification Program

Dries Buytaert shares an update on the Acquia cert program. It sounds like things are going well with it.

Protecting ACLU.org’s Privacy and Security

Advomatic's Sarah German shares how they allowed the ACLU to use social integrations without the typical privacy compromises.

Drupal 8 Core is now protected against click-jacking by default (X-Frame-Options: SAMEORIGIN) Migrations now support "templates" OSTraining Will Release 200 Drupal 8 Videos for Free Portsmouth NH theme system critical sprint recap Recording from July 3rd 2015 Drupal 8 critical issues discussion Win prizes by playing with Drupal 8's multilingual site building features! Tutorials How to display an RSS feed in a Drupal block How to Use Picture and Image Replace for Drupal 7 Improve Your Site’s Security by Adding Two-Factor Authentication

Acquia's Cash Williams provides the rationale for two-factor auth and links to resources on the subject.

Projects An Alpha Spotted In The Wild

An event management module for Drupal 8 called RNG.

Debugging Drupal performance with Cache Debug module Essential Drupal: Stage File Proxy

I have mentioned Stage File Proxy many many times but if you aren't using it for local development you are missing out. Checkout Jim Birch's intro post.

Major improvements to Drupal VM - PHP 7, MariaDB, Multi-OS Publishing Content on Relative Dates Using Rules in Drupal 7 Releases acquia_lift 7.x-2.0-beta2 botscout 7.x-1.1 commons 7.x-3.28 custom_formatters 7.x-2.3 kaltura 7.x-3.0-beta1 lingotek 7.x-7.01 migrate 7.x-2.8 openoutreach 7.x-1.22 panopoly 7.x-1.24 personalize 7.x-2.0-beta2 space 8.x-1.0-alpha5 themekey 7.x-3.4 unique_node_title 7.x-1.0 views_bulk_operations 7.x-3.3 Podcasts DrupalEasy Podcast 158 - FOIAed (Becca Goodman and Brad MacDonald - Drupal Gov Days) Sustainable contribution, part 1 of 2: How Drupal has solved and evolved - Acquia Podcast Talking Drupal #098 - Drupal.org Events DrupalCamp Sydney 2015

September 5th - 6th 2015, on Cockatoo Island in Sydney, Australia.

Jobs List Your Job on Drupal Jobs

Wanna get the word out about your great Drupal job? Get your job in front of hundreds of Drupal job seekers every day at Jobs.Drupal.Org.

Featured Jobs Drupal Engineer

Weight Watchers New York/NY/US

Senior PHP Developer - work from distance

StangaOne1 UA

Technical Project Manager & Advocate: Remote

Origin Eight Anywhere


Drupal core announcements: Drupal 8's minimum PHP version increased to 5.5.9

Planet Drupal -

Pursuant to the discussion at [policy] Require PHP 5.5, the minimum PHP version of Drupal 8 has been raised to 5.5.9, and this change will be included in the next Drupal 8 beta (8.0.0-beta13).

(PHP 5.5.9 was chosen because it is also the same minimum version as Ubuntu's LTS, which in turn influenced Symfony 3.0, Travis CI, etc.)

This is a future-proofing move which buys us a few things:

  • Some nice language features and a built-in opcode cache.
  • Compatibility with the latest versions of various external dependencies, including Guzzle 6 and the upcoming Symfony 3.0
  • Better security for our end users, since PHP 5.4 will become end of life September 15, 2015 (most likely prior to Drupal 8's release).

We looked extensively into the adoption and hosting support of PHP 5.5 prior to making this move. While there is not widespread adoption of PHP 5.5 as of today, we nevertheless found that most hosts offer the option for PHP 5.5, due to PHP's security policy.

Mediacurrent: Mediacurrent Dropcast: Episode 7

Planet Drupal -

In this episode we celebrate the founding of our country by talking up a few modules we have discovered and enjoy. Ryan talks about the Image Field Focus module and how it makes cropping a joy without the gamble of a cropping image style. Bob waxes poetic about the WYSIWYG Field module, which is very similar to his WysiField module. As always we keep you up to date about Drupal 8 and Ryan brings it home with The Final Bell. This was recorded on the day before all went out for the holiday weekend so there are times where we derail the train. At least this time we have an excuse.

Drupal core announcements: API module seeking co-maintainer

Planet Drupal -

For the past 8+ years, Neil Drumm (drumm) has been maintaining the API module, and I've been co-maintaining it for the past 3+ years. (This is the module that builds and displays the Drupal API reference site api.drupal.org). Both of us have "some" other responsibilities in the Drupal ecosystem, and we'd like to find a new co-maintainer.

The ideal person would be:
- A good PHP coder familiar with and willing to follow the Drupal project's coding standards
- Familiar with the api.drupal.org site and its features
- Familiar with the API docs standards
- Familiar with both Drupal 7 and Drupal 8 core code (or at least familiar with the kinds of code it contains and the Drupalisms that it has), since both are displayed on the site
Of course, all of these "ideals" are negotiable and/or learnable, and it could be that a few co-maintainers would be better than just one.

The next step would be for the person or people who are interested to start making patches for a few issues, and once a few of those have happened, we would consider making you an official co-maintainer. The project page has a link to documentation for how to get a local API site set up, and the module also has a robust set of tests. The code in the API module is somewhat obtuse, but I'd be happy to start anyone out with a quick tour (or help you find an issue to work on). The module runs on Drupal 7 only at this time, and this is unlikely to need to change anytime soon (it displays Drupal 8 code but runs on Drupal 7, like the other *.drupal.org sites).

So if you're interested, you can either jump in and find an API module issue to work on and make a patch, or use my contact form or IRC to contact me and discuss.

Sorry... by policy, comments on this post are disabled, since it is going into the Core group (as well as Documentation).

DrupalCon News: Save 100€ on Barcelona Tickets: Buy by Friday

Planet Drupal -

Are you planning on attending DrupalCon Barcelona? If you are, we hope you’ll get your tickets this week and save 100€ in the process.

Every DrupalCon has varied ticket pricing levels, and DrupalCon Barcelona is no different. We’re offering earlybird pricing so that frugal DrupalCon attendees can get their tickets for less, but that pricing expires on Friday at 23:59 Barcelona local time (UTC +2).

For those looking at purchasing tickets, be aware that prices are as follows as we lead up to the convention:

Outage: Drupal.org Git server Migration

Drupal News -

On July 9th 8pm UTC, Drupal.org will be migrating our git server to a redundant cluster of 2 servers. This will provide failover in the event one server fails.

While we are working on the migration, users will not be able to commit files to git or check files out of git. We expect the migration to take up to 2 hours.

After the migration Host keys will change and your client might give an error message when pushing to git. Consult your OS’s documentation on how to fix this error.

If you have any questions please raise an issue in the infrastructure issue queue. https://www.drupal.org/project/issues/infrastructure?categories=All

You can follow the progress of the migration at http://twitter.com/drupal_infra

Drupal Watchdog: Caffeinated Drupal

Planet Drupal -

Column

One of the signs that you’re in a good coffee shop is if they serve their milk-based espresso drinks with an artful rosetta (floral pattern) on top. This is referred to as Latte art. At first glance, it may appear to be an offhand flourish by the barista – similar to a bartender flipping a bottle in the air before pouring a drink – but it is actually much more than that.

Latte art is a representation of the care and expertise that went into creating your drink: a good quality coffee bean; the ideal grind in order to pull an espresso with the right amount of crema (the oily brownish foam that sits on top of a good shot of espresso); milk that has been steamed just right to have a micro-foam consistency (uniform small bubbles throughout); and, of course, the perfect pour to blend the milk and espresso just right until a flower, heart, or other artful creation emerges on top.

While we sit back and enjoy today’s coffee – a Brazil Yellow Bourbon Latte (amazing bitter cocoa flavors, is this a latte or a hot chocolate?!?) – let’s consider how an optimally performing Drupal site compares to the creation of latte art.

There are many factors that contribute to a high performance Drupal site. For starters, we can look at factors such as code quality, the use of caches where possible, database configuration, and front-end caching. For a Drupal site to perform at its best, all of these components must be done well. Even a small misconfiguration or a bit of buggy code can be enough to slow a site to a crawl, especially when serving a large amount of traffic. The same can be said for latte art: if the coffee beans aren’t fresh enough to produce crema, or the milk isn’t foamed properly, or the pour of the milk isn’t done with the correct technique, the result will be an ordinary-looking – and possibly poor-tasting – drink.

Fighting Cancer: The Unexpected Benefit Of Open Sourcing Our Code

Cloudflare Blog -

Recently I was contacted by Dr. Igor Kozin from The Institute of Cancer Research in London. He asked about the optimal way to compile CloudFlare's open source fork of zlib. It turns out that zlib is widely used to compress the SAM/BAM files that are used for DNA sequencing. And it turns out our zlib fork is the best open source solution for that file format.

CC BY-SA 2.0 image by Shaury Nash

The files used for this kind of research reach hundreds of gigabytes and every time they are compressed and decompressed with our library many important seconds are saved, bringing the cure for cancer that much closer. At least that's what I am going to tell myself when I go to bed.

This made me realize that the benefits of open source go much farther than one can imagine, and you never know where a piece of code may end up. Open sourcing makes sophisticated algorithms and software accessible to individuals and organizations that would not have the resources to develop them on their own, or the money pay for a proprietary solution.

It also made me wonder exactly what we did to zlib that makes it stand out from other zlib forks.

Recap

Zlib is a compression library that supports two formats: deflate and gzip. Both formats use the same algorithm also called DEFLATE, but with different headers and checksum functions. The deflate algorithm is described here.

Both formats are supported by the absolute majority of web browsers, and we at CloudFlare compress all text content on the fly using the gzip format. Moreover DEFLATE is also used by the PNG file format, and our fork of zlib also accelerates our image optimization engine Polish. You can find the optimized fork of pngcrush here.

Given the amount of traffic we must handle, compression optimization really makes sense for us. Therefore we included several improvements over the default implementation.

First of all it is important to understand the current state of zlib. It is a very old library, one of the oldest that is still used as is to this day. It is so old it was written in K&R C. It is so old USB was not invented yet. It is so old that DOS was still a thing. It is so old (insert your favorite so old joke here). More precisely it dates back to 1995. Back to the days 16-bit computers with 64KB addressable space were still in use.

Still it represents one of the best pieces of code ever written, and even modernizing it gives only modest performance boost. Which shows the great skill of its authors and the long way compilers have come since 1995.

Below is a list of some of the improvements in our fork of zlib. This work was done by me, my colleague Shuxin Yang, and also includes improvements from other sources.

  • uint64_t as the standard type - the default fork used 16-bit types.
  • Using an improved hash function - we use the iSCSI CRC32 function as the hash function in our zlib. This specific function is implemented as a hardware instruction on Intel processors. It has very fast performance and better collision properties.
  • Search for matches of at least 4 bytes, instead the 3 bytes the format suggests. This leads to fewer hash collisions, and less effort wasted on insignificant matches. It also improves the compression rate a little bit for the majority of cases (but not all).
  • Using SIMD instructions for window rolling.
  • Using the hardware carry-less multiplication instruction PLCMULQDQ for the CRC32 checksum.
  • Optimized longest-match function. This is the most performance demanding function in the library. It is responsible for finding the (length, distance) matches in the current window.

In addition, we have an experimental branch that implements an improved version of the linked list used in zlib. It has much better performance for compression levels 6 to 9, while retaining the same compression ratio. You can find the experimental branch here.

Benchmarking

You can find independent benchmarks of our library here and here. In addition, I performed some in-house benchmarking, and put the results here for your convenience.

All the benchmarks were performed on an i5-4278U CPU. The compression was performed from and to a ramdisk. All libraries were compiled with gcc version 4.8.4 with the compilation flags: "-O3 -march=native".

I tested the performance of the master zlib fork, optimized implementation by Intel, our own master branch, and our experimental branch.

Four data sets were used for the benchmarks. The Calgary corpus, the Canterbury corpus, the Large Canterbury corpus and the Silesia corpus.

Calgary corpus

Performance:
Compression rates:
For this benchmark, Intel only outperforms our implementation for level 1, but at the cost of 1.39X larger files. This difference is far greater than even the difference between levels 1 and 9, and should probably be regarded as a different compression level. CloudFlare is faster on all other levels, and outperforms significantly for levels 6 to 9. The experimental implementation is even faster for those levels.

Canterbury corpus

Performance:
Compression rates:
Here we see a similar situation. Intel at level 1 gets 1.44X larger files. CloudFlare is faster for levels 2 to 9. On level 9, the experimental branch outperforms the reference implementation by 2X.

Large corpus

Performance:
Compression rates:
This time Intel is slightly faster for levels 5 and 6 than the CloudFlare implementation. The experimental CloudFlare implementation is faster still on level 6. The compression rate for Intel level 1 is 1.58 lower than CloudFlare. On level 9, the experimental fork is 7.5X(!) faster than reference.

Silesia corpus

Performance:
Compression rates:
Here again, CloudFlare is the fastest on levels 2 to 9. On level 9 the difference in speed between the experimental fork and the reference fork is 2.44X.

Conclusion

As evident from the benchmarks, the CloudFlare implementation outperforms the competition in the vast majority of settings. We put great effort in making it as fast as possible on our servers.

If you intend to use our library, you should check for yourself if it delivers the best balance of performance and compression for your dataset. As between different file format and sizes performance can vary.

And if you like open source software, don't forget to give back to the community, by contributing your own code!

Stu Keroff on Asian Penguins

Lullabot -

In this episode of Hacking Culture, Matthew Tift talks with Stu Keroff about a Linux User Group for Asian middle-school students called Asian Penguins. The kids learn not only how to use Linux, but also maintain more than 30 Linux computers for their school and provide Linux computers to local families that cannot afford a computer. This episode is released under the Creative Commons attribution share alike 4.0 International license. The theme music used in this episode comes from the Open Goldberg Variations. The musical interludes all come from ccMixter.org. “Reverie (small theme)" by _ghost (http://ccmixter.org/files/_ghost/25389) under CC BY license. "Heartbit" by Alex featuring Onlymeith (http://ccmixter.org/files/AlexBeroza/37758) under CC BY-NC license.

Realityloop: Custom Formatters 7.x-2.4

Planet Drupal -

8 Jul Stuart Clark

Full disclaimer, I am saying this as the developer of the module, but it is definitely the module that I am the most proud of.

That’s Custom Formatters with a capital CF; custom formatters (with lower case characters) are a core part of Drupal, they are the layer that takes Field data from the database and presents it to the frontend of your website in a more visually appealing style.

The Custom Formatters module quite simply adds the ability for site builders and developers to create or tweak their own custom formatters from within the website, never needing to touch the site file system.

And now, with Custom Formatters 7.x-2.4, it’s even better.

 

What’s new in Custom Formatters 7.x-2.4?
  1. New Formatter format/engine; Formatter presets
    This is the big one, the catalyst for the new release; Formatter presets give you the ability to take complex Formatters with settings and turn them into new simplified, end-user approved formatters.

    More on this below.
     
  2. Support for Display Suite fields
    I’ve been a big fan of Display Suite (DS) since I first came across it years ago. Custom Formatters did have support for DS in the Drupal 6 version, but I had made the decision to not support it in Drupal 7 due to DS’s own Code fields. Due to popular demand (my self included), that decision has been reversed.
     
  3. Fixes to the HTML + Token format
    HTML + Tokens was always supposed to be the format that made this module site builder friendly, but to various issues with native Field tokens in Drupal 7 it has never worked overly well. I’m happy to say that this is no longer the case, and HTML + Tokens formatters work extremely well.

    More on this below.
     
  4. Miscellaneous bug fixes.

 

How to use Custom Formatters?

Using custom formatters is relatively straight forward, anyone who has used any CTools Export UI based module (Views, Context, etc) should be familiar with the user interface:

By default it comes with some example formatters, and you can import others from your own collection or from CustomFormatters.com, but chances are you are most likely going to want to create your own Custom Formatters.

To do so, simply click the + Add button and you will be presented with the following interface:

You will need to provide the following information:

  1. Formatter name
    The human readable name of the formatter, what the site-builder, or possibly end user will see when choosing a formatter.

    Entering this value will auto-generate the Machine name, which can also be manually edited.
     
  2. Description
    Only used within the Custom Formatters interface, useful to explain what the purposes of the formatter are, where it’s to be used and what modules it requires.
     
  3. Format
    The format/engine of the formatter you are about to create. Out of the box there are three formats, but additional modules are able to provide additional formats. The format determines the method of how the Formatter is created, and as such I will go into more detail for each individual format below.
     
  4. Field type(s)
    Depending on the chosen format, you need to assign the formatter to one or many field types types (image, file, textfield, etc).
     
  5. Formatter
    The formatter interface itself is dependent on the chosen format, more details on each format below.

Once you have created your formatter, you can preview the formatter within the Preview interface. This allows you to apply the formatter to an existing field on an existing entity, or if the Devel generate module (provided by the Devel module) is present you can apply the formatter against a devel generated item.

Lastly, ensure you save your formatter, as you don’t want all your hard work to go down the drain. Alternatively, Save & Edit frequently during the creation of the formatter.

 

Format types

Out of the box there are three formats available with Custom Formatters, but the module is written in such a way that any 3rd part module could add an additional format.

 

PHP

The PHP format was the original format engine for the Custom Formatters module, it mimics as closely to writing a formatter within a Drupal custom module as feasible, and as such is only recommended for use by those with knowledge of PHP and the Drupal API.

The PHP format is provided with all required data for writing a formatter in the $variable array, as well as an individual variable per array key ($variable['#items'] is the same as $items):

  1. $obj_type: The entity type (node, taxonomy_term, etc)

  2. $object: The entity object.

  3. $field: The field definition.

  4. $instance; The field instance.

  5. $langcode; The language code.

  6. $items; An array of all field item data for formatting.

  7. $display; The formatter display settings and formatter settings.

With this data you are free to do with what you will. However, in general a standard pattern is to iterate over the $items array and populate an $elements array which is finally returned to Drupal:

  1. $elements = array();
  2.  
  3. foreach ($items as $delta => $item) {
  4. $elements[$delta] = array(
  5. '#markup' => $item['value'],
  6. );
  7. }
  8.  
  9. return $elements;

This pattern allows support for multiple items, as well as taking advantage of Drupal's Render Arrays system.

 

HTML + Tokens

The HTML + Tokens format allows you to create simple and easy Custom Formatters with no more than HTML and Tokens, as the name implies. While this has been available for a long time in Custom Formatters, in the latest release it has been vastly improved upon, primarily with improved support for the Entity tokens module (provided by the Entity API module).

Any entity type token can be used, as well as chained tokens specific to the field in use, but it is important to take into account where the formatter will be used when choosing the formatters. For instance, if you were to use a Taxonomy term token on an Image field formatter that is going to be displayed on a Node entity, the Taxonomy term token will not work.

The markup in your formatter is rendered per field item, so if you are using a multi-value field, each value will run through your formatter. This is where the improvements to the Entity tokens module support is important, as you can target the field values directly.

Example:
If you are formatting an Image field, you can target the URL using the Entity tokens chained token [file:url], which is unique to each item value.

In addition to the improvements with the Entity tokens module integration, I also released a new module, Field tokens, which adds two different type of tokens which are extremely useful with HTML + Tokens formatters:

  1. Formatted field tokens
    Tokens that allow you to pass the field through an existing Formatter with provided formatter settings.

    Example: [formatted_field-image:image:image_style-thumbnail] would pass the current image field value through the Drupal core Image formatter via the thumbnail image style.
     
  2. Field property tokens
    Tokens that provide you with the specific property of a field value.
    Example: [field_property:alt] would return the Alt value for the current image field value.

 

Formatter preset

A new addition to the Custom Formatters module, and while maybe not the most obvious, it is a great addition that was a direct response to the Wysiwyg Fields module.

The Formatter preset format allows you to replace formatters with complex formatter settings forms with simple preconfigured formatters with more user friendly names. Especially useful when the formatter choice is exposed to a non-technical user.

Below you can see an example of the Youtube field and formatter in use in Wysiwyg Fields with it’s abundance of formatter settings (on the left) and a Formatter preset of the same formatter preconfigured as desired (on the right).

It’s obvious a lot simpler, so simple in fact that there’s no evidence that a formatter or formatter settings are present, it will just work.

Creating a Formatter preset is quite different to the other Custom Formatter formats. There is no textarea field, instead you are presented with an interface similar to screenshot below:

Things to note are:

  1. Formatter
    The existing formatter which you are using as a source for this Formatter preset.

  2. Formatter settings
    Everything below the Formatter field are specific to the chosen Formatter, they are that Formatter’s settings.

Extremely simple, but a huge improvement to the user experience.

 

Twig

While not an out of the box Format for the Custom Formatters module, I think it’s important to mention this for two reasons:

  1. Drupal 8 is coming, and it’s bringing the Twig templating system with it.
  2. This is a great example of how other modules can create new Custom Formatters format types.

The Twig format requires the Twig filter module, which doesn’t yet have a stable release, but is still well worth a look.

The interface is much like the PHP and HTML + Tokens formats, with the difference of using the Twig templating language, which is said to be simpler for frontend developers.

 

Using a formatter

Once you’ve created your formatter, that formatter can be used in many different ways, as the the Formatter system is just the theme layer to Drupal’s field system, so in general a Formatter should be able to be used anywhere a Drupal field is used.

Examples of ways to use a Formatter include, but are not limited to:

  1. Drupal’s core Manage display interface

  2. Views using the Field style

  3. Wysiwyg Fields

  4. Formatted field tokens with the Field tokens and Token filter modules

 

CustomFormatters.com

CustomFormatters.com is a companion website for the CustomFormatters module.

It contains various Formatters which can be used as they are, or as examples of how to write your own formatters.

There are also plans to provide the ability for uses to share their own formatters with others.

The website is completely open source, and anyone wishing to steal the site or contribute to the site can do so at https://github.com/Decipher/customformatters.com

 

Download Custom Formatters now

Head on over to the Custom Formatters project page and download Custom Formatters 7.x-2.3 now.

drupal planetdrupal 7custom formatters

OpenConcept: The Drupal North Code Sprint

Planet Drupal -

The inaugral Drupal North Regional Summit was a blast!

The official Drupal North sprint was held on Sunday, June 28th, starting around 10am and ending at 4pm, in Ryerson University's Rogers Communication Centre Transmedia Zone. 21 attendees showed up from all over Canada, the United States, and even Costa Rica:

After everyone introduced themselves, Cottser and I gave an introduction to writing patches, and how issues move through the issue queue from "Active" to "Closed" (video to follow).

Then, we paired up to get Drupal 8, Drush, and Drupal Console working on our computers, and work on issues we were interested in. We worked on 9 issues:

At time-of-writing, 2 of these issues are fixed, and 5 more need review.

Also, congratulations to Jeremy Knab for his first commit mention in Drupal core (from #2501701)!

Overall, we had a great time and learned a lot! Thanks to everyone who came out, and to the DrupalNorth organizers for organizing everything!

Photos







AttachmentSize DrupalNorth 2015 sprinters sitting around a table, introducing themselves.167.46 KB DrupalNorth 2015 sprinters sitting around a table, listening to Cottser.189.44 KB DrupalNorth 2015 sprinters gathering around and setting up a television, about to set up Drupal Console.164.66 KB cyborg_572 and crasx setting up.177.64 KB Cottser demonstrating how to turn on the automated testing module in Drupal 8 to enzo, bohemier, adamwhite, and HelloNewman.142.43 KB bohemier and adamwhite working together on an issue and laughing.143.63 KB HelloNewman eating a Timbit while nafes & Cottser concentrate on their work. In the foreground is an iconic Tim Hortons coffee.93.58 KB Topic: Primary Image: 

Darryl Norris's Blog: How To Request A Node via REST Using Web Services in Drupal 8

Planet Drupal -



Drupal 8 is going to be a central place to store data and can easily connect with different third-party applications. Dries Buytaert has talked about this idea multiple times in DrupalCon Austin and DrupalCon Bogota, where Drupal 8 is going to be an API to connect to other places. For this reason, Drupal 8 is now integrated with web services in core. In other words, this is an easy way to export data into Hal-JSON, JSON, and XML. I decided to start playing with web services in Drupal 8 to see how I can export my data in JSON format and connected with third party app. I found many tutorials that talks about Drupal how to export JSON data using the Views module, which for many use cases can be very good. I started to think, “What...Read more

Acquia: How to Evaluate Drupal Modules for Performance Optimization

Planet Drupal -

Drupal was designed from the ground-up to be modular. Once you install Drupal core, you can add any number of modules to enhance Drupal's basic functions.

Unfortunately, contributed modules can also impede performance. For example, it's common to find contributed third-party modules that are incompatible with newer versions of Drupal, or other modules. Besides being a security hassle, this can often curb performance.

Evaluating Drupal modules for such issues is thus essential for a smooth Drupal experience. As part of this ongoing blog series on ways to improve Drupal website performance, let’s review how you can evaluate modules.

General module evaluation

The first step in module evaluation is to consider general usage reports, statistics, and maintainer reputation. One by one, go through the following:

  • Does the module officially support your version of Drupal?
  • Good maintainers write good code. If you see the same maintainer's name crop up on a number of well-regarded modules, you know you will at least get quality code.
  • A high maintainer activity level (i.e. commits to a module) indicates a proactive maintainer who takes care of issues quickly.
  • Higher total module usage generally means it's a well-regarded module with fewer performance issues.
  • A large number of stagnant, open issues can point to poor code quality and maintenance.
  • Sudden changes in usage patterns over a short period of time can be indicative of performance issues. For example, if people suddenly stop using a popular module, it could mean that users encountered performance or security problems.

Once you've gone through these steps, you can undertake a performance evaluation.

Module performance evaluation

Now you need to analyze the module performance on your own site.

  • Record site performance before installing any modules. This should include page load time, server load, and user scenario completion time.
  • Record site performance immediately after installing the module.
  • Monitor memory usage continuously to correlate the performance before and after module installation.
  • Perform the same steps for every module individually over time.

These actions will give you quantifiable results on each module's performance as it relates to your site. You might find that highly rated, widely used modules sometimes don't play well with your version of Drupal, while less used modules work perfectly well.

Final questions

Besides evaluating performance, you also need to ask a few questions before using a module.

  • Does the module scale? A module that works perfectly well for a small enterprise website might break when used on a large community-powered platform. Scale is difficult to measure but it is one of the biggest performance bottlenecks in any website.
  • Is performance a top priority? While performance is important, it is by no means necessary for certain types of websites. For example, a small corporate website visited mostly by internal team members may not need top-notch performance.
  • What happens if the module fails? This is an important question. If your module stops working, does it break the site completely, or can the users at least access parts of the site? For example, if the module that controls the login system fails, your users won't be able to use their accounts at all.
  • Do I really need the module? Far too many websites use more modules than necessary. This leads to "module bloat." Ask yourself: “Do I really need this module? Is there a simple manual workaround to enable this function?” If "yes," try to avoid using a module. Keep in mind that the fewer modules you use, the smaller chance of failure.

Modules are crucial for running a Drupal website, but they are also one of the leading causes of website performance issues. Evaluating and understanding modules is essential for running a fast and secure Drupal website.

Tags:  acquia drupal planet

Drupal core announcements: Drupal 8 core updates for July 7th, 2015

Planet Drupal -

Since the last Drupal 8 Core Update, DrupalCon Los Angeles took place, the proposed organizational structure for the Drupal project was approved and MAINTAINERS.txt was updated to reflect this (although it still needs to be updated in the Drupal 7 branch), and the Drupal Association announced updates to their 2015 financial plan.

What's new with Drupal 8?

Drupal 8.0.0-beta11 and 8.0.0-beta12 were released, a new category for issues, plan, was added to categorize meta issues, the Drupal 8 Security bug bounty program was launched, Angie "webchick" Byron analyzed Drupal major version adoption and walked us through the new DrupalCI testing infrastructure, hook_update_N() became required for core patches that introduce data model changes, the number of outstanding criticals was reduced to a new all-time low of 15, and for a while, every single critical was RTBC or being addressed!

Some other highlights of the month were:

How can I help get Drupal 8 finished?

See Help get Drupal 8 released! for updated information on the current state of the software and more information on how you can help.

We're also looking for more contributors to help compile these posts. Contact mparker17 if you'd like to help!

Drupal 8 In Real Life Whew! That's a wrap!

Do you follow Drupal Planet with devotion, or keep a close eye on the Drupal event calendar, or git pull origin 8.0.x every morning without fail before your coffee? We're looking for more contributors to help compile these posts. You could either take a few hours once every six weeks or so to put together a whole post, or help with one section more regularly. If you'd like to volunteer for helping to draft these posts, please follow the steps here!

Increasing Cache Hit Rates with Query String Sort

Cloudflare Blog -

Optimized Performance: Increasing Cache Hit Rate

At CloudFlare, we care a lot about serving requests as fast as possible. Files can be served much faster when already in CloudFlare’s cache. Skipping the trip to the customer’s web server eliminates the latency of that connection and saves bandwidth from the connection between CloudFlare and the customer’s origin, and allows us to utilize the full speed of our ultra-fast servers.

By default, CloudFlare only caches static files. However, Page Rules can be utilized to set more files as cacheable. For more information on Page Rules, please see the Page Rules section of our knowledge base.

Items are cached by their full URL, including the query string. However, due to the details of how query strings work, this can lead to some cache misses. There is no RFC which defines that the order of query strings arguments matter, but in some (rare) cases they do. Thus, by default, CloudFlare caches the following two requests separately:

https://example.com/a?color=red&word=hi https://example.com/a?word=hi&color=red

Introducing Query String Sort

With a newly available Enterprise-level feature called Query String Sort, CloudFlare will first sort the query strings in a URL into a deterministic order before checking cache for the resource or requesting it from the origin, meaning that the URLs:

https://example.com/a?color=red&day=friday&word=hi https://example.com/a?color=red&word=hi&day=friday https://example.com/a?day=friday&color=red&word=hi https://example.com/a?day=friday&word=hicolor=red https://example.com/a?word=hi&color=red&day=friday https://example.com/a?word=hi&day=friday&color=red

will all be cached and be requested from the origin as:
https://example.com/a?color=red&day=friday&word=hi

This feature is especially useful for API servers, which often rely heavily on multiple query string arguments. Remember, we chose an examples with only two and three arguments, but the number of permutations of a set of n elements is n!.

Turning on Query String Sort

To turn on the feature, Enterprise customers can visit the Caching app in the CloudFlare dashboard.

Customers who are interested in learning more about our Enterprise plan can get in touch with us here.

Pages

Subscribe to Cruiskeen Consulting LLC aggregator