Skip to Content

Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 8 hours 15 min ago

Greg Knaddison: Drupalcamp Colorado 2014 Preview: Large Scale Drupal

8 July 2014 - 5:48am

This year, Drupalcamp Colorado is taking on the topic of "Large Scale Drupal" - a phrase that was popularized by Dries Buytaert. We're taking that phrase and using it in a generic sense to help set a focus for our event.

Matthew Saunders wrote a great overview of the camp, so if you're interested and need more convincing to come, read that. This is an update on our tracks and some great sessions that have been accepted already.

Tracks and session submission requests

We're taking that theme as inspiration for our sessions which will be across 4 tracks:

  • Business and Open Source
  • DevOps
  • Commerce
  • Design and Front End
  • Development and Site Building

Today we are excited to announce the first 9 sessions that have been selected. Session Submission is still open until July 11th. We've currently got too many sessions in /Development and Site Building/ and not enough sessions in the other categories. So...if you have something to say in those other areas, please submit a session (note, you have to login first, and you should register too).

First sessions that have been accepted:

There are some sessions we know we're going to accept because they come from great presenters on popular topics that match our theme. Below are the 9 sessions we knew we could accept now.

I think you could attend just these 9 sessions and really have a great weekend of Drupal content and there are going to be dozens more. If you look at the titles and the presenters I think you'll see that there's a lot of people working on interesting problems as a result of dealing with "large scale" sites built in Drupal.

Categories: Drupal

DrupalCon Amsterdam: Session selection for DrupalCon from the inside-out

7 July 2014 - 11:14pm

Like almost everything in the Drupal world, DrupalCon is, in part, a labor of passionate enthusiasts who donate their time. Every year, the Drupal Association appoints a program team who work together to select sessions for upcoming DrupalCons. The program team is unique to every conference, but volunteers of past cons (called “globals”) are asked to join the committee to assist the newer members and pass on historical knowledge.

DrupalCon sessions are divided into tracks, which generally stay the same, but have evolved over the years. For Amsterdam, we have:

  • Coding and Development
  • Core Conversations
  • DevOps
  • Drupal Business
  • Frontend
  • Site Building

For Amsterdam, we’ve added two new mini tracks; Case Studies and PHP. We’ve also added Business Showcase (formerly Day Stage) and the Community track is now a full day summit on the Monday.

Each track has a Chair (or Lead) - someone who takes the lead on setting the theme of the track, generating interest and inviting speakers, and selecting sessions. Last year, I was the Track Chair for the Coding and Development track for DrupalCon Prague. This year, I was lucky enough to be asked to be a “Global” (or co-chair) for the Coding and Development track for Amsterdam. This means that I was there as support for the new track chair, Pedro Cambra (pcambra). I was helped by veterans of previous DrupalCons, Jason Yee (jyee) and Larry Garfield (Crell).

Pedro and team have done a fantastic job of canvassing for speakers and helping people with their session proposals.

There’s a lot of elements to session selection. We need to make sure that sessions are of value to a wide audience. The presenters must be engaging speakers who can interest a large crowd of attendees. We try as hard as we can to bring in new (to DrupalCon) speakers, and speakers who bring something from outside of the Drupal sphere. We want to make sure that the diversity of the community is represented and encouraged. And we need to work across track teams to ensure that one speaker is not speaking in several tracks; both for the sake of their stress and sanity in preparing the talks and to ensure that everyone who applied has the best chance of speaking. Finally, we need to make sure that sessions fit both the theme of the track and of the conference.

As you can imagine, balancing all of this can be quite challenging!

Each track team ranks their sessions as makes sense to the team. In the Coding and Development track, Pedro, Jason, and I rated each session and speaker out of 5, paying special attention to the quality and relevancy of the submission and the speaker's rapport with their audience. If we're lucky, we've seen the speaker present before, but if not, we can view any available slide decks or recordings to get a sense for their presenting ability. This is why it’s very important for prospective speakers to include speaking history in their session proposal. A speaker doesn't need to have sessions online to be selected - it just makes our job easier. We refined the 128 submissions in the Coding and Development track down to a top rated 25 or so sessions, which were then filtered to make sure that there is no overlap and that the speaker wasn’t speaking in another track.

