Jan 20 2019
Jan 20

For this month’s South Carolina Drupal User Group I gave a talk about creating Batch Services in Drupal 8. As a quick side note we are trying to include video conference access to all our meetings so please feel free to join us even if you cannot come in person.

[embedded content]

Since Drupal 8 was first released I have been frustrated by the fact that Drupal 8 batch jobs were basically untouched from previous versions. There is nothing strictly wrong with that approach, but it has never felt right to me particularly when doing things in a batch job that I might also want to do in another context – that really should be a service and I should write those core jobs first. After several frustrating experiences trying to find a solution I like, I finally created a module that provides an abstract class that can be used to create a service that handles this problem just more elegantly. The project also includes an example module to provide a sample service.

Some of the text in the slides got cut off by the Zoom video window, so I uploaded them to SlideShare as well:


Quick Batch Overview

If you are new to Drupal batches there are lots of articles around that go into details of traditional implementations, so this will be a super quick overview.

To define a batch you generate an array in a particular format – typically as part of a form submit process – and pass that array to batch_set(). The array defines some basic messages, a list of operations, a function to call when the batch is finished, and optionally a few other details. The minimal array would be something like:

  <?php  // Setup final batch array.
    $batch = [
      'title'    => 'Page title',
      'init_message' => 'Openning message',
      'operations'  => [],
      'finished' => '\some\class\namespace\and\name::finishedBatch',
    ];

The interesting part should be in that operations array, which is a list of tasks to be run, but getting all your functions setup and the batch array generated can often be its own project.

Each operation is a function that implements callback_batch_operation(), and the data to feed that function. The callbacks are just functions that have a final parameter that is an array reference typically called $context. The function can either perform all the needed work on the provided parameters, or perform part of that work and update the $context['sandbox']['finished'] value to be a number between 0 and 1. Once finished reaches 1 (or isn’t set at the end of the function) batch declares that task complete and moves on to the next one in the queue. Once all tasks are complete it calls the function provided as the finished value of the array that defined the batch.

The finish function implements callback_batch_finish() which means it accepts three parameters: $success, $results, and $operations: $success is true when all tasks completed without error; $results is an array of data you can feed into the $context array during processing; $operations is your operations list again.

Those functions are all expected to be static methods on classes or, more commonly, a function defined in a procedural code block imported from a separate file (which can be provided in the batch array).

My replacement batch service

It’s those blocks of procedural code and classes of nothing but static methods that bug me so much. Admittedly the batch system is convenient and works well enough to handle major tasks for lots of modules. But in Drupal 8 we have a whole suite of services and plugins that are designed to be run in specific contexts that batch does not provide by default. While we can access the Drupal service container and get the objects we need the batch code always feels clunky and out of place within a well structured module or project. What’s more I have often created batches that benefit from having the key tasks be functions of a service not just specific to the batch process.

So after several attempts to force batches and services to play nice together I finally created this module to force a marriage. Even though there are places which required a bit of compromise, but I think I have most of that contained in the abstract class so I don’t have to worry about it on a regular basis. That makes my final code with complex logic and processing far cleaner and easier to maintain.

The Batch Service Interface module provides an interface an an abstract class that implements parts of it: abstract class AbstractBatchService implements BatchServiceInterface. The developer extending that class only needs to define a service that handles generating a list of operations that call local methods of the service and the finish batch function (also as a local method). Nearly everything else is handled by the parent class.

The implementation I provided in the example submodule ends up four simple methods. Even in more complex jobs all the real work could be contained in a method that is isolated from the oddities of batch processing.

<?php

namespace Drupal\batch_example;
use Drupal\node\Entity\Node;
use Drupal\batch_service_interface\AbstractBatchService;

/**
 * Class ExampleBatchService logs the name of nodes with id provided on form.
 */
class ExampleBatchService extends AbstractBatchService {

  /**
   * Must be set in child classes to be the service name so the service can
   * bootstrap itself.
   *
   * @var string
   */
  protected static $serviceName = 'batch_example.example_batch';

  /**
   * Data from the form as needed.
   */
  public function generateBatchJob($data) {
    $ops = [];
    for ($i = 0; $i < $data['message_count']; $i++ ) {
      $ops[] = [
        'logMessage' => ['MessageIndex' => $i + 1],
      ];
    }

    return $this->prepBatchArray($this->t('Logging Messages'), $this->t('Starting Batch Processing'), $ops);
  }

  public function logMessage($data, &amp;$context) {

    $this->logger->info($this->getRandomMessage());

    if (!isset($context['results']['message_count'])) {
      $context['results']['message_count'] = 0;
    }
    $context['results']['message_count']++;

  }

  public function doFinishBatch($success, $results, $operations) {
    drupal_set_message($this->t('Logged %count quotes', ['%count' => $results['message_count']]));
  }

