Planet Drupal

Subscribe to flux Planet Drupal
Drupal.org - aggregated feeds in category Planet Drupal
Mis à jour : il y a 57 min 37 sec

Liran Tal's Enginx: Drupal Performance Tip – removing unused modules

mer, 12/11/2014 - 20:22
This entry is part 2 of 2 in the series Drupal Performance Tips

In the spirit of the computer video game Doom and its skill levels, we’ll review a few ways you can improve         your Drupal speed performance     and optimize for better results and server response time. These tips that we’ll cover may be at times specific to Drupal 6 versions, although     you can always learn the best practices from these examples and apply them on your own code base.

Doom skill levels: (easiest first)

  1. I’m too young to die

  2. Hey, not too rough

  3. Hurt me plenty

  4. Ultra-violence

  5. Nightmare!

  This post is rated “I’m too young too die” difficulty level.

 

If you’re using a Drupal distribution which is great for kick-starting a project with many features built-in, you should still review added modules which are managed through the installation profile as they might prove un-necessary for your product as time goes and your product evolves and matures. Remember that even if you’re not using a distribution, you might have added some modules to meet a functionality, which you no longer use and you disabled through CSS, through the menus, through the theme, but you forgot all about removing the actual module. These un-used modules account for memory footprint as they are loaded through PHP and they can also account for Drupal hooks, which is even worse in terms of performance for you.

Remember to review your installed modules base on Drupal and remove any un-used functionality:


(adsbygoogle = window.adsbygoogle || []).push({});

The post Drupal Performance Tip – removing unused modules appeared first on Liran Tal's Enginx.

Catégories: Elsewhere

Drupal Watchdog: Watch Over My Shoulder

mer, 12/11/2014 - 19:47
Article

One of the best ways to learn useful tricks at the command line is to sit with someone and watch what they do. Due to the distributed nature of the Drupal community, we don't do nearly enough pair programming. Too often we work in isolation and then push our work on others when we finish. In this article I invite you to sit down beside me and watch over my shoulder as I explore Drupal 8 from the command line.

Navigating Drupal in the Bash Shell

The instructions in this article will work for OSX, and Linux systems, such as Ubuntu, but not Windows.
When reading command line instructions, there are two important characters we need to know about: $ and #. When applied to the beginning of a line, these refer to the prompt. We don't type these characters when issuing our command. $ signifies the command should be run as a regular user; # signifies the command is run as the administrative user (“root”).

As a themer, the first thing I want to explore is, of course, the themes. Let's begin by navigating to our Drupal folder. I start by opening up a terminal application. At the command line, I type cd, and then, using Finder, locate my Drupal folder. I then drag this folder onto the terminal application. It will automatically paste the path to the Drupal folder into my bash prompt. I press return, and bingo – we have navigated to the Drupal folder!

Let's take a peek inside the core folder of themes: we’ll navigate to the folder core/themes and then list (or ls) all files.

$ cd core/themes $ ls

There should be four things listed. See them all?

Catégories: Elsewhere

Drupal Association News: How to Read the Association Financial Statements

mer, 12/11/2014 - 19:37

I've had a couple of questions related to Association finances lately in various communications channels. I know that most of you are not finance professionals for a living, so rather than answering in several different silos, I thought I might write up this post about how the Association financials are structured and how you can read them. You know, for when you need a break from your other Drupal work! So if you're into this sort of thing (and I am not judging here, because I am WAY INTO this sort of thing), read on!

What are financial statements?

A financial statement is a formal record of the financial activities of the Drupal Association. The financial statements present information in a structured way that should make it easy to understand what is happening with the organization's finances. In other words, financial statements should tell a story about what is happening with the Association's money. Generally, financial statements include three standard reports:

  • Income Statement (or Profit & Loss): This report shows the revenue that is recognized as received and spent during a given period. It is tempting to compare the income statement to your checkbook register, but it's not quite that simple. The catch is that the income statement shows RECOGNIZED income and expense. One of the US accounting rules, for example, is that we can not recognize revenue for a DrupalCon ticket until the month in which the event happens. So, if you buy your DrupalCon Barcelona ticket in June, and the event is in September, your ticket revenue will not show up until our September income statement. Until then, that revenue sits on our Balance Sheet. So, the income statement alone does not give you a full picture of the organiztion's financial position. It simply represents the movement of recognized revenue in a specific time period. The income statement also represents some non-cash changes, such as depreciation.
  • Balance Sheet: The balance sheet shows us the assets and liabilities for the organization for that given time period. Reading the balance sheet, you can get a better understanding of how much money is in the bank, and where we owe, or might possibly owe, money. These things are not reflected in the income statement. Going back to our DrupalCon Barcelona example, prior to the Con, any revenue from sponsorship, ticket sales, or training sales would be held on the balance sheet in two ways. First, it will simply be reflected as cash in our bank account. Secondly, it is reflected as a liability, broken out specifically as sponsorship or ticket revenue. It's a liability because if we cancel the Con, we have to give you your money back! When preparing the September financials, we move the ticket revenue from the balance sheet liabilities session to the Income Statement, where it is treated as recognized revenue. 
  • Cash Summary: The cash summary (or cash flow) is the report that simply shows the movement of money into and out of our accounts. It does not account for depreciation or other non-cash accounting.

