Software

Drupal Easy: Drupal Career Online: Pros and Cons of Acquia Dev Desktop Version 2

Drupal Planet - Tue, 2014-09-16 17:08

Pros and Cons

Since we started our long-form Drupal Career Starter Program in 2011, we've always struggled a bit trying to find a single local Apache-MySql-PHP stack that is powerful enough for day-to-day Drupal development, easy to set up, and that works for a wide range of people new to local web development.

We're always on the lookout for a local Drupal development stack that will help to reinforce the lessons and best practices that we strive to instill in all of our students. It's pointless to teach students methods and processes that aren't typically found in the community, so being able to bring students up-to-speed as quickly as possible with things like Drush, Git, and commonly-used workflows is of the utmost importance.

Generally, we've stuck with a combination of Acquia Dev Desktop (version 1), Uniform Server, and DrupalPro, depending on each student's skill level and previous experience.

Until recently, we've always had more Windows users than Mac or Linux users (combined!), and usually didn't run into any problems until we introduced Drush, Git, and other Linux-y command line tools, at which point Mac and Linux users spent a lot of time attempting to help Windows users get Drush installed.

When Acquia Dev Desktop 2 was made available, the list of features definitely piqued our interest. Integration with Acquia Cloud is nice (similar to what Kalabox does for Pantheon), but what we were really excited about was the Drush integration.

Since we are using Acquia Dev Desktop 2 for the first time with our 2014 Fall Drupal Career Online program, we thought it would make sense to run through the pros and cons from a training perspective.

-->

read more

Categories: Software

Drupalize.Me: Drupal 8 Beta is So Close

Drupal Planet - Tue, 2014-09-16 15:10
Recently, the biggest piece of news in the Drupal 8 world is that we are finally down to just one beta-blocker. This is really great, but what does it mean exactly? Well, in the big picture it means that we are very close to releasing a beta version of Drupal 8 for everyone to start playing with, and this is a major step towards getting the final release out the door.   What is a Beta?
Categories: Software

CTI Digital: First-timers guide to DrupalCon