  public function getRandomMessage() {
    $messages = [
      // list of messages to select from
    ];

    return $messages[array_rand($messages)];

  }

}

There is the oddity that you have to tell the service its own name so it can bootstrap itself. If there is a way around that I’d love to know it. But really one have one line of code that’s a bit strange, everything else is now fairly clear call and response.

One of the nice upsides to this solution is you could write tests for the service that look and feel just like any other services tests. The methods could all be called once, and you are not trying to run tests against a procedural code block or a class that is nothing but static methods.

I would love to hear ideas about ways I could make this solution stronger. So please drop me a comment or send me a patch.

Related core efforts

There is an effort to try to do similar things in core, but they look like they have some distance left to travel. Obviously once that work is complete it is likely to be better than what I have created, but in the meantime my service allows for a new level of abstraction without waiting for core’s updates to be complete.

Feb 21 2018
Feb 21

Selected sessions for Drupalcon Nashville have just been announced! Mediacurrrent will be presenting seven sessions and hosting a training workshop. 

From exploring new horizons in decoupled Drupal to fresh perspectives on improving editorial UX and achieving GDPR compliance, check out what the Mediacurrent team has in store for Drupalcon 2018:
 

Speakers: Matt Davis, Director of Emerging Technology at Mediacurrent and Jeremy Dickens, Senior Drupal Developer at The Weather Company / IBM
Session Track: Horizons

During the course of an ongoing decoupling project for weather.com, the team found that the lack of page configurability was a distinct pain point for site administrators and product owners. To meet this challenge, the weather.com team built Project Moonracer, a Drupal 8-based solution that allowed for the direct modification of page configuration on a completely decoupled front-end by developing a unique set of data models to move page configuration back into the hands of the site owners.  

Takeaways:

  • Gain a greater understanding of the decoupled UI problem space as a whole
  • See specific API and UI considerations and lessons learned from our experience
  • Catch a glimpse into some possible futures of editorial interfaces in an increasingly decoupled world

Speaker: Bob Kepford, Lead Drupal Architect at Mediacurrent
Session Track: Back End Development 

Wouldn’t it be nice if you could type one command that booted your vagrant box, started displaying watchdog logs, set up the correct Drush alias, and provided easy access to your remote servers? Or maybe you use tools like Grunt, Gulp, or Sass. What if you could launch all of your tools for a project with one command? In this session, attendees will see how to use the terminal every day to get work done efficiently and effectively

You’ll learn:

  • How to use free command line applications to get work done.
  • How to better use the command line tools you already know.
  • How to customize your command line to behave the way you want it to. I guarantee attendees will walk away with at least one new tip, trick, or tool.

Speaker: Jay Callicott, VP of Technical Operations at Mediacurrent 
Session Track: Site Building 

If you have ever googled to find “top Drupal modules” you probably have read Mediacurrent’s popular, long-running blog series on the top modules for Drupal, authored by our own Jay Callicott. In this session, follow him on a leisurely stroll through the best modules that Drupal 8 has to offer as Jay presents an updated list of his top picks. Like a guided tour of the Italian countryside, you can sit back and enjoy as your guide discusses the benefits of each module. By the end of this session, you will have been introduced to at least a few modules that will challenge the boundaries of your next project.

Speakers: Mediacurrent's Dawn Aly, VP of Digital Strategy and Mark Shropshire, Open Source Security Lead
Session Track: Business

Data security legislation like the GDPR (enforcement begins May 28th, 2018) allows users to control how and if their personal data is used by companies. This shift in control fundamentally changes how companies can collect, store, and use information about prospects and customers. While understanding and implementing privacy related regulation in web projects is a necessity, related knowledge and skill sets become a real business differentiator and a key part of a user’s privacy experience (PX).

Key Topics:

  • Practical interpretation of the GDPR 
  • How to determine if you are at risk for compliance 
  • Repeatable process for assessing security risks in Drupal websites 
  • Security by design
  • Impact to data, analytics, and personalization strategies 

Speakers: Kevin Basarab, Director of Development at Mediacurrent and Mike Priscella, Engineering Manager at Thrillist/ Group Nine Media. 
Session Track: Ambitious Digital Experiences 

In this session, we'll dive into how Group Nine Media (parent company of Thrillist.com, TheDodo.com, and others) are evolving the Drupal 8 editorial user experience and contributing that back to the community. We'll not only look into their use case but also explore what modules and options are out there for improving editorial UX without custom development work.

  • How is design/UX reversing to focus on the editorial experience?
  • What contrib modules currently enhance the editorial experience?
  • How can a better editorial experience be beneficial to your client? 

Speakers: Mediacurrent Senior Front End Developer Mario Hernandez; Cristina Chumillas, Designer and Frontend Developer at Ymbra; Lauri Eskola, Drupal Developer at Druid Oy
Session Track: Core Conversations 