Those three reports are the standard set that organizations issue when reporting their financials.  The Association, however, issues additional reports to add clarity and transparency around the programs that you care most about.

About the Drupal Association Financial Statements

The Drupal Association financials are created on a monthly basis, and then are reviewed by the Finance Comittee of the board. On a quarterly basis, the Finance Committee presents the financials to the Board in executive session, which, if there are no serious questions, approves the financials. At that point, we publish the three months of financials to the community. They are promoted in a blog post about the meeting, and are also always available on the board materials page on the Association site. 

As I mentioned above, the Association financial statements go above and beyond the standard reports. In addition to the main three, our monthly financials also include the following: 

  • "PL All Classes:" This is an income statement report, showing recognized revenue and expenses for the month, but it is broken out by program area. This gives you the opportunity to see, for that month, the recognized revenue and expense for the upcoming Cons, or Drupal.org, or our Drupal Product Marketing efforts, for example. This report is for the month only, so keep that in mind. If you are looking at the May financial statements, the numbers in this report are for May only.
  • "Revenue:" This report was designed to show how our various revenue lines are performing. One of our board mandates is to diversify revenue so that DrupalCons are not our primary source of income. Taking this pressure off the Cons to perform financially will allow us to make different kinds of choices for the Cons, and it provides us more stability as an organization. This report helps us monitor progress for those revenue lines.
  • "PL DC ConName:" We create one of these report for each of the Cons we are working on. They are income statements for those Cons, year to date (YTD). YTD means that the report reflects all income and expense for that year, not just the current month. In these reports, you can see detailed information about expenses, with revenue generally not recognized on the report until the month of the Con.

And, keep in mind that all Association financial statements are reported in US Dollars.

How to Read the Financial Statements

A goal of financial statements is that they are supposed to make financial information easier to understand. However, the truth is that it is difficult for mere mortals to read financial statements. It takes both training and practice. However, let's see if I can walk you through some details. I'll use the March 2014 financial statements in this example.

Income Statement

The Income Statement presents the income and expenses for both the month of the report (in this case, March) as well as the year to date, or YTD, amounts (in this case, 1 January through 31 March 2014). So the top of the report looks like this:

Here's what what the columns represent:

  • Actual: Amounts for the month the financials report represents. In this case, March 2014.
  • Budget: The budgeted amount for the month the financial report represents. In this case, the amount we budgeted for March 2014.
  • YTD Actual: Total amount for the year, through the month the financial report represents. In this case, 1 January through 31 March 2014.
  • YTD Budget: Total budgeted amount for the year, through the month the financial report represents. In this case, the amount we budgeted for 1 January through 31 March 2014.
  • Var %: The percent difference between the YTD Actual and YTD Budget. This gives you a sense of how good a job we did at budgeting. Variance can occur because we receieved or spent money faster than we anticipated, or our models were off entirely. Remember that the Association only began budgeting and reporting in these formats 18 months ago, so we're still learning about what our cycles of revenue and expense are, so we expect the variance to decrease overall throughout the next few years as we get better at this.
Balance Sheet

The Balance Sheet presents the assets and liabilities as of the month of the report, which is March 2014 in this example. The balance sheet almost always also shows a comparative period - the same period the year prior, which is March 2013 for this example. This gives you the opportunity to see how things have changed in the last year. The report looks like this:

Cash Summary

The Cash Summary report shows the flow of money into and out of the organization in the given period. For compartive purposes, it also includes a Year to Date (YTD) column that shows all cash movement for the year, which is 1 January through 31 March in this example. The Cash Summary looks like this:

What our Financial Statements do not show

Simply put, our financial statements do not show a lot of information. The point of statements is to take complex and copious amounts of data and distill it into something digestable. We do not, for example, show each of the tickets sold for a DrupalCon and who they were sold to. We don't show each invoice that was received for Association software as a service subscriptions. We have the data, and I'm not oppposed to sharing it (as long as I check that we are not violating any privacy or other laws - you never know). However, it does not make sense for us to publish this level of detail on a monthly basis. 

That said, if there is something our financial statements do not show you, you can always ask. If it's not published here, it's not because we don't want to share the information. It's because we want to share information that can be meaningfully understood.

Summary

That should help you get through some of our financial statements a little better. I am not an accountant, but I am always happy to field any questions you have about these documents, and our amazing Operation Team of Kris and Leslie love to help. Just drop me a line via email or go ahead and post in a public channel like Twitter or a forum. Give me a heads up and I will get back to you.

Flickr photo: Doug88888

Catégories: Elsewhere

David Stoline: Fake DNS Hosts with Behat with custom behat parameters

mer, 12/11/2014 - 18:06

I was recently working on a Drupal project that had some internal DNS managed via hosts file. Tell me about it. Having no publicly accessible DNS or IP creates a challenge when your SaaS based Jenkins runs the tests.

The solution for this is a little custom work in your FeatureContext constructor and a BeforeScenario method.

And a little glue in the behat.yml to pass the custom hostHeader variable to the FeatureContext. Make sure that you're also setting the IP of the server for base_url and you're all set.

You can use this same pattern to pass around other variables from behat.yml to your FeatureContext.