Being so involved in the planning of content for DrupalCon is an enlightening experience. The breadth of knowledge, experience, and creativity in the Drupal community is quite literally overwhelming. The 510 sessions submitted this year illustrate just how passionate the community is.

There’s no better way to get a sense of the Drupal zeitgeist than to pore over hundreds of sessions. This discovery exposes us all to new technologies, projects, and methodologies, and at least for me has made me aware of people in the community that are doing fascinating, challenging, and important work - people I might never have found otherwise. There’s also a degree of humility to be observed when considering the diverse and very well informed views of your fellow content team members.

After two weeks of review, ranking, and deliberation across timezones, I present to you with the 90+ DrupalCon Amsterdam selected sessions.

View selected sessions

If you are interested in becoming involved in DrupalCon planning in the future, let the DA know. It's very rewarding, and the team dinner during the conference just caps it all off!

--
Cameron Tod (cam8001)
DrupalCon Amsterdam Coding and Development Co-Chair

Categories: Drupal

Kristian Polso: Fix Drupal Registry with Registry Rebuild

7 July 2014 - 9:45pm
It has happened to all of us. You mistakenly remove a module directory or migrate your site and forget to include some necessary modules. This causes your Drupal site only to show the WSOD and perhaps the following error:
Categories: Drupal

Drupal.org Featured Case Studies: Newstica

7 July 2014 - 1:51pm
Completed Drupal site or project URL: http://www.newstica.com

Newstica.com is an intelligent news reading application operated by a Canadian company. The website collects hundreds of news stories daily and creates a unique set of articles on each page view with the use of sophisticated algorithms that operate off individual users' preferences.

Key modules/theme/distribution used: PanelsViewsZenFeedsFeeds XPath ParserTeam members: highvrahos
Categories: Drupal

Mediacurrent: Using Sass Breakpoints Effectively

7 July 2014 - 1:02pm

There have been plenty of blog posts touting the reasons to use Sass as a CSS preprocessor, and if you've been doing responsive design for a while, you're probably already using the Breakpoint gem with Sass. But there are many ways to use both of these tools, so let's talk about using breakpoints effectively. 

Start with the small screen first, then expand until it looks like sh*t. Time for a breakpoint!
- Stephen Hay.

Categories: Drupal

Chuva Inc.: Entity Metathing what? -- A very brief introduction on entity_metadata_wrappers

7 July 2014 - 12:57pm

Are you familiar with entity_metadata_wrappers? If you’re not, oh boy, you should be!

Entity Metadata Wrapper is the right way - and, after you get the grip of it, the easiest way - for you to manipulate anything with a field when coding your module. Sure, since the old days of CCK we are used with dealing with our fields in our nodes. Except they are a little messy.

Cleaner code!

Instead of doing this:

<?php
$first_name = '';
if (!empty($node->field_first_name)) {
  $name = $node->field_first_name[LANGUAGE_NONE][0]['value'];
}
?>

Let’s condense that, shall we?

<?php
$node_wrapper = entity_metadata_wrapper('node', $node);
$first_name = $node_wrapper->field_first_name->value();
?>

Sure, the name “metadata wrapper” may be a little intimidating, but it does shortens your code and makes it clearer. Oh, and if you have an entity reference field, or a file field, you can just do this:

<?php
$image = $node_wrapper->field_image->value();
?>

And the $referenced_node is already a loaded file object, not a useless “fid”.

Wrappers for dealing with entity reference: cleaner-er code!