The Out-of-the-Box initiative team is working on improving the first-time user experience of Drupal. The team is creating a new installation profile with the main goal of demonstrating how powerful Drupal is for creating beautiful websites for real life use cases.

The alpha version for The Out of the Box initiative has been committed to Drupal 8.6.x. But, what is it and what will it bring to core?
 

Speakers: A panel of community organizers, including Mediacurrent Senior Developer April Sides 
Session Track: Building Community

This conversation is a space for camp organizers (and attendees) to discuss all things event planning, from venue selection and budgeting to session programming and swag. 

Training Presenters: Mediacurrent Senior Front End Developers Mario Hernandez and Eric Huffman

With the component-based approach becoming the standard for Drupal 8 theming, we’re beginning to see some slick front end environments show up in Drupal themes. The promise that talented front enders with little Drupal knowledge can jump right in is much closer to reality.  However, before diving into this new front end bliss there are still some gotchas, plus lots of baked in goodies Drupal provides that one will need to have a handle on before getting started.

This training will focus on the UI_Patterns module, which although still in Release Candidate state, it already solves many problems originated from the Drupal integration process.

Additional Resources
Drupalcon Baltimore 2017 - SEO, I18N, and I18N SEO| Blog 
Drupalcon: Not Just for Developers| Blog 
The Real Value of Drupalcon | Blog 

Jul 09 2013
Jul 09

If views of my presentations on SlideShare are any indication, a whole lot of you are interested in integrating Drupal and Alfresco. Despite the fact that the presentation is four years old, it consistently makes the “most viewed” list out of my uploads. If you are considering Drupal but need something a bit more document-centric to serve up your files as part of that Drupal site, take a look:

With over 12,000 views, it is safe to say there is definitely something to the combination of Alfresco and Drupal.

Another apparent classic is:

Which is kind of scary given its age and brevity. I think the popularity of this is due to the seemingly inexhaustible demand for “getting started” resources for new Alfresco developers.

This one has similar info, but with more details, and is probably a better choice for developers trying to get an extremely high-level overview:

The CMIS API is now the preferred way to interact with the Alfresco repository remotely, and many people use this presentation to get a quick overview:

In fact, I’ll have a CMIS powerhouse panel on Tech Talk Live tomorrow (July 10, 2013). So if you are just getting started with CMIS, please join us.

If you like CMIS but you don’t want to fool around with your own server, you can use Alfresco in the Cloud. This deck gives a CMIS overview and discusses the Alfresco API at a high-level with links to sample code and screencasts:

Thanks to everyone who has made use of these presentations!

Apr 03 2012
Apr 03

Posted Apr 3, 2012 // 3 comments

The parties are over, the tshirts have migrated into our closets, and the swag has been artfully distributed through our homes and offices. Now that we've all settled back in to real life, it's time to get caught up on what we missed. Session videos are up, and I've pulled together the links to our team and client sessions.

But first, DrupalCon Denver in photos:

Ah...the memories.