Tags: 
Catégories: Elsewhere

Paul Booker: How to set up your own Git server.

mer, 12/11/2014 - 18:02

From your local machine ..

1. Create your keys

ssh-keygen -t rsa

2. Upload to your server

scp ~/.ssh/paulbooker.pub root@92.243.12.252:/tmp/paulbooker.pub

From your server ..

1. Install Gitolite.

apt-get install gitolite

2. Create a user for Gitolite.

adduser \ --system \ --shell /bin/bash \ --gecos 'git version control' \ --group \ --disabled-password \ --home /home/gitolite \ gitolite Adding system user `gitolite' (UID 103) ... Adding new group `gitolite' (GID 105) ... Adding new user `gitolite' (UID 103) with group `gitolite' ... Creating home directory `/home/gitolite' ...

3. Setup Gitolite

su - gitolite gl-setup /tmp/paulbooker.pub The default settings in the rc file (/home/gitolite/.gitolite.rc) are fine for most people but if you wish to make any changes, you can do so now. hit enter... /usr/bin/select-editor: 1: /usr/bin/select-editor: gettext: not found 'select-editor'. /usr/bin/select-editor: 1: /usr/bin/select-editor: gettext: not found 1. /bin/nano <---- 2. /usr/bin/emacs23 3. /usr/bin/vim.tiny /usr/bin/select-editor: 1: /usr/bin/select-editor: gettext: not found 1-3 [1]: 1 creating gitolite-admin... Initialized empty Git repository in /home/gitolite/repositories/gitolite-admin.git/ creating testing... Initialized empty Git repository in /home/gitolite/repositories/testing.git/ [master (root-commit) 7e358c3] start 2 files changed, 6 insertions(+) create mode 100644 conf/gitolite.conf create mode 100644 keydir/paulbooker.pub

4. Add the Gitolite user to your SSH configuration file.

nano /etc/ssh/sshd_config PermitRootLogin yes #without-password PasswordAuthentication no AllowUsers root gitolite #no commas service ssh reload # /etc/init.d/ssh reload .. Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service ssh reload

On your local machine.

nano ~/.ssh/config Host Git user git hostname 92.243.12.252 port 22 identityfile ~/.ssh/git Host * user paul hostname * port 22 identityfile ~/.ssh/paulbooker

1. Clone your gitolite repository

$ git clone gitolite@92.243.12.252:gitolite-admin

Cloning into 'gitolite-admin'... remote: Counting objects: 6, done. remote: Compressing objects: 100% (4/4), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done.

2. Add a test repository

cd gitolite-admin vi conf/gitolite.conf git commit -a -m "Add a test repository" [master ee674e9] Add a test repository 1 file changed, 3 insertions(+) git push Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4), 399 bytes, done. Total 4 (delta 0), reused 0 (delta 0) remote: creating test... remote: Initialized empty Git repository in /home/gitolite/repositories/test.git/

To gitolite@92.243.12.252:gitolite-admin
7e358c3..ee674e9 master -> master

3. Clone the test repository.

git clone gitolite@92.243.12.252:test Cloning into 'test'... warning: You appear to have cloned an empty repository. cd test echo "test" > README git add . git commit -m "Initial commit" [master (root-commit) 21e352e] Initial commit 1 file changed, 1 insertion(+) create mode 100644 README git push origin master Counting objects: 3, done. Writing objects: 100% (3/3), 224 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To gitolite@92.243.12.252:test * [new branch] master -> master

4. Add committer to the repository.

Add public key to the gitolite-admin key directory and edit the gitolite configuration file gitolite.conf

repo gitolite-admin RW+ = git repo testing RW+ = @all repo repo1 RW+ = git = paulbooker paul$ git add -A Paul-Bookers-Mac-mini:Git paul$ git commit -m "Updated configuration" [master 511d9af] Updated configuration 2 files changed, 5 insertions(+) create mode 100644 keydir/paulbooker.pub Paul-Bookers-Mac-mini:Git paul$ git push Counting objects: 10, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (6/6), 1012 bytes, done. Total 6 (delta 0), reused 0 (delta 0) remote: creating repo1... remote: Initialized empty Git repository in /home/git/repositories/repo1.git/ To git@92.243.12.252:gitolite-admin 05c16f3..511d9af master -> master 5. Commit and push changes to the server. git commit -m "Initial commit to repo1" git remote add origin git@92.243.12.252:repo1.git git push origin master Tags:
Catégories: Elsewhere

Last Call Media: Baltimore Drupal Camp

mer, 12/11/2014 - 17:22
Catégories: Elsewhere

Blink Reaction: Create a Simple Next/Previous Navigation in Drupal 8

mer, 12/11/2014 - 15:46

In my last post we went over the new Drupal 8 plugin system as it concerns blocks. Today, we're going to take this idea a bit further and create a simple next/previous navigation.

First thing's first, you're going to want to create another new file at modules/YOURMODULE/src/Plugin/Block/YOURBLOCKNAME.php

In my case, this file looks like this:

Catégories: Elsewhere

Code Karate: Git Cheat Sheet

mer, 12/11/2014 - 15:23

There is a saying that "All good things come to those who wait".

Catégories: Elsewhere