Drupal Planet - Tue, 2014-09-16 12:09
DrupalCon Austin 2014 Ticket bought, flights and accommodation booked, like hundreds of others you’re DrupalCon bound for the very first time! No doubt you are very excited, perhaps a little nervous, not quite sure what to expect? Panic not, by the time you’ve read this blog you’ll be all set to make the most of the experience.   Rest assured, approaching half of attendees are first timers, just like you. Everyone was a newbie once. Drupalists are a friendly bunch, so once you get going it’ll be a breeze.    So here goes ….   Plan now!   Don’t spend valuable time during DrupalCon picking what session to watch next. Do yourself a favour, plan your schedule ahead not when you arrive  but be flexible in case something good comes up you might have overlooked! https://amsterdam2014.drupal.org/schedule.     “be flexible, you never know what opportunities you'll get during the conference, sometimes you might have to break your schedule to accommodate.” James Davidson @davidsonj   Who’s coming?   Browse the attendee list [https://amsterdam2014.drupal.org/attendees] ahead of time, there are bound to be some familiar faces you have spoken to on IRC, Drupal.org or social media.    Beyond this there will be other Drupalists sharing your interests, reach out to them and start a conversation ahead of time to help crystallize new friendships during the conference.   Not everyone is able to stay the whole time so be sure to ask those who you are most keen to see. Hatch a plan beforehand, most people’s calendars fill up fast.   Business cards   Even if you aren’t on the business side of Drupal, you will speak to a LOT of people at DrupalCon. Do get some business cards printed. This will save time and ensure you remain in touch with people beyond the conference. Moo.com [www.moo.com] are cost effective or use Lullabot’s wicked new digital card app “Shoot” [ https://www.lullabot.com/blog/article/lullabots-latest-mobile-app-shoot]   What (not) to pack   Be clear - there is no dress code. DrupalCon is inclusive, anything goes. Bring comfortable shoes, you will walk miles during the conference. To be honest, I always pack light and wear less than I think. Don’t forget smartphone and laptop chargers!   An international power adapter and power strip is an essential accessory. Keep those gadgets juiced up.    “Carrying a power strip around with you is often a good way to make friends at conferences.”  Larry Garfield @Crell   I find a notepad invaluable although you can be sure to stock up on these in the Exhibitor Hall.   Make sure you pack enough to survive in your carry on baggage just in case your hold bag goes missing. Even better, just go carry on.   Mobile data   Be sure to check with your mobile phone supplier any costs associated with data usage before you arrive. There will be ample free wifi at the conference centre so maybe you can manage without.   Money   Are you sure your credit card is accepted in The Netherlands? Be sure to inform your card company that you are traveling and to expect overseas transactions charges. Arrange euros ahead of time.   Twitter is your friend   Not only will major announcements be made on @DrupalConEur, there will be a stream of helpful advice and a certain amount of cat herding so be sure to follow.   A lot of attendees use Twitter to make plans during the conference so be sure to track the official #DrupalCon hashtag. Use the hashtag yourself to make plans, form new connections and share photos.    Help   The volunteers at the Help Desk where you register are available throughout the duration of the conference to assist with any enquiry or help you may require.   Before DrupalCon if you need to contact the conference organisers, the best method is the site contact form [https://amsterdam2014.drupal.org/contact-us]   “volunteer, be front desk, on the rooms, whatever, there is not a better way to meet new people if you don't already” Pedro Cambra @pcambra   Arriving   A lot of people save money travelling from the airport by sharing transport. This can be planned ahead of time using social media or more spontaneous or bumping into people wearing Drupal t-shirts. Remember there are thousands of us arriving in a short space of time, you are bound not to be alone.   Registration   Avoid the queues at registration by visiting before Tuesday morning. The registration desk is open during Sunday and all day Monday.   Say hello!   This is your chance to meet people for real. Don’t spend your whole time head down in a screen. Conversations are all around you, go start one. Don’t be daunted because the person across the hallway is a ‘rockstar Drupaler’. We all like talking about what we love.   “do not session cram your day as it will make your head spin, say hi to people (we are not scary) :)” Emma Karayiannis @emma_maria88   “don't be surprised if everyone seems to know everyone; at my first #DrupalCon I thought: established social group; but half were newbies!” J-P Stacey @jpstacey   SWAG!   Sponsors compete with one another to see who can create the coolest Drupal related giveaways. The best goodies go fast so be sure to attend the exhibit hall at the earliest opportunity.    Pro-tip: The Exhibit Hall opens Monday 17:00-18:30. There is a party like atmosphere, it’s a really nice way to ease into the DrupalCon flow. This is also when the smart people get their SWAG.    Don’t be shy, the sponsors really want you to take their swag home. Also, be sure to leave spare space on your journey out for SWAG coming home. Be sure of the baggage allowance of your airline!   Bookstore   Then there’s the Drupal Association’s confusingly have a “Bookstore” which actually sells way more than books. They have some awesome Drupal memorabilia, proceeds of which go to fund the Drupal project.     Exhibit Hall [https://amsterdam2014.drupal.org/exhibit-hall]   Social calendar   Amsterdam in particular has some noteworthy social events scheduled by the local community and attendees alike. Dinners, cultural evening, women in Drupal, pub crawls, the arrival of Tour de Drupal are amongst some of the events currently available.    [https://amsterdam2014.drupal.org/event/women-drupal-meetup]   Monday   Many people arrive ahead of the main conference. This can be an excellent time to arrange meetings with people before things get too hectic.    The community summit [https://amsterdam2014.drupal.org/community-summit] or business day [https://amsterdam2014.drupal.org/business-summit] are a really great ways to forge new connections and share knowledge at the same time.    Tuesday   DriesNote The Dries’s Keynote is always a full house. In fact I strongly advise get your seat early or possibly miss out! A pro-tip is attend Rob & Jam’s pre-keynote, you’d be mad not to anyway [https://amsterdam2014.drupal.org/prenote] , and bag yourself a prime location for the DriesNote early (they always share the same location).    Say cheese! A huge tradition at DrupalCon is the group photo. Be sure to be among the sea of Drupalists immediately after the DriesNote. We hear an octocopter will make an entrance in Amsterdam to help capture the epic numbers we now have. See how we did it in Prague last year [https://www.youtube.com/watch?v=8tHvys7xTRM]   Thursday   Trivia Night A quiz night about Drupal. Unmissable, I am not kidding you. For many it’s the highlight of the social calendar. There are bonus points for teams with DrupalCon first timers so you will be most welcome! What better way to meet new people, and there are amazing prizes to be had.   Friday   Sprints! There are opportunities for everyone to contribute to sprints no matter if you’ve never attended a (code) sprint before. Special First-Time Sprinter Workshops [https://amsterdam2014.drupal.org/first-time-sprinter-workshop] exist to guide those of you who are new to sprinting. “Everyone can get involved in many aspects, including documentation, UX, design, testing, and development.”   Taking part in these mass participation sprints is invigorating and should certainly be on your schedule.   There’s more besides sessions at DrupalCon...   With so many great sessions to choose from there are bound to be clashes. Don’t panic, the amazing team at DrupalCon reliably have all sessions published same day to Youtube [https://www.youtube.com/user/DrupalAssociation].   Aware of these recordings you should consider what else there’s available to do ….   Hallway track   For many a highlight of the conference is those chance meetings in the hallway. Do take the opportunity to stop and spend time talking with people in the hallway.    BoFs?   Affectionately know as “BoFs” - Birds of a feather conversations offer a rare opportunity to meet and discuss a theme with Drupalists sharing a common interest. As a first time DrupalCon attendee I can’t stress how valuable BoFs are. There’s no need to register, just turn up or even arrange your own! [https://amsterdam2014.drupal.org/bofs]. Many presenters will arrange companion BoFs for their sessions, this is a great time to deep dive into a subject.   “the BoF is where the conversations happen, sessions are recorded but these aren't, many goodies happen there” Pedro Cambra @pcambra   Sprints   From 27th September all the way through to 4th October there are ample opportunities to get involved in sprints. In particular the mass Friday sprints are open to all with mentors to help you make your first core contribution. Go for it! https://amsterdam2014.drupal.org/sprints   Relax! There will be other DrupalCons   Don’t try and do everything first time round. With so many amazing keynotes, sessions, BoFs and people to meet plus a packed social calendar - there’s no denying there’s a temptation at DrupalCon to burn the candle at both ends. Be careful though, without some proper rest and healthy food you can easily get run down and suffer post conference DrupalFlu.   So pace yourself. Head for bed when others say “just one more”, eat some fruit, drink water and get some sleep. You’ll enjoy DrupalCon and take home just amazing memories.   Further reading   Jeffrey McGuire’s A-Z of DrupalCon https://www.acquia.com/blog/what-is-drupalcon   Doug Vann has further tips on what to bring to DrupalCon [http://dougvann.com/blog/top-ten-things-bring-you-drupalcon-austin]   Image courtesy of Michael Schmid  
Categories: Software