Now, back to business. We had oodles of content from the pre-merger Phase2 and Treehouse Agency teams, and a couple of excellent case studies from our clients. The list below covers topics from case studies to design, to migrations and more. Bookmark this page and spend a few lunches going down the list for an array of Drupal insights...you won't regret it!!

  • Robert and JAM's Intro to Drupal(Con) - This engaging DrupalCon opener takes an unexpected turn around 24:00 as Steven Merrill and Joe Bachana join in onstage for chanting from The Book of Drupal.
  • The Drupal Marketplace: How "What we Sell" and "How we Sell It" Affects the Community, our Clients, & Drupal - Panelists from four firms known in part for their "Drupal products" will weigh in on the issue of products, services, and the community in Drupal. Karen Borchert moderates (with Matt Westgate, Moshe Weitzman, and Ryan Szrama).
  • The Story of Energy.gov: The Ins and Outs of Turning Energy-Dot-Blah into Energy-Dot-Awesome - This summer’s launch incorporated eleven departmental program offices websites into the centralized Energy.gov platform. Work to move additional program websites and features to the platform is already underway. This presentation tells the story of what we did, how we did it and why. Presented by Cammie Croft (US Department of Energy).
  • We the People & Whitehouse.gov: Citizen Engagement Powered by Drupal - In October of 2009, WhiteHouse.gov was relaunched, powered by Drupal and open-source technology. In doing so, it leveraged over 100 contributed modules by over 800 public contributors. Presented by Tom Cochran (The White House).
  • Building Drupal Apps for Distributions - Frank Febbraro and James Walker walk you through the process of determining what functionality can be great ideas for an App, why Apps and Distributions are such a great fit, and even build one live. This session is great for developers who are curious about Apps or want to build Apps for Drupal distributions.
  • How Drupal is Transforming Government: 7 Case Studies - Jeff Walpole looks at seven examples of how Drupal is transforming government today in the areas of usability, visualization, platform development, accessibility, collaboration, engagement, and code re-use.
  • I'm Leaving You: The Risks of Dumping Your Old CMS for Drupal and How to Manage Them - There is a great deal of complexity in the reasons for migrating, but the decision is often not understood well amongst the various stakeholders. Nicole Lind discusses what to expect after the decision is made and techniques for managing the change given the various reasons you may have for doing so.
  • Drupal Distribution Case Studies: Leveraging Open Source Solutions - We know that Drupal and open source software are disruptive technologies, but the connection between awesome community contributions and market success against proprietary software is not always clear.  Ezra Gildesgame moderates this panel with Karen Borchert, Jeff Walople, Tom McCracken, Mike Shaver, and Marc O'Brien as they dissect this challenge and address its issues.
  • Zagat.com Case Study - In February, 2011, Zagat.com relaunched on Drupal, retiring an aging ASP.NET with a new site packed full of social features. Steven Merrill and Brian McMurray provide insights into the architecture decisions behind Zagat.com which enables the site to be incredibly fast, and you’ll learn how creative data visualization tools enable richer and deeper content interaction.
  • View Modes: The Many Faces of Your Content - View Modes give the themer the ability to show the same content in many different contexts and with the right display for each situation. Through smart use of View Modes, a themer can avoid having the huge stack of node templates and Views displays that we’re used to. In this session, Tim Cosgrove walks you through what a View Mode is and how to create custom View Modes both in code and with contributed modules.
  • Managing Highly Successful Drupal Migrations- From development, to data migration, to training, to transition management, Drupal migrations are fraught with challenges. Frank Febbraro and Mike Morris team up to walk you through best practices and lessons learned in leading successful Drupal migrations. (Illustrated by Laura Schoppa.)
  • A Responive Project Process - David Ruse goes beyond the ems, percentages and media queries by sharing how responsive design has affected how we approach and practice analysis, content, wireframes, design, testing and site delivery from a more holistic point of view.

Phew! See anything that sparks your interest?  Check out your top picks, and don't forget to browse through the entire schedule of content from DrupalCon Denver.  Have you watched any of our session videos? Were you there? Leave a comment and let us know what you think!

As a part of the Phase2 team, Amy Cham applies her skills as talented writer and marketer that leverages her understanding of Drupal to do (and write) amazing things in the community. A voracious reader, she is always on the lookout for new ...

Feb 22 2012
Feb 22

Perhaps you’ve heard about Jekyll, the simple static site generator that powers Github Pages and a number of other sites including our friends at Development Seed. Jekyll is great because you can write a whole collection of items in Markdown and then easily turn it into a website.

Heykll and Jekyll

A few weeks ago, Steven Merrill and I had the idea to create a presentation in Impress.js using Markdown files for each slide. We enjoyed that Impress.js rivals many of the features of Prezi, but was ultimately just HTML+CSS+JS, which meant that versioning and tweaking the talk could be much simpler than Flash-based Prezi. For my lunch break that day, I dove in. The result is Hekyll, a Jekyll-based presentation generator for Impress.js. Learn more about the process of making Hekyll here.

Drupalcon Denver 2012 is rapidly approaching and Steven and I have been busy getting our slides ready for our Zagat.com Case Study presentation. We’ve been using Hekyll to collaborate and I have to say it’s been absolutely delightful. Our talk is in a hosted Git repository, so we can both be working on separate parts of the presentation simultaneously and, because all of the styling is done in CSS, we can focus on the content first and then make it look great.

Speaking of making it look great, Hekyll has the concept of ‘themes’ built in, which makes it super easy for you to create your own look and feel, or try out a few different ones. Right now, Hekyll only has a fairly basic theme based off the Impress.js demo, but we hope to add a few more simple general designs in the future.

Drupalcon Denver theme for Hekyll

Drupalcon Title Slide, powered by Hekyll

If you’re planning to speak at Drupalcon Denver and you’re interested in Hekyll, I’ve made a Hekyll theme based on the Drupalcon presentation templates, which is available (with installation instructions) on Github here: https://github.com/bmcmurray/drupalcon-denver-2012-hekyll.

I’d love to hear if you decide to use Hekyll for your presentation, and if you’d like to get involved, Steven and I are fairly actively working on feature improvements on Github.

Nov 11 2011
Nov 11

With each week that DrupalCon Denver is coming nearer, the excitement in the community grows. At Trellon, we're not immune to that excitement, and we're proud to be a Platinum sponsor of Drupalcon Denver. We're looking forward to seeing members of the Drupal community there, both old friends and new. We're excited about the opportunity that Drupalcons give us not only to learn more about the direction of Drupal, but to help shape it. We're eager to learn what new and exciting things people around the world have been doing with Drupal. We want to hear about the great things you've built with Drupal, and we'd be happy to talk about what we've been up to lately, too.