InternetDevels: Drupal tourists are Drupal Touring!

mer, 12/11/2014 - 14:49

Ukrainian Drupal community with an active support of InternetDevels team has actually invented completely unique kind of Drupal event, which makes the whole community go wow! So, ladies and gentlemen, we proudly present you Drupal Tour! The main point of the event is in it’s dynamics and velocity — we’re not going to stop just on one location, but would travel all around the country to involve even larger amount of audience, interested in Drupal development.

Read more
Catégories: Elsewhere

Modules Unraveled: 126 What Varnish Can and Can't Do for Your Drupal Site with Dan Reif - Modules Unraveled Podcast

mer, 12/11/2014 - 07:00
Published: Wed, 11/12/14Download this episodePerformance Optimization
  • Before we dive deep into Varnish, I’d like to get a feel for the various performance improvements anyone can make to speed up their Drupal. What’s the process you think through when optimizing a site?
    • DB Tuning
    • Boost
    • Memcache
    • Redis
    • APC
    • Varnish
    • Module Choices!
Varnish
  • What exactly is Varnish?
  • When researching Drupal performance optimization, I came across a lot of references to APC and Varnish. What is the difference?
  • Is this for anonymous or authenticated traffic?
  • Is the Varnish module required to utilize Varnish with Drupal?
  • What are the steps needed to install and utilize Varnish? (Broad terms, not actual terminal commands)
  • Does SSL affect Varnish?
  • What doesn’t Varnish do? (What needs to be done by Drupal, or other software instead?)
  • How does Varnish affect a dev/staging/live workflow? Does Varnish need to be instlaled on the local machine?
Episode Links: Dan on drupal.orgDan on TwitterDan on GitHubDan on ServerFaultVarnish moduleVarnish info on Drupal.orgXHProfXHProf Drupal moduleTags: PerformanceOptimizationplanet-drupal
Catégories: Elsewhere

Ben's SEO Blog: Must-Attend Drupal Events of 2015

mar, 11/11/2014 - 20:34

Earlier this year, I posted a blog about Must-Attend Drupal Events of 2014; it was fairly well received so I figured I'd work on a similar list for the 2015 Drupal events.

It appears that BuildAModule keeps their list updated, as does Drupical's map. Instead of categorizing by Drupal Camps or Drupal Cons, this list will simply be in chronological order. I will be updating this blog over the next couple of months as more details are released. Also, don't forget to post in the comments if I missed one; I won't hesitate to add it.

  • DrupalCamp Brighton - Brighton, UK - Jan. 16-18
  • DrupalCamp NJ - Princeton, NJ - Jan. 31
    • The 4th Annual Gathering of Drupalists in the Garden State!
    • @DrupalcampNJ
  • DrupalCon Latin America - Bogotá, Colombia - Feb. 10-12
    • "DrupalCon Latin America is our first DrupalCon in an emerging Drupal community, and we couldn’t be more excited to be hosted by the wonderful people of Bogota, Colombia."
    • Will be held at the RoyalPark Metrotel Convention Center Hotel
    • DrupalCon Latin America is the third DrupalCon in 2015
    • @DrupalconLatino
  • Drupal Camp Utah - Salt Lake City, UT - Feb. 27
    • 5th Annual Drupal Camp Utah
  • DrupalSouth Melbourne - South Wharf, VIC, Australia - Mar. 5-7
  • MidCamp (Midwest Area) - Chicago, IL - Mar. 19-22
  • NYC Camp - New York, NY - Mar. 23-29
    • other site
    • NYC (Nice) Camp is a free, week-long Drupal conference in New York City. We invite you to come learn from some of the brightest minds in Open Source, and expand your horizons. There will be numerous opportunities to contribute back to the community, so jump in!
    • @NYCCampDrupal
  • DrupalCon LA - Los Angeles, CA - May 11-15
    • Host city of the DrupalCon North America conference in 2015.
    • Some of the world's best and biggest museums, universities and entertainment giants are in Los Angeles and they use Drupal. A Drupal powerhouse, Los Angeles is one of the most active areas for Drupal in the world. The Drupal community in and around Los Angeles organizes hundreds of Drupal events each year, including GLADCamp, Drupal Design Camp LA and DrupalCamp LA.
    • While you're enjoying DrupalCon, your family can enjoy Disneyland, bike rides at the beach, and culture and science at the Getty, Museum of Modern Art and the California Science Center. The Downtown area has a thriving nightlife, walkable streets and contrary to popular belief, is the heart of the LA Metro and can be enjoyed car-free.
    • @DrupalConLA
    • @GLADrupal
    • @DrupalConNA
  • DrupalCamp Spain - Jerez, Spain - May 22-24
  • DrupalCon Barcelona - Barcelona, Spain - Sept. 21-25
    • From the colorful tiles of Park Güell to the sparkling Mediterranean, Barcelona is a vibrant city where modernity joins timeless tradition. Experience the culture, festivals, sunny weather and world-class dining with friendly locals, all while celebrating the world’s best open source project.
    • @DrupalConEUR
  • DrupalCamp Bristol - Bristol, UK - date: TBA
drupal, Planet Drupal
Catégories: Elsewhere

Paul Booker: How to give your Drupal site a Canonical URL