Károly Négyesi: What JS makes this monkey dance?

Drupal Planet - Tue, 2014-09-16 06:27

Today I found myself in a complex codebase and my ticket was: this JS on this old page makes the monkey dance, can you make it dance on the new page? Well, my JS knowledge is... limited but I have a really mean right click. So I right clicked and looked around the source Chrome showed me. There was a div with a class slideshow-node-embed-processed. Now that's important: -processed is added by the jQuery once plugin that Drupal 7 happens to ships with. It's much easier to recognize the handiwork of the plugin than actually use it -- this is true for many similar reverse engineering scenarios. Next step is ag slideshow-node-embed (you have ag installed, don't you?) which comes back with a single JS file called sites/all/themes/foo/js/node-embed.js. Next ag -A2 -B2 node-embed.js -- just searching is pointless but by adding some context to it hopefully we can see some settings or CSS necessary.

Categories: Software

Drupal core announcements: Drupal core security release window on Wednesday, September 17

Drupal Planet - Tue, 2014-09-16 04:20
Start:  2014-09-17 (All day) America/New_York Sprint Organizers:  David_Rothstein

The monthly security release window for Drupal 6 and Drupal 7 core will take place on Wednesday, September 17.

This does not mean that a Drupal core security release will necessarily take place on that date for either the Drupal 6 or Drupal 7 branches, only that you should prepare to look out for one (and be ready to update your Drupal sites in the event that the Drupal security team decides to make a release).

There will be no bug fix release on this date; the next window for a Drupal core bug fix release is Wednesday, October 1.

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Categories: Software

Drupal Toolbox: Using VBO (and Rules) to remove spam users

Drupal Planet - Mon, 2014-09-15 21:10
Using VBO (and Rules) to remove spam users
Categories: Software

Mediacurrent: Top Drupal Marketing Automation Modules

Drupal Planet - Mon, 2014-09-15 18:19
Top Marketing Automation Drupal Modules

A strong lead management process requires B2B marketing professionals to respond to each prospect within the buying process. However, as your business grows, understanding and responding relevantly to a buyer’s interest is almost impossible to do manually. To ensure that your marketing efforts are targeting customers and prospects with the right messages at the right time, integrating a marketing automation platform into your Drupal website is key. 

Categories: Software

Dries Buytaert: Reflections on Drupal in China

Drupal Planet - Mon, 2014-09-15 16:14
Topic: DrupalLocation: China

I just spent the past week in China, and I thought I'd share a few reflections on the state of Drupal in China.

First, let me set the stage. There are 1.35 billion people living in China; that is almost 20 percent of the world's population. Based on current trends, China's economy will overtake the US within the next few years. At that point, the US economy will no longer be the largest economy in the world. China's rapid urbanization is what has led to the country's impressive economic growth over the past couple of decades and it doesn't look like it is going to stop anytime soon. To put that in perspective: China currently produces and uses 60 percent of the world's cement.

In terms of Drupal, the first thing I learned is that "Drupal" sounds like "the pig is running" ("Zhu Pao") in Chinese. Contrary to a pig's rather negative reputation in the West, many Chinese developers find that cute. A pig is a more honorable sign in Chinese astrology and culture. Phew!

In terms of adoption, it feels like the Drupal community in China is about 8 to 10 years behind compared to North America or Europe. That isn't a surprise, as Open Source software is a more recent phenomenon in China than it is in North America or Europe.

Specifically, there are about 5 Drupal companies in Shanghai (population of 21 million people), 3 Drupal companies in Beijing (population of 23 million people) and 5 Drupal companies in Hong Kong (population of 7 million people). The largest Drupal companies in China have about 5 Drupal developers on staff. Four of the 5 Shanghai companies are subsidiaries from European Drupal companies. The exception is Ci&T, which has 40 Drupal developers in China. Ci&T is a global systems integrator with several thousand employees worldwide, so unlike the other companies I met, they are not a pure Drupal play. Another point of reference is that the largest Drupal event in China attracted 200 to 300 attendees.

Drupal meetup tianjin

Given that China has 4 times the population of the US, or 2 times the population of Europe, what are we missing? In talking to different people, it appears the biggest barrier to adoption is language. The problem is that Chinese Drupal documentation is limited; translation efforts exist but are slow. The little documentation that is translated is often outdated and spread out over different websites. Less than 20 percent of the Chinese Drupal developers have an account on Drupal.org, simply because they are not fluent enough in the English language. Most Drupal developers hang out on QQ, an instant messaging tool comparable to Skype or IRC. I saw QQ channels dedicated to Drupal with a couple thousand of Drupal developers.

There is no prominent Chinese content management system; most people appear to be building their websites from scratch. This gap could provide a big opportunity for Drupal. China's urbanization equals growth -- and lots of it. Like the rest of the economy, Drupal and Open Source could be catching up fast, and it might not take long before some of the world's biggest Drupal projects are delivered from China.

Supporting Drupal's global growth is important so I'd love to improve Drupal's translation efforts and make Drupal more inclusive and more diverse. Drupal 8's improved multilingual capabilities should help a lot, but we also have to improve the tools and processes on Drupal.org to help the community maintain multi-lingual documentation. Discussing this with both the Drupal Association and different members of our community, it's clear that we have a lot of good ideas on what we could do but lack both the funding and resources to make it happen faster.

Drupal meetup tianjin

Special thanks to Fan Liu (Delivery Manager @ Ci&T), Jingsheng Wang (CEO @ INsReady Inc.) and Keith Yau. All the Drupal people I met were welcoming, fun and are working hard.

Categories: Software

Acquia: Custom Distributions on Acquia Cloud: Part 1 -- Drush Make

Drupal Planet - Mon, 2014-09-15 15:54

Every developer has a slightly different approach to building their Drupal sites. I’ve tried just about every approach, and they all have their merits, but my favorite is Drush Make. Before joining Acquia, I didn’t realize Acquia Cloud supported Drush Make, but I was delighted to discover that I was wrong. Assuming I’m not the only person who had missed this fact, I wanted to spend a little time highlighting where this exists and how I’m using it.

Categories: Software

Jonathan Brown: Drupal & Bitcoin

Drupal Planet - Mon, 2014-09-15 14:46

Almost everything we do on the web will work better with autonomous blockchain technologies such as Bitcoin & ethereum because they allow systems to be built with unbreakable rules. Unlike Facebook, Twitter, Airbnb, Uber, PayPal or eBay, no executive authority can step in and say the rules don't apply to you.

Of all the blockchain technologies, Bitcoin is currently the most high profile. It is a massive area of growth in the startup eco-system.

Drupal 8 is going to be a fantastic platform for building startups, but we need to make sure that it is also a fantastic platform for blockchain startups.

I've started by creating a Drupal 7 & 8 project called Coin Tools. It provides various components that would be useful for building a Bitcoin web product. Many of the altcoins are very similar to Bitcoin so the project could easily be extended to accommodate them.

I've also created a Blockchain BoF at DrupalCon Amsterdam on the Tuesday at 10:45.

Coin Tools base module

Contains the following field types:

  • Address
  • Amount
  • Transaction
Widgets

Formatters

Coin Tools Daemon
  • facilitates configuration and access to bitcoind service
  • triggers a hook when a Bitcoin transaction is detected
  • provides a full UI for browsing transactions and sending and receiving bitcoin

I am currently working on a full implementation of BIP 70 which provides a much improved payment experience for the customer. Then I will add integration with Payment / Commerce. This means it will be possible to receive payments in Commerce without using a third party payment processor.

Coins Tools Fiat
  • obtains bitcoin exchange rates from BitcoinAverage (which I consider to be the gold standard), falling back to BitPay BBB
  • facilitates rendering of fiat amounts
  • user can select preferred fiat currency
  • current bitcoin value block

If you would like help developing your Bitcoin startup on Drupal, please get in touch.

Categories: Software

Makina Corpus: A Drupal front-end theme with Bootstrap, LESS and Gulp

Drupal Planet - Mon, 2014-09-15 14:45
More and more articles with these words are appearing right now: here's our approach for a front-end theme complying with Web good practices.
Categories: Software

DrupalCon Amsterdam: DrupalCon for Designers

Drupal Planet - Mon, 2014-09-15 11:54

Unlike DrupalCon Austin, there is no separate UX track at DrupalCon Amsterdam. Ruben and I had to balance both design and development into one track. It was challenging, but it forced us to be really careful about every decision remade.

We really wanted there to be an overlap between sessions, frontend development and design are closer than ever in the workplace, so we wanted to reflect that in our session line up.

Here are a few sessions we think complement each other really well.

The State of the Frontend

Not sure what to learn or where to start in frontend development? Let David and Brian guide you through the landscape, introducing new tools and techniques.

We've also planned this session as an introduction to the entire track, pointing signposts towards other sessions in that track that can fill in more in-depth knowledge about particular subjects. I would encourage everyone with an interest in frontend development to attend the session if only to better understand which sessions in the frontend track are right for them.

We also have a few session that compliment and feed in to each other. Here are a few sessions we think work really well together.

Because it's about the interactions. (Better UX through prototyping) & Axure Prototyping for Drupal

How do we shift from an old design process to a new one while keeping our clients and team members happy? Roy Scholten, UX co-maintainer for Drupal Core, walks us through why prototyping is a better way to design and how to introduce this into your work life.

Then, in Axure Prototyping for Drupal, Dani Nordin takes us on a deep dive of Axure, a prototyping tool you can use without coding. I've been using it recently on a client project and I've been impressed with the way it introduces some concepts of frontend development without asking you to write code.

The Future of HTML and CSS

As a designer, knowing the limits and capabilities of your medium is important, also it means you can call your developers out when they hit you with “That's not possible” which is fun. If you're interested in seeing where web browsers are heading and finding new tricks to add to your repertoire, Preston's talk on The Future of HTML and CSS should be a treat.

Getting a CLUE at the Command Line

As a designer/front-end dev, I've never had a formal education on the command line, it's always been something I've picked up as I've needed it. It used to scare me. This is me using the command line a few years ago:

I'm so happy Emma Jane is talking on the command line in Getting a CLUE at the Command Line in the same vein as her introduction to Git at DrupalCon Prague last year. The command line is an immensely powerful and productive tool and I'm looking forward to picking up a few tips.

Open Source Design

Something I've struggled with, both in my day job and as the maintainer of Drupal's admin theme is how do we bring successful design together with Open Source. I'm really happy that Jan-C. Borchardt, agreed to speak at DrupalCon and share his knowledge and experience with us. Jan is a big supporter of usability and design in free and open source software, with projects including A guide to Usability in Free Software, OwnCloud, Libre Projects, and the brilliant Terms of Service; Didn't Read.

It's really important for Drupal for us to gain insight from people outside the community and learn from other projects. Thanks again Jan for agreeing to speak! I can't wait!

--
Lewis Nyman (LewisNyman)
DrupalCon Amsterdam Frontend Track Chair

Categories: Software

MariqueCalcus: Drush

Drupal Planet - Mon, 2014-09-15 09:30

Dru(pal)sh(ell) is an essential tool if you are working with Drupal intensively. If you don't know it yet, Drush is command line shell and scripting interface for Drupal. It helps you to quickly perform various administation and maintenance tasks using only a terminal. If you are not convinced, you should probably install it and give it a try. You won't regret it. It's awesome and will save you headaches, time and again more time. If you are using Drush, you must have been using the command "drush cc all" like a million time. I have. But Drush can do much more.

Read More...
Categories: Software

Károly Négyesi: Drupal 8 progress from my / MongoDB perspective: update #29

Drupal Planet - Mon, 2014-09-15 00:47

Perhaps the most important development is the final naming of what was field/field instance in Drupal 7: in Drupal 8 these are configuration entities. The machine names are field_storage_config and field_config. There has been several renames but we have settled on these finally (although the field_config rename is not yet in). It does reflect the most important difference between them: field storage contains everything pertaining to the storage of the field. The things that do not change the storage of it go into the instance. However, some confusion might come from already existing Drupal 8 documentation and other materials where field_config was the name for what ended up as field_storage_config.

In other rename news, entity storage/list/form/render "controllers" are now handlers. This probably decreases confusion as controllers are used by the router system to deliver the page content.

Migrate now tracks the whether a migration has been run or not. Previously we were guessing from the id mappings -- but if a source returned zero rows we couldn't really say whether the migration ran or not. Now we could clarify for real what are hard dependencies and what are optional. In the Drupal 6 migration, there are few optional ones which is just as it should be.

There's a Views migration in the works. As expected it's really complicated with lots of moving parts but it's coming along nicely.

Only book storage needs entity field query conversion after the epic comment query conversion issue finally got resolved.

One of the child issues of the last beta blocker removes the special casing for SQL storage -- hurray! Instead of requesting the schema of entity tables during module install (and other places) and then creating the tables there are now events on entity type create, update and delete. This makes it possible to create mongodb indexes cleanly.

Categories: Software

d7One: Step by step guide to installing Commerce from scratch

Drupal Planet - Sun, 2014-09-14 20:50
The following guide was used in a presentation at DrupalCamp Montreal 2014. The presentation focused on how to install Drupal Commerce from scratch. FIRST FLOOR
  1. https://www.drupal.org/project/commerce
  2. Install required modules
    • drush dl ctools views entity rules addressfield commerce
    • drush en ctools views entity rules addressfield commerce -y
Share page with AddThis Tags:
Categories: Software

Steve Purkiss: Case Study - NickJr. Colour CMS & API - Feedback sought!

Drupal Planet - Sun, 2014-09-14 20:00
Steve Purkiss's pictureSunday, 14th September 2014Case Study - NickJr. Colour CMS & API - Feedback sought!

It's been an embarrassing amount of time since I last blogged or did anything to my site so I've started to create some content, but before I submit it as a case study on Drupal's site I'd love to have some feedback, it's been years since I wrote case studies so a little rusty. Is it of interest? Does it help? Does it answer the right questions? Are there any questions you'd like me to answer?

NickJr. Colour CMS Home Screen Brief overview

Viacom’s Nick Jr. is a digital television channel aimed younger children, home to popular shows including Dora the Explorer, Angelina Ballerina, and PAW Patrol. 'Colour' is a section of the Nick Jr. website where, daily, tens of thousands of users interact with predefined line-art drawings using paint brushes and stickers. They can then, if they wish to, send pictures they create to their friends via email. The mostly Flash-based front-end currently connects to a legacy back-end system which is being replaced with Drupal.

Completed Drupal site or project URL

http://www.nickjr.co.uk/create/#!/colour

Why Drupal was chosen

Drupal's core and contributed modules along with customisable web administration interface provided all the functionality required out-of-the-box and is already used widely throughout the organisation.

Describe the project (goals, requirements and outcome) Project Goals

The goal of this project was to provide a bespoke back-end CMS based on Drupal to replace the legacy system, along with introducing new functionality enabling Send to Gallery and Pic of the Week features. The CMS needed to as simple as possible for content managers to use, and the whole system had to be able to cope with the tens of thousands of users using the API on a daily basis.

Deliverables

The site was to be delivered as a Drupal install profile so it can be adapted and re-used – an initial step towards creating internal Nickelodeon-specific distributions of Drupal, further lowering costs and time-to-market for future projects with similar requirements. Purkiss built a similar system a few months prior for Universal Artists uView Augmented Reality App and have extensive experience integrating Drupal with 3rd party services so were ideally placed to deliver this type of Drupal project.

Theme

First we set up the install profile with Shiny, the administration theme which comes with Drupal Commerce Kickstart, to be the main theme to the site. Shiny is a great theme for this kind of system where there's really only one main display the content managers interact with – it's easy on the eye with good typography and spacing.

Legacy Migration

We then re-created what functionality was required from the legacy system using Drupal Services – the calls for saving images, retrieving images for a show, etc. There was a major difference here as the legacy system stored all the data in flat XML files with no user data linked. Drupal is a relational database system so we have user accounts, content types and taxonomies – this proved to be an exercise in both education of the client as to the benefits of hooking into the Drupal API, along with re-architecting of the current content model and workflow.

Features

We used a Features-based approach to development with each of these features, along with the install profile, having their own private Git code repository in the cloud in order for issue tracking and maintenance to be easier.

The features we delivered were as follows:

  • Content Types
    • NickJr Colour Image – stores the user’s image along with a Canvas ID which refers to the line art used, a taxonomy field to link to the associated show, and two flags – one to show if the user has sent the image in to Nickelodeon for consideration to be included in the showcase, and one to denote whether it is in the associated show’s showcase.
  • Fields
    • User Profile Fields – extra profile fields to store the user’s name and age.
  • Rules
    • Redirect after login – redirects to the front page view after logging in.
    • Pic of the Week – Views Bulk Operations Component – one rule to set and one to unset an image as Pic of Week
    • Showcase – one to set and one to unset an image as to be in a Show's ShowcaseNickJr. Colour CMS Views Bulk Operations
  • Services
    • NickJr. Colour API – the Services settings for the custom API endpoints.
  • Taxonomy
    • Shows Taxonomy – with Pic of the Week field
  • Variables
    • Always harmonize views filters – Allows views to use both contextual and exposed filters for views
  • Views
    • Front Page – Displays all images, defaults to only show images Sent to Nick
    • Showcase – Displays images in showcase, all if no show_id sent through
    • User Profile – Displays users images on their profile page
Schedule

Project timescale and budget was for an incredibly tight 10 days which we delivered in, however were subsequently hired for a further 7 days to re-factor the API and provide a few final additions to the administration interface.

Out-of-the-box, Drupal Services module provide a standard set of API calls so you can do things like create a user, a node, etc. so all the functionality required was there however required a number of calls to the API to achieve the desired workflow. It was decided to spend extra time creating custom API endpoints which would hide this functionality, reduce the number of API calls required, and make it easier for future users of the API.

The downside to this approach is the technical debt introduced when diverting away from the *.drupal.org infrastructure of support, i.e. core and contributed modules. In this instance the code was simply wrapping existing API calls and the client has access to technical resources so the decision was to take on the technical debt in order to produce a more tailored outcome.

Outcome

We used the extra time to create a RESTful API which abstracted away from Drupal Services out-of-the-box API endpoints along with coding an auto account creation system to link up user data from the front-end without users having to enter their email address, a requirement of Drupal’s user account creation. We documented the API using Drupal’s inbuilt help module and passed the system over to the client, helping them through building the system from the Drush make file.

Summary

The resulting system is a clean, simple-to-use CMS with RESTful API handling thousands of users on a daily basis. Content managers have a separate role with very restricted access so can only do what they need to do on the system.

We really enjoyed delivering this project, however alert anyone thinking of building similar to allow extra time, especially if it is their first Drupal experience - no matter how good specifications are, issues usually arise in one form or another. Also often once people do start using Drupal and see the possibilities available, requirements change and it is good to allow for those to be taken into account.

About Purkiss

Purkiss helps organisations onboard Drupal through consultancy, development, training and support. For more information about Purkiss services please visit http://purkiss.com

Modules/Themes/Distributions

boolean_formatter
cors
eva
features
filter_harmonizer
mimemail
rules
services
shiny
smtp
strongarm
views_bulk_operations
views

Why these modules/theme/distribution were chosen
  • boolean_formatter – makes the user interface a little nicer by providing icons for boolean fields such as ticks and crosses
  • CORS – required for connecting to the front-end
  • EVA - we used an Entity Views Attachment to display users pictures on their profiles
  • features - features allows you to export configuration settings to code
  • filter_harmonizer - Views Filter Harmonizer fixes an issue when using multiple filters on views
  • mimemail - used to send images via email
  • rules - as described above, used for redirecting user on login and for custom views bulk operations
  • services - used for the RESTful API
  • shiny - an administration theme we are using for the entire site
  • smtp - for sending email
  • strongarm - for storing variables in features
  • views_bulk_operations - to enable easy workflow, such as adding an image to a showcase
  • views - so we can display the data we want easily
Community contributions

As the API is specific to the client and used mostly existing functionality we had no code to contribute. The only custom code was for automatic account creation and there are existing modules which provide similar functionality which we used the code from but is too specific to this install to re-use externally.

This is however the second time we’ve been asked for this sort of system, and with the growth of mobile apps we are currently working out whether it would be possible to create a distribution which will help get most of the way there - at least have relevant modules and perhaps an example scenario based on the simple image requirements for this project.

tags: case studiesDrupal PlanetPlanet Drupal
Categories: Software

Drupal Toolbox: Consolidating Content Fields in Drupal

Drupal Planet - Sat, 2014-09-13 03:16
Consolidating Content Fields in Drupal
Categories: Software

Drupal Toolbox: Migrating from Tumblr to Drupal

Drupal Planet - Fri, 2014-09-12 22:50
Migrating from Tumblr to Drupal
Categories: Software

Deeson Online: PHP 5.5 Generators and Drupal

Drupal Planet - Fri, 2014-09-12 16:00

PHP 5.5 introduces generator functions.  Generator functions return an object that can be iterated over - often to be used with a foreach loop, for example:

function gen_one_to_three() { for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } }   $generator = gen_one_to_three(); foreach ($generator as $value) { echo "$value\n"; }