We're also excited about sharing things that we've learned with you. As a result, we've put together proposals for a wide range of sessions.

Until midnight on Monday, November 14, you can head over to the Drupalcon site and vote for any of these that you'd like to attend.

We are already now looking forward to DrupalCon Denver to meet all of you great guys in person. Until Denver!

Sep 22 2011
Sep 22

At the last Drupal Indy User Group meeting, I did a presentation on integrating Openlayers and Apache Solr. In the presentation, I walk you through how to setup and configure the modules necessary to display search results on a map in Drupal 7. This is the same basic process which we used on Energy.gov.

The video is about 45 minutes long, so here is a general outline of the presentation. Be sure to watch the entire video or you will not see how all of the pieces are integrated:

  1. How to Geocode Content
  2. Sending Geocoded Content to Solr
  3. Local Solr with Apache Solr
  4. Openlayers
  5. Adding Solr Results to a Map
  6. Placing a Map on the Search Page
  7. Viewing Search Results on the Map

Modules covered in the video

Update...

To Help facility setting up Apache Solr with Local Solr I created this repository: https://github.com/treehouseagency/local-solr-config. It contains all of the files necessary to run solr with local solr on Mac OSX.

Instructions to Run:

  1. Checkout the repo.
  2. Change to the "examples" directory
  3. run "java -jar start.jar"
  4. Profit!
Jul 25 2011
Jul 25

This past weekend was CapitalCamp, Washington DC's first DrupalCamp, and Treehouse presented three exciting sessions.

Treehouse CEO, Michael Caccavano, was on a panel with fellow CEOs of web technology companies in Growing a Drupal Agency Beyond the Garage.

Steven Merrill and I talked about guidelines for web performance optimization, techniques for improving front-end performance, and ways to automate the testing and monitoring of front-end functionality in Pages on a Silver Platter: Automated Front-End Testing and Tuning. If you saw this talk, we'd love your feedback! Please leave your quick review here: http://tha.cm/capitalcamp-front-end-testing

Then, Patrick Macom and I presented on Raphaël JS, an interactive drawing library for vector graphics on the web. The session covered the basics of the Raphaël JS API and then moved into integration strategies with Drupal in the talk, "Outside the Garden: Intro to Raphaël JS." If you saw this talk, we'd love your feedback! Please leave your quick review here: http://tha.cm/capitalcamp-raphael

Below are our presentations from the event, unfortunately the event was not video recorded so there won't be videos of the talks.

If you happened to be at CapitalCamp, we'd love your feedback on our sessions! Please fill out a quick review on SpeakerRate here: http://tha.cm/rate-drupal-and-raphael

If you missed us at CapitalCamp, don't worry! Treehouse Agency will be making appearances again this Friday, July 29th, 2011 at DrupalCamp Philadelphia. Sessions haven't been announced yet but our own JR Wilson has proposed, Node.js Integration with Drupal 7 and Steven Merrill has proposed Coat Your Website with Varnish.

Pages on a Silver Platter: Automated Front-End Testing and Tuning:

Outside the Garden: Intro to Raphaël JS:

Don't Forget! Treehouse Agency will be making appearances again this Friday, July 29th, 2011 at DrupalCamp Philadelphia. Sessions haven't been announced yet but JR Wilson has proposed, Node.js Integration with Drupal 7 and Steven Merrill has proposed Coat Your Website with Varnish. We'll see you there!

May 05 2011
May 05

I was lucky enough to be able to give another presentation at this year's excellent DrupalCamp Nashville, sponsored by Music City Networks, 7 Sudos, Tropo, The Tennessean, and a number of other splendid companies. This year, I decided to present on the Austin Peay State University mobile website that I've been building for the past few months along with the help of interns Jason Bell, Brian Barbour, APSU staff Rollow Welch, Terry Damron, Bill Persinger, and Ryan Forsythe. The site was originally begun in Drupal 6 with a traditional mobile theme, but I decided earlier this year, after seeing a great presentation at DrupalCon Chicago by Treehouse Agency that I wanted to convert the site to use the jQuery Mobile library to make the interface more touch/finger oriented. I think the outcome is a great example of what you can do with Drupal 7, HTML5, some CSS3, and jQuery Mobile.

My slides are shown below and attached to this post in PDF format. I'm hoping to be able to post a video of the session as soon as I have that in hand.