mar, 11/11/2014 - 10:35

You will need to modify your .htaccess file located under your web root.

Change ..

# To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # uncomment the following: # RewriteCond %{HTTP_HOST} . # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

to ..

# To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # uncomment the following: RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Tags:
Catégories: Elsewhere

Promet Source: <a href="/blog/developing-promet-way-part-i">Developing the Promet Way: Part I</a>

lun, 10/11/2014 - 23:42

How often do pushes turn into nail biting, hair pulling, obscenity screaming, hours-long events? How often does one hear, “It works on my machine!” How fast can you push all the work (bug fixes, new features, etc.)  to production? Theoretically, only in the time necessary to deploy the code.

Catégories: Elsewhere

Creative Juices: Programmatically Creating a Block in Drupal 8

lun, 10/11/2014 - 22:21
Programmatically Creating a Block in Drupal 8 Mon, 11/10/2014 - 16:21 matt
Catégories: Elsewhere

cs_shadow: GSoC Reunion Summit 2014 from my point of view

lun, 10/11/2014 - 20:44

I was very lucky to be provided with wonderful opportunity of attending GSoC 2014 Reunion Summit as a Drupal delegate. The event was celebration of ten-year anniversary of Google Summer of Code program. It was an amazing event and also my first trip to the states. I had very high expectations from this event and was very excited to attend it, and I was not appointed after I did. I totally enjoyed my time there and will try to describe my experiences in more detail below. I'll stick to a chronological in order to describe my experiences since that makes it easier for me to recollect all the things that were going on.

23rd October The long flight to San Francisco

My journey to the states started when I boarded flight to London from Hyderabad airport on the morning of 23rd (according to local time). It was a long 10 hour journey but I was accompanied by two of my friends who were also coming for the Reunion summit. From London, we had another 10 hour flight to San Francisco. While waiting at the London airport, we saw a couple of guys walking around in GSoC t-shirts. Without missing a chance to socialize, we asked them if they were also going to attend the Reunion and obviously the answer was yes. Slowly, we realized that the entire boarding area was flocked with nerds from all around the world. We boarded the flight after few introductions and it was a pleasant journey thereafter.

San Jose Marriott, webchick and more socializing

The plane landed at the SFO airport late in the evening and we checked in at the Marriott an hour later. I was a bit of late to check in and apparently they ran out of normal rooms at that point of time so they upgraded me to a Deluxe room at no extra cost which was pretty cool. At this point, I was pretty tired to do anything else apart from crashing on the bed but strong desire to see Angie Byron (webchick) ASAP kept me awake. Finally I met Angie who was in a 'Big Blue Drupal' t-shirt. It was really great to finally see her in person. It was interesting to meet another fellow Drupaler Dhruv Baldawa(dhruvbaldawa) there.

There was also a dinner planned that night, but by the time I got there only dessert counters were still open. But who cares whether or not other counters are open anyway when desserts are still being served. After that it was time for some more socializing. Meeting folks from various different projects such as Libre Office, Sahana, OSGeo, PHPMyAdmin among others was also very interesting. Our topics of discussion ranged from organizational structure of large organizations to heavy metal music so it was quite a bit of fun. After some time, I slowly disappeared from the Grand Ballroom of Marriott and went to sleep.

24th October Trip to Great America


Just after the breakfast, we boarded shuttles to the Great America amusement park. While in other amusement parks, the problem is the long queue for the rides, the major problem there was to identify whether or not a ride was open that day. This was because of the fact that the park was closed for common public that day. Yes, you heard me right - Google had booked the entire park that for the Reunion attendees which was pretty awesome. That also meant free access to the Arcade and we all got a chance to show off their skills on the Pacman and other games. After having a satisfying lunch, we headed back to the hotel.

Dressy Dinner Reception

After a downtime of a few hours, it was time for the Dinner Reception. The schedule said that we had to be in dressy outfits and of course everyone had a different interpretation of what dressy meant. For some, it meant not wearing shorts and beach t-shirts and for some, it meant wearing their Halloween costumes. The reception was held at the Tech Museum which had a bunch of geeky exhibits including an 'Earthquake Room'.

Google had organized few sessions and the speakers included Chris DiBona, Alfred Spector, Peter Norvig, Dirk Hohndel and drumroll Linus Torvalds. Since, the speakers were not announced beforehand, it was a big surprise to see Linus there. Everyone practically stood in line to get a picture with him. Though I didn't managed to get a selfie with him, it was still awesome to see him.

25th October

Followed by an opening session by Carol, it was time for the un-conference sessions. Un-conferences were the part I was most looking forward to for this summit.

Our session

Me and Angie had also proposed a session titled: 'Making your project more approachable to new contributors: Discuss strategies regarding how to help new contributors get started with your open source project' (which by the way was the most voted session on the Moderator forum for sessions). We tried to make our session more like a discussion instead of we just walking though some slides. To get the discussion started, we talked about some of the strategies we use at Drupal to help new contributors. And then, we asked others to discuss any problems or ideas they come across working on their open source projects. Since I was a recent newcomer to Drupal and Angie was an experienced Drupalista, we could present the both sides, i.e mentor and metee. It was a pretty interesting discussion overall and I got to know about various new techniques.
Slides/Notes from our session: https://docs.google.com/presentation/d/1QAhm2f3x7ub-Cz61Hdu79Fs3DjNpro1KpDpQsyncBRI

