Software
Drupal Easy: Drupal Career Online: Pros and Cons of Acquia Dev Desktop Version 2
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.
-->Drupalize.Me: Drupal 8 Beta is So Close
CTI Digital: First-timers guide to DrupalCon
Károly Négyesi: What JS makes this monkey dance?
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.
Drupal core announcements: Drupal core security release window on Wednesday, September 17
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.
Drupal Toolbox: Using VBO (and Rules) to remove spam users
Mediacurrent: Top Drupal Marketing Automation 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.
Dries Buytaert: Reflections on Drupal in 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.
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.
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.
Acquia: Custom Distributions on Acquia Cloud: Part 1 -- Drush Make
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.
Jonathan Brown: Drupal & Bitcoin
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 moduleContains the following field types:
- Address
- Amount
- Transaction
- 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.
Makina Corpus: A Drupal front-end theme with Bootstrap, LESS and Gulp
DrupalCon Amsterdam: DrupalCon for Designers
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 FrontendNot 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 DrupalHow 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 CSSAs 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 LineAs 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 DesignSomething 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
MariqueCalcus: Drush
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...Károly Négyesi: Drupal 8 progress from my / MongoDB perspective: update #29
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.
d7One: Step by step guide to installing Commerce from scratch
- https://www.drupal.org/project/commerce
- Install required modules
- drush dl ctools views entity rules addressfield commerce
- drush en ctools views entity rules addressfield commerce -y
Steve Purkiss: Case 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?
Brief overviewViacom’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 URLhttp://www.nickjr.co.uk/create/#!/colour
Why Drupal was chosenDrupal'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 GoalsThe 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.
DeliverablesThe 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.
ThemeFirst 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 MigrationWe 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.
FeaturesWe 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 Showcase
-
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
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.
OutcomeWe 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.
SummaryThe 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 PurkissPurkiss helps organisations onboard Drupal through consultancy, development, training and support. For more information about Purkiss services please visit http://purkiss.com
Modules/Themes/Distributionsboolean_formatter
cors
eva
features
filter_harmonizer
mimemail
rules
services
shiny
smtp
strongarm
views_bulk_operations
views
- 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
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 DrupalDrupal Toolbox: Consolidating Content Fields in Drupal
Drupal Toolbox: Migrating from Tumblr to Drupal
Deeson Online: PHP 5.5 Generators and Drupal
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 2014DrupalCon Amsterdam: Training spotlight: Introduction to Headless Drupal
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 KitchensMatt 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.
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.