Building a Mobile Drupal Site - Presentation Transcript

  1. Building a Mobile Drupal SitePresented by Mark W. Jarrell [email protected]?eetthought.com Twitter: attheshowApril 30, 2011DrupalCamp Nashville
  2. Overview? Showcasing the new Austin Peay State University mobile site (m.apsu.edu)? Talking about development process? How it works
  3. Demo
  4. Why is this site important?? APSU already has native iPhone and Android apps. Needed something that would work for other devices too? Since most administrators are using touch screen devices, still focused primarily on optimizing interface for iPhone/Android? This site is more likely to be used by people who arent currently part of the university e.g., potential students, community members, potential employees
  5. Going Mobile - Methods? A) Keep current site theme same, use separate theme for mobile browsers. Only one URL.
  6. Going Mobile - Methods? B) Keep current site same, add a new mobile site with a separate URL and redirect users to that.
  7. Going Mobile - Methods? C) Restyle current site such that it works better on mobile browsers (CSS3 Media Queries) - See http://bit.ly/dWqtGm
  8. Going Mobile - Methods? We chose: B) Keep current site same, add a new mobile site with a separate URL and redirect users to that.
  9. What was the process?(Executive Summary)? Worked with Public Relations and Admissions to come up with a feature list? Designed initial theme? Originally started building this site in Drupal 6
  10. What was the process?(Executive Summary)? Upgraded content to D7 in January/February? Upgraded theme and custom modules to D7 in February/March? Converted existing theme to be a subtheme of "jQM" theme in April? Added in jQuery Mobile module/library in April? Site of?cially launched this week
  11. Content - What goes into the site?? Whats do we include here in mobile version thats not on the main site? ? Focus: on-the-go users ? Prepared for quick actions (e.g., Request Info, Campus Map, Schedule Campus Tour, etc.) ? Keep everything as "slim" as you can. Try to make it bite-sized. Less text unless it’s a news article or blog post ? Make your forms as short as you possibly can or youll lose them
  12. Whats jQuery Mobile?? http://jquerymobile.com/? "Touch-Optimized Web Framework for Smartphones & Tablets"? Basically gives you ways to stylize your HTML5 content and page elements such that they are easier for ?ngers (as opposed to point & click) to interact with
  13. HTML5? <!DOCTYPE html> (Way simpler than doctypes in HTML4!)? jQuery Mobile only works with HTML5 <section> <article> etc. not necessary to get it up and running.? jQuery Mobile elements are initialized when "data-role" attributes exist in your HTML code? Example: Radio buttons add <?eldset data-role="controlgroup"></ ?eldset> around your buttons ? Demo: http://jquerymobile.com/demos/1.0a4.1/#docs/forms/forms- radiobuttons.html
  14. Page Refreshes? Page loads are done via AJAX-style requests. Browser doesn’t refresh the page when it changes.? Have to add HTML5 elements like <div data-role="content"></div> ...into your page.tpl.php ?le? Allows you to do smartphone style transitions such as wipes from one page to another.? Note: The page refresh method of jQuery Mobile makes interacting with the admin interface tricky. Usually have to type in /admin to get to admin theme.
  15. What are jQM and the jQueryMobile module?? These are developed by Tree House Agency (NJ Drupal shop)? “jQM” is a base theme like Zen, etc.? It modi?es your form elements so that they have necessary data-role information. Also adds some useful classes to your page that you can use in your CSS? Modify these template ?les and drop them into your subtheme
  16. What are jQM and the jQueryMobile module?? jQuery Mobile module - Adds the JS library into your pages ? Also currently includes a patch to make the basic library work with Drupal better ? Get the one at Drupal.org called “jquerymobile” not “jquery_mobile”
  17. Mobile Tools Module? This goes on your main site and controls who sees what? Includes a lot of functionality like: ? Built in mobile browser detection capability ? Theme switching ? Redirection ? Use of external libraries for browser detection such as WURFL and Browscap
  18. Recap? How it works: User comes to www.apsu.edu using a mobile device, gets redirect to mobile site? m.apsu.edu has much lighter content, focused on a user who is on-the-go? Get to use a touch-oriented UI (if their smartphone supports HTML5, JS, etc.). Otherwise, they see more basic HTML version of content.
  19. Recap? Modules & Themes Used ? jQM - base theme ? jQuery Mobile - module & JS library ? Mobile Tools - module for detection and redirection
  20. Further Reading Links? “Mobile Marketing: Strategy challenges for advancement and enrollment” session with Bob Johnson http://www.slideshare.net/bestbob/mobile-marketing-strategy- challenges-for-advancement-and-enrollment? DrupalCon Chicago Presentation from Treehouse Agency: http://chicago2011.drupal.org/sessions/drupal-go-jquery-mobile? Metal Toad article on CSS3 Media Queries (if you’re going that route): http://bit.ly/dWqtGm
  21. Building a Mobile Drupal SitePresented by Mark W. Jarrell [email protected]?eetthought.com Twitter: attheshowApril 30, 2011DrupalCamp Nashville
  22. Need Help?? Consulting? Theming [email protected]?eetthought.com? Module Development? Training? Migrating a legacy system to Drupal