Plone and Drupal get together

Just after our session, someone asked me "Are you cs_shadow" and I was like ".....Yes!?". Then I came to know that he was David Bain (@pigeonflight), a rockstar Plone developer. He was a friend of Varun Baker (@varunity) who had specially asked him to get a pic with me and Angie. That was a very sweet gesture on his part and here's that pic with all of us smiling:

After our session, I went attended some other sessions such as best practices for open source documentation, codejam session and feedback session for Melange and GSoC.

GSoC 10 year t-shirt wall

The OSPO team had put up t-shirts from all the 10 years of GSoC on display which was pretty cool. We all were discussing in front of it that who has how many of those. I pointed out that I had that one, Angie said she has 'that, that and that one'. Then someone came and said that he had 8 of those and we all went Wow. Here's a pic of the wall:

26th October

That morning, we went to visit the Googleplex and had a semi-guided tour of the campus including the Android lawn statues. When we came back to the hotel, there were a few more sessions. But the the most interesting session was the 'Lightning Talks' where basically people had to showcase an awesome project in just a few minutes.

After the lunch, it was time for the closing session by Carol, which was followed by a much deserved standing ovation to the entire OSPO team, including Carol, Stephanie, Cat and others. After the session, they gave all of us a Google Cardboard which was very cool.

Quickly after that, we had to catch our shuttles, so I said goodbye to Angie, who had to catch a plane. And since I planned to stay around for a few more days, I went off to my hotel in San Francisco.

27th October onward

The Summit was officially over but I had planned to stay around for a little more so that morning I went to visit the Golden Gate Bridge area. I got a chance to meet Matthew Lechlieder (@Slurpee) and it was pretty nice to finally meet him person after those long IRC chats. Here's a pic of me and Slurpee at the Fishermen's Wharf:

To sum it all up, it was an awesome trip to the States and a big thanks to everyone who provided me this wonderful opportunity.

Tags: Google Summer of CodeDrupal PlanetReunion Summitgsoc
Catégories: Elsewhere

Stauffer: Measuring Success in Web Projects

lun, 10/11/2014 - 20:17

A Ship Without a Rudder

When I was a younger developer, I struggled often with the idea that I wasn't doing meaningful work. Yes, I was building good websites. Yes, they meant something to somebody (at least to the client). But is that brochureware site really going to make the world a better place? Does this university sub-department really need its own website? (I don't think I looked at a single individual department site when I was in school.) When you work on a project that doesn't have a clear and obvious goal, it's easy to fall into this line of thinking. And that line of thinking is very demotivating to a developer - you start to feel like you're spending your days doing busywork. And that's not even touching the fact that web projects are expensive. That university sub-department is probably spending tens of thousands of dollars to make a site that the students may never visit.

The solution is to figure out and clearly define the goals of a site at the outset of the project. The main purpose of that university department site is to serve information. Potential students can learn about the department, and current staff and students keep up to date on what's going on. There are secondary purposes too, like directing potential students to the main school website, getting them to submit a contact form, or getting people to sign up for a newsletter. Just knowing that much gives you something to work towards. If your work doesn't contribute to one of those goals, then things are getting off track.

Getting on Track

Once the list of goals for a site is known, it should be communicated to the whole team. The client knows why they need a website, but the development team may not. Keeping your developers informed of a project’s goals will keep them motivated and on track.

Some projects have obvious goals. An e-commerce site, whose sole purpose is to to sell products, is probably the easiest example. This type of project is deemed a success when the profit from the store surpasses the cost of development. Sites that market an upcoming product may have obvious goals too, even if their value is more difficult to calculate. In the case of a promo site for an upcoming service, the business may plan to collect as many email addresses as possible,assigning an estimated value to each address collected. Then there are sites like libraries and club forums, which don't make any money, but have value in other ways, i.e. providing information and fostering community interaction. In those cases, the value is in making it as easy as possible for visitors to find what they are looking for. If visitors to the library site are getting lost on the way to finding content, the project is in trouble.

In any case, it's important for a project to define success for when the project goes live.

The next step, after knowing the goals, is to refine them into specific user actions like viewing a specific page or clicking a specific button. These "goalpost" actions are defined as something that users can do so we know when they have reached one of the site's goals. This makes each goal both specific and measurable. If the goal is newsletter signups, the goalpost might be "user submits the newsletter form and reaches the signup thank you page." Now every time a visitor reaches the signup thank you page, we can mark a tally because the goal is specific. Looking at the percentage of visitors reaching each goal gives us what's called a conversion rate. The higher the conversion rates, the better your website is doing what it was made to do.

Learning to Measure Progress

Setting up goalposts is what separates directionless projects from meaningful ones. Whether you, as a developer, fully stand behind the product or not, you're helping someone bring their idea into reality. And more importantly, by measuring the value of your contribution, clients can see the return on their investment.