Suppose you have two node types: Employee and Department. There is an Entity reference field from "Employee" to "Department" and on the "Department" node you have a field called "field_dept_phone" that stores the phone number. (for simplicity, I'm assuming that field_employee_dept is required).

If you have the $employee node, how to fetch the phone number?

Hard way:

<?php
$phone = '';
$department = node_load($employee->field_employee_dept[LANGUAGE_NONE][0]['target_id']);
if ($department && !empty($department->field_dept_phone[LANGUAGE_NONE][0]['value'])) {
  $phone = $department->field_dept_phone[LANGUAGE_NONE][0]['value'];
}
?>

And the wrapper way:

<?php
$wrapper = entity_metadata_wrapper('node', $employee);
$phone = $wrapper->field_employee_dept->field_dept_phone->value();
?>

 

Now what?

Well, this post is not intended to be a full entity metadata wrapper course, so, if I have convinced you, take 15 minutes of your day and do this:

  1. Download Entity API from http://drupal.org/project/entity
  2. Read this, now: https://drupal.org/node/1021556
  3. Your life quality will improve, proportionally to your code quality!

Photo credits: https://www.flickr.com/photos/81564552@N00/3208209972/

PHPentityentity_metadata_wrappersdrupal planet
Categories: Drupal

Drupal governance announcements: Shared Values and the Drupal Community

7 July 2014 - 12:50pm

Dries recently wrote a blog post about the challenges of fostering diversity and inclusivity in the Drupal community. This is the latest installment of a conversation that’s been going on for years.

In 2012, a group of Drupal community members worked together to draft a Code of Conduct that could be used to supplement the Drupal community’s Code of Conduct at DrupalCon and other in-person events.

This effort prompted a large (and sometimes heated) conversation that involved people from all corners of the Drupal community. This conversation was a difficult one, and many of us disagreed about many different things, but ultimately, we all agreed on several general principles:

We are a group of diverse people from a wide variety of ethnic, cultural, and religious backgrounds, and we embrace that.
Making all attendees feel welcome and included at DrupalCon is everyone’s job.
We treat each other with dignity and respect.
We take responsibility for our words and actions and the impact that they may have on others.

These principles informed the DrupalCon Code of Conduct, which was ratified by the Drupal Association in the summer of 2012 and has been used at every DrupalCon since.

At the last few DrupalCons, there have been a number of reported incidents, including groping, sexual harassment, physical assault, inappropriate comments made about female speakers, and more. While we are grateful that these incidents are being reported, even a single incident is too many.

In early 2013, the Community Working Group was chartered by Dries to uphold the Drupal Code of Conduct and to maintain a friendly and welcoming community for the Drupal project.

As a community, it’s important that we always keep our shared principles and values in mind when interacting with others, whether that be in person at DrupalCon, in the issue queues on Drupal.org, on IRC, or via social media. As the DrupalCon Code of Conduct states, the purpose is not to restrict the diversity of ideas and expression, but instead to ensure that there is a place for everyone in the Drupal community who agrees to abide by these basic principles.

Even when everyone has the best intentions, however, it’s inevitable that conflicts will occur. To ensure that these are addressed in a manner consistent with our shared values, the Community Working Group has worked with the community to develop a conflict resolution policy that lays out the process for addressing disagreements. This policy was developed by participants in the Community Summits at DrupalCons Prague and Austin, with additional review on Drupal.org.

This policy seeks to first and foremost empower individuals to resolve issues between themselves when possible, asking for help when needed, and only after that fails to escalate further. This approach gives people more control over their dispute and is the most likely to result in a positive outcome for everyone involved.

For matters that cannot or should not be resolved in any other way, the Community Working Group is available as a point of escalation. Incidents can be confidentially reported to the Community Working Group using the Incident Report Form. If the issue falls within the purview of the Community Working Group’s jurisdiction, we will then work with the involved individuals to find a remedy.

In her DrupalCon Austin keynote Erynn Petersen talked about how diversity is a key component of a healthy and productive community. While the Drupal community is one of the most diverse and welcoming communities in open source, we still have room for improvement. If you’re interested in joining us in that effort, let us know by responding to our call for volunteers or by participating in a Community Summit at an upcoming DrupalCon.

Actively supporting and maintaining a welcoming environment is something that every one of us in the Drupal community needs to be a part of, and it’s essential to the long-term health and growth of the project and community that we all love so much.

Categories: Drupal

Károly Négyesi: Prejudices

7 July 2014 - 3:23am

At Szeged, I asked a female Drupal contributor in Hungarian (I'm glad she did not understand) what was up with the coffee maker, because I readily presumed she was staff.
I saw one of the female geek role models at Austin with her baby. I got confused for a second, because apparently I think the übergeek and mother roles can't overlap.
On IRC, I almost said "Wow, that's impressive from a girl.".
I do not know how I can avoid these thoughts, but I am aware of them, I am bothered by them, and I try not to act on them. I also try to point out to fellow Drupalers when they act on their thoughts that these are not appropriate. I'm not sure what else I can do.
If you have good ideas on overcoming prejudice, please share!

Categories: Drupal

DrupalCon Amsterdam: Convince Your Boss to Send You to DrupalCon Amsterdam

7 July 2014 - 12:00am

Attending DrupalCon is a great investment in skills, professional development and relationships. And it's also a lot of fun!

Here is your chance to demonstrate the value of attending DrupalCon to your employer.

We’ve developed a set of materials to help you demonstrate the value of attending DrupalCon to your employer.

Why Attend DrupalCon?
  • Learn the latest technology and grow your Drupal skills
  • Build a stronger network in the community
  • Collaborate and share your knowledge with others

Resources About DrupalCon - includes program summary, demographics, budget worksheet PDF Letter to your employer template Word or GoogleDoc Trip report template PDF Request a Certificate of Attendance Available following the conference.
Categories: Drupal

Károly Négyesi: Easier configuration development for Drupal 8

6 July 2014 - 3:56pm

With config_devel, when you are editing a migration, you can just enter the name of the file being edited at admin/config/config_devel and on every request the module will check for changes and import the file into the active storage. The other direction works as well: say you are working on a contrib module and have a view. Provide the path of the file (this time in the auto export box) and on every change Drupal will automatically export. Once satisfied, just commit. Or perhaps you just want to follow what's in a config file as it's being edited -- provide sites/default/files/some.config.name.yml and it'll be right there on every save.

Both import and export are doable manually with the config module core provides. But I think the automatism makes life easier and I hope the module will be popular among D8 developers. Finally, let me thank beejeebus for cooking up the module originally and handing it over to me despite he knew I will rewrite it from the ground up.

Categories: Drupal

SitePoint PHP Drupal: The Drupal 8 version of EntityFieldQuery

5 July 2014 - 9:00am

Even though Drupal 7 core fell short of a proper way of handling its brand new entity system (we currently rely on the great Entity module for that), it did give us EntityFieldQuery. For those of you who don’t know, EntityFieldQuery is a very powerful querying class used to search Drupal entities programatically (nodes, users, etc).

It provides a number of methods that make it easy to query entities based on conditions such as field values or class properties. If you don’t know how it works, feel free to check out this documentation page or this great tutorial on the subject.

In this article I am going to talk about what we have in Drupal 8 for querying entities. There is no more EntityFieldQuery, but there’s an entity.query service that will instantiate a query object for a given entity type (and that implements the \Drupal\Core\Entity\Query\QueryInterface). We can access this service statically through the \Drupal namespace or using dependency injection.

First up, we’ll look at querying node entities and then we’ll see how to load them. The same techniques will work with other content entities as well (users, comments etc), but also with configuration entities, and that’s really cool.

The entity query service

As mentioned, there are two ways we can access the entity.query service that we use for querying entities. Statically, we can do this:

Continue reading %The Drupal 8 version of EntityFieldQuery%

Categories: Drupal

flink: Earl's chicken

5 July 2014 - 2:27am

Here’s a little history I pieced together about, Drupal, the Views module and the human condition.

It must have been 4 years or so ago that the new Field API for D7 crystallises, requiring modifications to Views. So someone adds lines of code to make this happen. They don’t think much about those lines or the performance impact these may have. They don’t put a “hook” in to allow developers to alter the behaviour of those lines. Why would they? It’s a pretty trivial change. In fact it never crosses their minds to add the CPU cycles spent by that code to the view's performance stats.

4 years go by.

Nobody is aware that if you piled up the seconds collectively wasted in that code across all Drupal sites using Views over a period of 4 years, it would amount to like,…. like higher than the Eiffel tower. So to speak…

Until a couple of weeks ago some RdeBoer employs XHProf to find out why a client’s site is a little sluggish. And he finds those lines of code. And although there’s no hook as such to bypass those lines, he finds a way without hacking the Views module to neutralise those lines, offering a simple switch on the UI. Like a Turbo button, it makes selected Views run faster.

The customer is delighted. Now their site is finally speedy enough to go live! Another client quotes the results as “amazing”.

Encouraged by the happy customers RdeBoer tarts up his module to share it with the Drupal community. Now everyone can enjoy similar speed improvements. He writes a little blog post about it.

In a comment to that post @merlinofchaos confirms that those lines were indeed added with the introduction of the Field API. And that not showing how much time is spent in those lines is an oversight.

RdeBoer smiles. Takes a sip of his wine. 4 years... Isn’t life funny?

@merlinofchase goes back to the garden and throws another shrimp on the barbie. Metaphorically speaking. Might have been chicken. Have you seen Earl’s chicken? The photo above that’s his chicken. He cooked that last week. I would love a bit of that chicken. With its juices dripped over the veggies. Yummo!

Meanwhile @someViewsDude has a not-so-constructive go via Twitter, email and the module’s issue queue ...

My friend and colleague Susan concludes her writings with a beautiful phrase: “Breathe and do the next right thing”.

Maybe we can all sit around Earl's barbie. Try his chicken. It looks delish.

File under: Planet Drupal
Categories: Drupal

Drupal 8 and iOS: Use Caching with NSURLRequest

4 July 2014 - 1:45pm
Use Caching with NSURLRequest

I am Vivek Pandya and I am working on Google Summer of Code 2014 project to build an iOS application for Drupal 8 site. In this article I am sharing my experience about caching retrieved data from Durpal 8 REST web service with in iOS7 application.

While writing iOS application that loads data(JSON) like a list of articles it is better to use cache mechanism provided by NSURLSession api. An NSURLRequest instance specifies how local cache is used by setting NSURLRequestCachePolicy values: with NSURLRequestProtocolCachePolicy, NSURLRequestReloadIgnoringCacheData, NSURLRequestReturnCacheDataElseLoad, NSURLRequestReturnCacheDataDontLoad etc.

The default cache policy for an NSURLRequest is NSURLRequestUseProtocolCachePolicy. While working with REST endpoint HTTP is default protocol so when NSCachedURLResponse does not exist for the request the NSURLSession will fetch data for that request.

If cached response exist than NSURLSession api will make HEAD request to the resource and check for cached data's validity by examining various response header like “Last-Modified” , “Cache-Control” etc. And if it finds data to be stale one it will load the data again otherwise returns cached data.

But, before using this cache mechanism at iOS side we have to make our Drupal site pages cacheable to do so navigate to “admin/config/development/performance” and set time limit value for page cache. Save the configuration. Now to verify whether Drupal has really enabled cache for pages or note try HEAD request with any REST api client like Postman, in response header you should be able to see “Cache-Control : max-age=<seconds>” here seconds should be same as you specified in configuration. See the picture below to get more clarity.

Now while creating request object with iOS SDK set it's caching policy to NSURLRequestProtocolCachePolicy. Now run the code , first time it will take normal time to load the data but next time onwards it will only reload the data if it has been changed or max-age value has expired.

For more details please refer to URLLoading system guide by Apple.

 

Tags:
Categories: Drupal

Drupal core announcements: Drupal 8 core sprints, August 7-10

4 July 2014 - 6:56am
Start:  2014-08-07 (All day) - 2014-08-10 (All day) UTC Sprint

Summer is in full swing, but we know you enjoy Drupaling with your peers in the summer as much as any other time of the year! Plus, this summer is an important time to help get Drupal 8 done, so there is no good reason to skip getting together. We are holding two Drupal 8 sprints at the same time on August 7 to 10: one in North America at TCDrupal, and one in Europe at Drupalaton. Sprinters from both events will collaborate on Drupal 8 issues.

Twin Cities DrupalCamp (North America)

Twin Cities DrupalCamp hosts a four-day Drupal sprint, with a focus on unblocking the release of Drupal 8 and other topics like multilingual, accessibility, and Drupal.org. The last day of the event provides a mentored sprint which is ideal for Drupalers new to sprinting or the issue queues. The camp itself features keynotes from Holly Ross and Chris Shattuck, free Drupal training on the first day, and five parallel session tracks on the middle days. The event is in Minneapolis and Bloomington, MN and the early bird ticket is $35. If you need funding to attend, contact the organizers.

Sign up for TCDrupal sprints Drupalaton (Europe)

Great location for a summer camp in an affordable hotel right on the beach of the biggest warm water lake in Europe (with a tiny private island), Drupalaton sprints provide a relaxed environment to work and have fun together. The camp programme focuses on providing longer hands-on workshops with featured speakers Ruben Teijeiro, Campbell Vertesi, Adam Juran and Gábor Hojtsy. The event is in Keszthely, Hungary and the ticket is 50 EUR. There is a funding pool for sprinters who would not attend otherwise; contact the organizers.

Sign up for Drupalaton sprints

P.S. Even if you cannot attend in August, keep in mind we have 9 consecutive days of sprints coming up in September in Amsterdam around DrupalCon.

#node-431758 h3 { display: none; } #node-431758 h3.content { display: block; }
Categories: Drupal

Lullabot: DrupalCon Session Selection

4 July 2014 - 5:59am

The session selection for DrupalCon Amsterdam has just been completed and will be announced next week. In this episode Addison Berry is joined by Steve Parks (steveparks), Pedro Cambra (pcambra), and Michael Schmid (schnitzel) to talk about how this actually works.

Categories: Drupal

Makak Media: PhoneGap and Drupal 7 Data Synchronization for My Caribbean Offers App

4 July 2014 - 5:34am

In our last blog post we launched the My Caribbean Offers app for Android and Apple iOS.

The app displays offers for all types of tourist related businesses from across the Caribbean and is currently free to download!

We thought we'd share what went into building the app, the modules used and processes involved.

Client side requirements

Phonegap with local database (SQLite in our case), jQuery for ajax operations (http requests)

Module requirements

Views, Services, Custom module to save node deletions

read more

Categories: Drupal

LimoenGroen company blog: The power of sharing

4 July 2014 - 3:39am
Scientia potentia est - Francis Bacon, 1597

Napoleon beat his opponents for years, despite his much smaller army. His knowledge of warfare and the armies of his opponents made him win the wars every time, and ultimately he was able to dominate Europe.

Knowledge is power > Sharing is power

The phrase "Knowledge is power" does not come out of thin air – where you could also explain power as influence, wealth or fame. However, in the knowledge economy of today is just having knowledge not enough. It becomes powerful when you can convey that knowledge. In the Open Source community we see that one who shares the most has the most "power". The real change agents, the core developers; they get done a lot because they not only know a lot, but also share this knowledge. And that goes in many ways: by writing a blog, giving a presentation, or simply just by contributing code.

Contributing code

Open Source is only good if people not only use it, but also improve it. Drupal is great software, but it has bugs. In the core itself, but (especially) in its thousands of community modules. If we discover a bug during a project we could fix this locally and continue with our work; our problem is resolved. However, we won’t. We always make sure that the solution flows back into the community. That can be done in several ways:

Contribute a patch

Can we solve the problem? Great! We create a new issue in the issue queue of the relevant module and deliver the code change as a patch. Example of Martijn: https://www.drupal.org/node/1783678

Describe the problem

Are we unable to fix it ourselves? Then at least create an issue and describe how the issue can be reproduced. This helps another developer to fix this, or recognize them their own problem quickly. Example of Dominique: https://www.drupal.org/node/907504

Start een nieuwe module

Did we write a separate piece of code that might be interesting for others? We’ll then try to offer this as a separate project. The extra time it takes to make a piece of client code generic and configurable is not an issue, knowing that the community as a whole can now help to improve and maintain the code for us. Example of myself, commissioned by the European Space Agency: https://www.drupal.org/project/commons_hashtags

Featured Drupal Provider

By sharing so much code we became one of the 4 Featured Drupal Providers in the Netherlands.

Taking equals giving

At LimoenGroen (Lime Green) everyone gets 10% community time: every other week, our employees have a full Friday to do what they think is important. They experiment with new technology, write a blog, or "open-source" customer code.

To make sure that the client agrees, we add the following boilerplate text to any quote that we write:

Drupal is developed under an open source software license. All, in the context of this project developed software falls under the same license as Drupal itself: GNU General Public License, version 2 or later. The intellectual property is yours. To take full advantage of the benefits of the open source development model, we believe it is important that we have the ability to develop parts of the software generic and share this with the community (with the mention that this is developed for <CUSTOMER NAME>).Appeal to Drupal suppliers

Taking equals giving is what I truly believe in. Therefore, I call on every Drupal supplier to include the text mentioned above in your offers. By doing so, there will soon be more to take! Who's with me?

Categories: Drupal

flink: Drupal Views Accelerator

3 July 2014 - 9:46pm

When caching is not an option, Drupal sites employing the Views module may find their performances bound by it. Getting to the bottom of this issue on a number of sites we discovered that performance benefits are to be gained in unlikely corners of Views. We published a first version of the Views Accelerator module for everyone to reap those benefits. You’re invited to give it a burl. A couple of clicks on the UI could be all it takes to put a smile on the performance dial.

From simple to more complex analysis tools

Did you ever pay attention to that spinning circle while your browser is fetching your page? While that wheel spins anti-clockwise your browser is waiting for a reply from the server to your mouse click. Then as the server response streams in, the wheel reverses direction and the browser builds up your page. Details of each and every file processed during that phase and how long it took can be found under the Network tab of your browser console.
But when it comes to improving that left-churning part, no amount of browser analytics can help you. This is when you bring out the big guns. Like XHProf, or for D8, the Symfony-based WebProfilerBundle.
And you get ready to get your hands dirty, as you may have to dig deep.

When caching doesn’t cut it

But why take the trouble to analyse all this? Why not tell your customer to throw a pile of caching technologies at the under-performing site?
Because depending on the nature of your site, caching can be ineffective and even lead to functional errors.

The reason is personalisation/customisation.

Increasingly websites recall specific details about us to give us an enhanced browsing experience tailored to our preferences. Sites remember stuff we chose before. Brands, price ranges, travel destinations. Taking advantage of GPS/WiFi technology sites know where we are when we visit them. A map may place our current location at its centre and only show nearby points of interest — rather than the whole world.

Websites are moving from off-the-rack, one-size-fits-all to bespoke.

To cache is to assemble time-consuming pages once, to then dish out copies to everyone who ordered that same page. Caching does not cater for every guest bringing their own dietary requirements to the table.
Bespoke is indigestible to caching.

That’s when you have to take caching off the menu and look for alternative ways to speed up a site. So we cooked up Views Accelerator.

Identifying server-side slow spots

Tasked with making a customer site perform quicker we booted up XHProf. The culprit of slow performance was soon identified as a map featuring hundreds to thousands of nearby points of interest, centred on the visitor’s current location.

But it wasn’t any of the map engines or their APIs (Google, Openlayers, Leaflet) that were soaking up the seconds. Neither was it the database. It was Views. A little-known corner of Views.

Those familiar with the Views UI cockpit may know the tick box Show performance statistics on the admin/structure/views/settings page. With that checked, a preview prints out Query build time, Query execute time and View render time.

It’s like the developers of the Views module themselves felt those three numbers sum up all there is to Views performance.

But there is a fourth component… and it can slow your site down more than the other three together. XHProf proved it.

The performance opportunity

Between the query-execute and view-render phases, the code passes through a post-execute stage. This is where the raw results from the database are groomed for final rendering and theming. All results go through post-execute, even when this may not be necessary....

And with that we cue to the Views Accelerator project page. Featured there is a summary of a case study, proving how flicking on the module can boost Views speeds by 60%.

Views Accelerator is unconventional in its approach and is still in its infancy. Time will tell how the module matures in the community. We welcome feedback to help us improve the module.

Enable Views Accelerator on a test site. In Analysis mode it tells you how every view on every page you visit performs. Then in Accelerator mode it shows you those figures again. Hopefully the second time round those figures are a little leaner, making the user experience a little richer. If not, then your views may already be close to optimum. That’s reassuring too, isn’t it?

No gain, no pain. There is no reason not to give Views Accelerator a go.

Image taken from Time Magazine:
The $19 million Bloodhound SSC that is designed to shatter the world record on land with speeds over 1000 mph.


File under: Planet Drupal
Categories: Drupal

InternetDevels: Migrate - module for data import in Drupal

3 July 2014 - 2:00pm

Sometimes while website development it is necessary to transfer data from one database to another. Often it is either migration to a newer Drupal version (from 6.x to 7.x) or transfer of content to Drupal from another platform. Migrate module makes a very convenient tool for importing data in such cases.

Read more
Categories: Drupal

Drupal Easy: Drupal Web Developer Career Series Part 2: Trailblazer Stories and Advice

3 July 2014 - 1:28pm

This is the second of four (ok, it was three, but there is so much good information!) weekly blog posts that encapsulate the advice, tips and must-do elements of career building in the Drupal Community from the panel of experts collected for DrupalEasy’s DrupalCon Austin session; DrupalCareer Trailhead; Embark on a Path to Success. It will be listed with other career resources for reference at the DrupalEasy Academy Career Center.

-->

read more

Categories: Drupal


Google+
about seo