Feb 20 2011
Feb 20

A lot has changed since March 2010.

how to get started
The presentation is for people who are new to Drupal theming, as well as those who want to get a better sense of what's new in Drupal 7 theming.

I expanded on the previous presentation, clarified some points, and replaced a few slides with better ones.

A video of my slide presentation is available on the DDCLA Blip TV site. The slides are kind of fuzzy because the recording app captured my presentation notes screen instead of my presentation screen. My sincere gratitude goes out to John Romine for taking care of all the session videos, including the cropping of my session to just the relevant slides.

It was great meeting various folks at Drupal Design Camp LA. Big thanks to Christefano and Lee Vodra for their wonderful hospitality!

Oct 27 2010
Oct 27

Last week I gave a presentation to the Waterloo Drupal Users Group about Drupal 7. During the presentation, I gave demonstrations of Seven and Bartik, along with some of the other admin UI improvements. I also presented brief overviews of features and APIs relevant to developers and designers. Click through to see the video, or download the high-resolution version from archive.org.

Oct 15 2010
Oct 15

Today at DrupalCamp Toronto, Khalid Baheyeldin of 2bits.com and myself gave a combined presentation introducing both the business aspects of Drupal and starting to contribute back to the Drupal community.

Here are the slides - at the end is the recipe for the Druplicon cookies. I'd love to see any further variations on it!

Oct 12 2007
dag
Oct 12

This weekend T-DOSE takes place in Eindhoven, NL. This will be my first T-DOSE, but I expect it to be much like FOSDEM and FrOSCon, although maybe smaller and less developer-oriented than FOSDEM and probably more English-oriented than FrOSCon.

We will have a CentOS booth there, and Daniel de Kok will give a presentation about CentOS and virtualization. CentOS now has lots of possibilities from Qemu and OpenVZ, to Xen and KVM. I wonder if lguest will be discussed and how well it integrates in CentOS.

Also scheduled is a Drupal talk by Bert Boerland. I have seen that name a few times now and it would be nice to add a face to the name.

I will be doing my Dstat presentation to spread the word about Dstat. After 4 years of Dstat development, it was time to get out and let people know what you can do with it. (mental note: remove some slides or talk faster)

If you are nearby Eindhoven, or willing to go the distance, come to T-DOSE. The schedule is very divers and the people are friendly, as always :-)

Mar 25 2007
Mar 25

I've just finished off two days down at the Yahoo! headquarters in Sunnyvale, where the OSCMS Summit 2007 was held, and where I experienced my first ever DrupalCon. You can read about my experiences by browsing the posts tagged with DrupalCon on my world trip site; and you can download the slides for my presentation on site structuring and navigation in Drupal right here.

I believe that someone was videoing my presentation, but I'm not sure if the video is online yet, or if it will be; and if it is online, I don't know where. I also don't know if I'm supposed to be posting my slides to some official spot, rather than just posting them here, where you can find them through Planet Drupal. So if anyone knows the answers to these things, please post your answers here as comments. Anyway, glad you found this, and enjoy the slides.

PAGE 2

20 Dec

The exercise bike has been around for decades now, and its popularity is testament to the great ideas that it embodies. Want to watch TV in your living room, but feeling guilty about being inside and growing fat all day? Use an exercise bike, and you can burn up calories while enjoying your favourite on-screen entertainment. Feel like some exercise, but unable to step out your front door due to miserable weather, your sick grandma who needs taking care of, or the growing threat of fundamentalist terrorism in your neighbourhood streets? Use an exercise bike, and you can have the wind in your hair without facing the gale outside. Now, how about adding one more great idea to this collection. Want to contribute to clean energy, but still enjoy all those watt-guzzling appliances in your home? Use an electricity-generating exercise bike, and you can become a part of saving the world, by bridging the gap between your quadriceps and the TV. It may seem like a crazy idea, only within the reach of long-haired pizza-eating DIY enthusiasts; but in fact, pedal power is a perfectly logical idea: one that's available commercially for home use by anyone, as well as one that's been adopted for large and well-publicised community events.

02 Nov

The human body is a self-sustaining and self-repairing entity. When you cut your hand, when you blister your foot, or when you burn your tongue, you know — and you take it for granted — that somehow, miraculously, your body will heal itself. All it needs is time. However, there are many injuries that are simply too severe for the body to repair by itself: in these cases, help may be needed in the form of lotions, medicines, or even surgery. Why is this so? With all its vast resources, what is it that the human body finds so difficult and so time-consuming in healing a few simple cuts and bruises? Surely — with a little bit of help, and a lot more conscious concentration — we should be capable of repairing so much more, all by ourselves.

21 Oct