Which will output:

123

(Example taken from php.net).

PHP calls the generator function when it needs values - when the generator yields a value the state of the generator is saved, so it can then be resumed when the next value is required. This can lead to significant performance boosts over creating an array which only exists to be looped over as less memory is needed.

There is more detail on http://codingexplained.com/coding/php/introduction-to-php-generators.

So how can this apply to Drupal …

A render array might look like...

$wrapper = array( '#type' => 'container', '#attributes' => array( 'class' => array('class'), ), ‘item-one’ = array ( … ); ‘item-two’ = array ( … ); ‘item-three’ = array ( … ); );

The element_children function returns an array which contains the array keys of the children array elements. This breaks from the standard PHP foreach pattern where you perform operations directly on the value created by the foreach loops - I don’t think this is ideal - I had to look twice to see what was happening the first time I saw it.

Using generators, you can use a more typical php pattern - the following is equivalent to the above.

foreach(element_children_generator($variables) as $key => &$element) { ... $element[‘#example’] = ‘example’; dpm($element); ... }

As well as being a more typical PHP pattern, referencing the element within the loop is cleaner.

There are downsides to this approach too. A developer familiar with Drupal may have to look twice to see what is going on with the yield keyword. Obviously this can’t go into Drupal 7 Core (which supports php 5.2.5+), and I wouldn’t recommend it for Contrib either for the same reason. 

However since PHP 5.3 and below is EOL I think this pattern is well worth adopting in your own projects with low risk.

Read morePHP 5.5 Generators and DrupalBy Chris | 12th September 2014
Categories: Software

DrupalCon Amsterdam: Training spotlight: Introduction to Headless Drupal

Drupal Planet - Fri, 2014-09-12 14:47

We know Drupal is an amazing platform for making websites. But did you know it’s also a world-class content API that can easily be integrated with a other technologies?

In Introduction to Headless Drupal you'll write your first Node.js application(s) and learn how to integrate Node.js's real-time wizardry into Drupal's content management magic.

Meet the Trainers from Four Kitchens

Matt Grill (drpal) Engineer at Four Kitchens
Matt taught himself HTML in 1996 while making a fansite for The Simpsons, even though he’s never actually watched the show. Matt’s interests in technology range from Arduino to automation and deployment. Matt currently maintains Is It Shaking?, a Node.js powered app for tracking and analysing earthquakes worldwide, Is It Shaking?. He has been working with JavaScript for nearly 10 years.

Michal Minecki (mirzu) Director of Technology at Four Kitchens
Mike Minecki has been building websites since 1999, and has been working with Node.js and Drupal for about a year. He has worked on www.drupalpoetry.com, a responsive web game that mimics the experience of playing with magnetic poetry on the web. He has taught Node.js in Austin and San Francisco, and has been speaking at events around the country about how to integrate Node.js and Drupal.

Attend this Drupal Training

This training will be held on Monday, 29 September from 09:00-17:00 at the Amsterdam RAI during DrupalCon Amsterdam. The cost of attending this training is €400 and includes training materials, meals and coffee breaks.

Many of our training courses, including Introduction to Headless Drupal, are nearing capacity and we will not have waitlists, so if you are planning to attend, we strongly recommend you register this week.

Register today

Categories: Software

Pages