Websites actually have it relatively easy when it comes to tracking goals like this. The most common bit of tracking info in web is just the path a user is on. If a user ends up on a path ending in /checkout/complete, chances are they just finished placing an e-commerce order. Your analytics package will note that /checkout/complete got a pageview, and now you have a tally that one more visitor completed a purchase. Of course, you can also log in to your commerce site to see how many orders are placed, but analytics dashboards are extra convenient and give you endless options for number crunching and filtering data.

For more complicated goals, any decent analytics package will let you submit custom data and track events manually. For example, if you're only tracking checkouts with /checkout/complete, you don't know how much money each individual order was worth. Using this simple method, someone buying a $10 t-shirt looks exactly the same as a person buying a $20,000 giraffe. (Why you have that in your store is beyond the scope of this article.) Custom analytics events let you pass the real value of the order, which might make a big difference depending on what you're measuring. Maybe people entering your site on the homepage mostly buy t-shirts, and people who click through from your Giraffe for Sale banner ad mostly buy giraffes. These distinctions are important for tracking the success of ad runs.

So you know your goals, you've decided on goalposts, and you’ve configured them in an analytics package. Unfortunately, users still aren't reaching the end point. What do you do now? Goal funnels can help identify pain points for your users. A funnel is a list of steps that a user takes on the way to a goalpost (marked by specific and measurable mini-goalposts, of course). Using commerce as an example, step 1 is viewing a product, step 2 is adding to cart, step 3 is starting checkout, step 4 is billing and shipping info, and step 5 is the goal - a finished checkout. Each step has a page or action associated, so we can track how far into the process users get. By watching the percentage of users hitting each step, you can see what step is scaring users off. A huge dropoff on step X tells you that something about that page is bad, wrong, or just plain broken. Revisit that step, develop a more user-friendly way to do it, and then after you push it live, measure the new conversion rate. Since you already have a funnel in place, you don't have to guess whether new development is actually better or not. You'll have percentages to back it up. (Prettier isn't always better. Sometimes users prefer unexpected things - Craigslist has barely updated its style in the last 20 years, and yet it remains popular.)

Wrapping Up

To recap, by defining and tracking the goals of a website developers stay motivated, clients focus on real sets of goals, and managers can look at the numbers and see real return on investment. So at the outset of any web project, lay out the goals. Once a general list of goals is known, refine them into specific user actions that can be tracked and measured. Analytics software can tell you the value of the completed development. If users just aren't hitting your goals, use funnels to look for pain points to improve on. All of this together will give your projects a more defined purpose with less guessing and more transparency.

Tags: Drupal , Planet Drupal , Success , Goals , Analytics
Catégories: Elsewhere

Chapter Three: Ruby, RVM, Gemsets and Bundler/Gemfiles

lun, 10/11/2014 - 18:00

As a Drupal themer, we're often tasked with building multiple sites concurrently. One site may be a new build from scratch, and another could be a site built two years ago that is getting a new feature. If they utilize Sass in the theme, then they both have one thing in common:



They have Ruby gem dependencies.



What are they chances that both sites use the same versions of the same gems? Slim? None? Ever tried to build a set of Sass files when you don't have the correct gem versions installed? Oh what a pain.



Let's take the pain away with a few simple techniques.



Ruby and RVM

OS X comes with Ruby built-in, but I highly recommend installing Ruby with RVM. With RVM, you can specify the version of Ruby you want installed, plus a whole lot more. Installation instructions are available, but are outside the scope of this blog post.

Catégories: Elsewhere

Phase2: AngularJS Meet Open Atrium

lun, 10/11/2014 - 16:52

The recent 2.23 version of Open Atrium contains a cool new interactive site builder and navigator application (see it in action). This application was written using the AngularJS framework.  The combination of Drupal, jQuery, and AngularJS proved to be powerful, but wasn’t without some pitfalls.

Using AngularJS in Drupal

The basics of using Angular within Drupal is pretty straight-forward.  Simply reference the external AngularJS scripts using the drupal_add_js() function, then add your custom javascript app code, then use a tpl template to generate the markup including the normal Angular tags.  For example, here is the Drupal module code, javascript and template for a simple Angular app:

// Implements hook_menu() function myapp_menu() { $items['myapp'] = array( 'page callback' => 'myapp_menu_callback', 'access callback' => TRUE, ); return $items; } // The menu callback to display the page function myapp_menu_callback() { drupal_add_js('https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js'); $base = drupal_get_path('module', 'myapp'); // data you want to pass to the app drupal_add_js(array( 'myapp' => array( 'title' => t('Hello World'), ), ), 'setting'); drupal_add_js($base . '/myapp.js'); drupal_add_css($base . '/myapp.css'); return theme('myapp', array()); } // Implements hook_theme(). function myapp_theme() { return array( 'myapp' => array( 'template' => 'myapp', ), ); }

(function ($) { var app = angular.module("myApp", []); app.controller("myAppController", function($scope) { $scope.settings = Drupal.settings.myapp; $scope.count = 1; $scope.updateCount = function(value) { $scope.count = $scope.count + value; } $scope.myClass = function() { return "myclass-" + $scope.count; } }) }(jQuery));

<div class="myapp" ng-app="myApp" ng-controller="myAppController"> <h3 ng-class="myClass()">{{settings.title}}</h3> <p> <a class="btn btn-default" ng-click="updateCount(1)">Click</a> to increment {{count}} </p> </div>

Now, obviously we aren’t using the full Angular framework here.  We aren’t using any directives, nor are we really using Angular as a MVC framework.  But it gives you the idea of how easy it is to get started playing with basic Angular functionality.

Angular plus jQuery

Developing javascript applications in Angular requires a different mindset from normal Drupal and jQuery development.  In jQuery you are often manipulating the DOM directly, whereas Angular is a full framework that allows data to be bound and manipulated on page elements.  Trying to combine both is often a source of frustration unless you understand more about how Angular works behind the scenes. Specifically, Angular has it’s own execution loop causing a mix of Angular and jQuery code to not seem to execute in a straightforward order.  For example, in the above code, we set the class of the H3 based on the current “count” variable.  What if we modified the updateCount function to try and set a css property for this class:

$scope.updateCount = function(value) { $scope.count = $scope.count + value; $('.' + $scope.myClass()).css('color', 'red'); }

If you click the button you’ll notice that the css color does NOT change to red! The problem is that Angular is executing the query function call BEFORE it actually updates the page.  You need to delay the jQuery so it executes after the current Angular event loop is finished.  If you change the code to:

$scope.updateCount = function(value) { $scope.count = $scope.count + value; setTimeout( function() { $('.' + $scope.myClass()).css('color', 'red'); }, 1); }

then it will work.  The timeout value can be anything greater than zero.  It just needs to be something to take the jQuery execution outside the Angular loop. Now, that was a horrid example!  You would never actually manipulate the css and class properties like this in a real application.  But it was a simple way to demonstrate some of the possible pitfalls waiting to trap you when mixing jQuery with Angular.

Drupal Behaviors

When doing javascript the “Drupal way”, you typically create a behavior “attach” handler.  Drupal executes all of the behaviors when the page is updated, passing the context of what part of the page has changed.  For example, in an Ajax update, the DOM that was updated by Ajax is passed as the context to all attached behavior functions. Angular doesn’t know anything about these behaviors.  When Angular updates something on the page, the behaviors are never called.  If you need something updated from a Drupal behavior, you need to call Drupal.attachBehaviors() directly.

Angular with CTools modals

In the Open Atrium site map, we have buttons for adding a New Space or New Section.  These are links to the Open Atrium Wizard module which wraps the normal Drupal node/add form into a CTools modal popup and groups the fields into “steps” that can be shown within vertical tabs.  This is used to provide a simpler content creation wizard for new users who don’t need to see the full node/all form, and yet still allows all modules that hook into this form via form_alters to work as expected. The tricky part of this is that as you navigate through the sitemap, Angular is updating the URLs of these “New” links.  But CTools creates a Drupal Ajax object for each link with the “ctools-use-modal” class in it’s Drupal behavior javascript.  This causes the URL of the first link to be cached.  When Angular updates the page and changes the link URLs, this Ajax object cache is not updated. To solve this within the Open Atrium Sitemap app, an event is called when the page is updated, and we update the cached Ajax object directly via the Drupal.ajax array. This was a rather kludgy way to handle it.  Ultimately it would be better to create a true Angular “Directive” that encapsulates the CTools modal requirements in a way that is more reusable.

Summary

Angular can be a very useful framework for building highly interactive front-ends.  Using Drupal as the backend is relatively straight-forward.  Angular allowed us to create a very cool and intuitive interface for navigating and creating content quickly within Open Atrium far easier than it would have been in jQuery alone.  In fact, we began the interactive site map tool in jQuery and the code quickly became unmanageable.  Adding functionality such as drag/drop for rearranging your spaces and sections would have been a mess in jQuery.  In Angular it was very straight-forward. Once you understand how Angular works, you’ll be able to blend the best of Drupal + jQuery + Angular into very rich interfaces.  Programming in Angular is very different.  Learn more about Angular on the Phase2 blog!

Catégories: Elsewhere

Drupal.org Featured Case Studies: Doctors of BC

lun, 10/11/2014 - 16:11
Completed Drupal site or project URL: http://doctorsofbc.ca

Doctors of BC was founded in 1900 as the British Columbia Medical Association, and has a long history of working for members, improving patient care, and influencing health care policy. As part of a rebranding process started in late 2012, Doctors of BC (formerly the British Columbia Medical Association), engaged Fuse to build a new Drupal based website in spring of 2014. The Doctors of BC had been running on Drupal 6 for years and the site served successfully as a key communications and transactional resource for Doctors of BC staff & members. However, with a new brand, a desire to better support mobile users and a need to replace an aging codebase it was time for a rebuild.

This was no ordinary corporate website project. The new Drupal 7 system was replacing not only an aging Drupal 6 site, but a legacy custom eCommerce system with sophisticated business logic, a complex permissions matrix and a host of integration points with internal systems. Oh... and it all needed to be responsive.

We worked alongside Cossette Communications on the project (UX & Design) and were given a tight four month timeframe to build out the project.

Key modules/theme/distribution used: CommercePanelsPanelizerMediaFeaturesFeedsMenu MinipanelsCKEditor - WYSIWYG HTML editorBeanBreakpointsPictureManual CropMenu Node ViewsMigrateDrupal-to-Drupal data migrationFlagFlag PageOmega
Catégories: Elsewhere

Pages