Modern economics is infinitely bizarre. We all know it. I'm not here to prove it; I'm just here to provide one more example of it — and the example is as follows. You're an educated, middle-class professional: you've lived in a developed country your whole life; and now you've moved to a developing country. Your work is 99% carried out online, and your clients live all over the world. So you move to this less-affluent country, and you continue to work for your customers in the First World. Suddenly, your home is a dirt-cheap developing nation, and your income is in the way of formidable developed-nation currency. The result? Well, I'm no economist — so correct me if I'm wrong — but it would seem that the result must be a paradise existence, where you can live like a king and still spend next to nothing! Could this be the next big thing in employment, that we should expect to see happening over the next few years?

13 Oct

The upcoming Drupal 6 has a very small but very useful new feature, which went into CVS quietly and with almost no fanfare about 6 weeks ago. The new feature is called "useful SQL error reporting". As any Drupal developer would know, whenever you're coding away at that whiz-bang new module, and you've made a mistake in one of your module's database queries, Drupal will glare at you with an error such as this:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'd5_node n INNER JOIN d5_users u ON u.uid = n.uid INNER JOIN d5_node_revisions r ' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROMMM d5_node n INNER JOIN d5_users u ON u.uid = n.uid INNER JOIN d5_node_revisions r ON r.vid = n.vid WHERE n.nid = 1 <strong>in C:\www\drupal5\includes\database.mysql.inc on line 172.</strong>

That message is all well and good: it tells you that the problem is an SQL syntax error; it prints out the naughty query that's causing you the problem; and it tells you that Drupal's "includes/database.mysql.inc" file is where the responsible code lies. But that last bit — about the "database.mysql.inc" file — isn't quite true, is it? Because although that file does indeed contain the code that executed the naughty query (namely, the db_query() function in Drupal's database abstraction system), that isn't where the query actually is.

In Drupal 6, this same message becomes a lot more informative:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'd6_node n INNER JOIN d6_users u ON u.uid = n.uid INNER JOIN d6_node_revisions r ' at line 1 query: SELECT n.nid, n.vid, n.type, n.language, n.title, n.uid, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, n.tnid, n.translate, r.nid, r.vid, r.uid, r.title, r.body, r.teaser, r.log, r.timestamp AS revision_timestamp, r.format, u.name, u.data FROMMM d6_node n INNER JOIN d6_users u ON u.uid = n.uid INNER JOIN d6_node_revisions r ON r.vid = n.vid WHERE n.nid = 2 <strong>in C:\www\drupal\modules\node\node.module on line 669.</strong>

This may seem like a small and insignificant new feature. But considering that a fair chunk of the average Drupal developer's debugging time is consumed by fixing SQL errors, it's going to be a godsend for many, many people. The value and the usefulness of this feature, for developers and for others, should not be underestimated.

07 Jul

There are a great many people in this world — particularly in third-world countries — that spend their entire lives performing jobs that are dangerous, labour-intensive, unhealthy, and altogether better-suited for machines. I've often heard the argument that "it's better that they do what they do, than that they have no job at all". After visiting the hellish mines of Potosí in Bolivia, I disagree with this argument more strongly than ever. I'm now 100% convinced that it's better for jobs as atrocious as this to disappear from the face of the Earth; and that it's better for those affected to become unemployed and to face economic hardship in the short-term, while eventually finding newer and better jobs; than to continue in their doomed and unpleasant occupations forever.

11 Apr

For all of the most memorable moments in life — such as exotic vacations, milestone birthday parties, and brushes with fame — we like to have photographs. For some people, photography is an art and a life-long passion: there is great pride to be had in capturing significant occasions on film or in pixels. But for others (such as myself), taking photos can quickly become little more than a bothersome chore, and one that detracts from the very experiences that you're trying to savour and to have a memento of. For those of us in the latter category, wouldn't it be great if our cameras just took all the pictures for us, leaving us free to do other things? Judging by recent developments, this may not be as far off as you think.

25 Mar

I've just finished off two days down at the Yahoo! headquarters in Sunnyvale, where the OSCMS Summit 2007 was held, and where I experienced my first ever DrupalCon. You can read about my experiences by browsing the posts tagged with DrupalCon on my world trip site; and you can download the slides for my presentation on site structuring and navigation in Drupal right here.

09 Feb

For the past century, humanity has fallen into the habit of wreaking ever-more serious havoc upon the natural environment, and of conveniently choosing to ignore any and all side-effects that this behaviour may entail. Our daily lives are a crazy black comedy of blindness: each of us is like a blind butcher who carves up his customers, thinking that they're his animal meats; or like a blind man in his house, who thinks he's outside enjoying a breeze, when he's actually feeling the blizzard blowing in through his bedroom window. Finally, however, more and more people are taking off the blindfold, and realising that they do actually exist in this world, and that closing the window isn't the answer to stopping that breeze from getting warmer.

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web