Drupal Planet

Syndicate content
drupal.org - aggregated feeds in category Drupal Planet
Updated: 1 hour 37 sec ago

Drupal Association News: What I Learned at DrupalCon Day 2: Collaboration is key! So are the Kardashians!

Fri, 2013-02-08 20:30

I can't begin to tell you what a joy these last two days in Sydney have been. My first DrupalCon was a whirlwind of acronyms and goodwill and I couldn't have had a better time, or packed my head with more Drupal knowledge. One of the most impressive parts of the conference has been how welcoming each and every individual is.

Categories: Drupal

Drupal Association News: What I Learned at #DrupalCon Day 2: Collaboration is key! So are the Kardashians!

Fri, 2013-02-08 20:29

I can't begin to tell you what a joy these last two days in Sydney have been. My first DrupalCon was a whirlwind of acronyms and goodwill and I couldn't have had a better time, or packed myhead with more Drupal knowledge. One of the most impressive parts of the conference has been how welcoming each and evey indidivual is. To a person, community members have welcomed new initiates into the fold, creating ana amzing spirit of "can-do" and collaboration.

Categories: Drupal

Drupal Association News: What I Learned at #DrupalCon Day 2: Collaboration is key! So are the Kardashians!

Fri, 2013-02-08 20:29

I can't begin to tell you what a joy these last two days in Sydney have been. My first DrupalCon was a whirlwind of acronyms and goodwill and I couldn't have had a better time, or packed myhead with more Drupal knowledge. One of the most impressive parts of the conference has been how welcoming each and evey indidivual is. To a person, community members have welcomed new initiates into the fold, creating ana amzing spirit of "can-do" and collaboration.

Categories: Drupal

EmmaJane: Working from Assumptions

Fri, 2013-02-08 17:03

Yesterday I made a very bad assumption that's wasted a day of my time. Today, while I wait to hear back on where I went wrong, I thought I'd write up a little warning to my future self.

First, a bit of background: It's very unusual for me to start a project at the beginning. Most of the time when I'm working on a project it's doing little fix-its for a client as part of a larger training contract. Sometimes it's simplifying things to eliminate the need to train users on complex tasks; sometimes it's tweaking a theme to accommodate the way content is being placed into the site now that it's a Real Live Web Site. Regardless of what I'm doing, I seem to spend a lot of time fitting into someone else's work flow. I'm used to it, and usually I enjoy the discovery process.

Yesterday when I hopped onto a project, I was thinking about checklist of jobs (images in the sidebar needed to float: left, lightbox module needed to be installed for a gallery, verify backups are working properly)...but I wasn't thinking about the fact that this project had already had multiple rounds of developers working on it...potentially each set having their own preferred workflow. In retrospect, this is what I *should* have done right from the beginning (and all at once) instead of only doing little bits and pieces over the course of the day while pausing to bang my head against a wall.

Conditions:

  • The project has had more than one developer/development team working on the project before you start.
  • You only have FTP access to the server (yes, seriously).
  • The only way for you to pick up the files you need to be working on is by downloading them via FTP from the live server to your work station.

How I *should have* started this project:

  1. Look in the theme folder for documentation about how the theme was built. If there is none but there are preprocessor files (LESS or SASS), stop immediately, and ask to speak with the previous developers. (I assumed I could just muscle through it without docs...because I'm psychic and code is self-documenting. HINT: turns out this actually just means that I'm psychotic, because CSS preprocessors are totally NOT self-documenting....so you can probably tell that I skipped this step?)
  2. Download as many relevant files as necessary to run the site locally (in this case it was the entire site + a B&M snapshot of the database).
  3. Put everything into version control. Do not pass go. Do not make changes until everything is in version control. (Did this. /me pats self on the back.)
  4. (This is where I went wrong.) Create a new branch and recompile the CSS files from the source preprocessor files (e.g. SASS or LESS).
  5. Assuming you're using Git for your version control, run the command:
    $ git difftool mynewbranch..master
    Look for differences between the two branches.
  6. If there are any differences in Step 5, stop immediately. There is a problem. Either you are missing the source files (i.e. .scss or .less), OR someone has been editing the CSS files directly. Stop and find out which problem you're dealing with.

Possible scenario #1: If you're missing source files: easy! Once you've got the right files you can continue to take advantage of all the awesomeness you get with a CSS preprocessor. Of course once you get the source files, you should repeat steps 4-6 until you can get your output to match what's on the server.

Possible scenario #2: If one of the developers along the way has been editing the CSS files directly: easy! Delete all of the source files from the preprocessor and do your work like it was 1999. Well. Except with more awesome version control than what was possible back then. Of course if you love to punish yourself, you can carefully inspect the live CSS files and pull out the hand-edits and put them back into the preprocessor files where they belong. Chances are very good that your client won't want to pay for this step. Only you can decide if it's worth eating the time costs.

So there we have it: a note to my future self about making assumptions and jumping into the middle of a problem. Do you have your own process for dealing with inherited projects? I'd love to hear any tips you'd like to share.

PS @rupl over at Four Kitchens helps to solve this problem by including a WARNING file in his SASS source files. You can read it here. I think it's brilliant. and so does fubhy.

Categories: Drupal

Lullabot: Drupalize.Me Podcast 11: DrupalCon Sydney

Fri, 2013-02-08 14:37

In this special episode Addison Berry and Jeff Eaton give a report of DrupalCon Sydney, from Australia. The audio is not at our normal quality, but we wanted to drop a quick line out about Sydney while we're here. We chat about the two keynotes that we had, our favorite sessions, and how amazing it is to have a DrupalCon literally by the beach.

News:
Lullabot is hiring a Sales Representative
Drop.coop podcast

Videos for sessions we mentioned:
Dries' keynote
Senator Kate Lundy's keynote
Symfony Components: A Travel Guide
Content strategy and the QUT web redevelopment project
Content Strategists and Developers: We need each other!

Jeff Eaton's session: Building for a Post-Mobile World

Release Date: February 8, 2013 - 4:37pm Album: Lullabot Podcast Length: 38:25 minutes (22.27 MB) Format: mono 44kHz 81Kbps (vbr)
Categories: Drupal

DrupalCon Sydney 2013: DrupalCon Sydney Wrap-up

Fri, 2013-02-08 13:55

What an amazing week it has been at DrupalCon Sydney. We wish all Drupalers could have been here to attend sessions and network with peers. But what's the next best thing? Viewing all the sessions online!

Both Keynotes, Day 1 and Day 2 sessions, as well as Business Day sessions are now online. Simply click on each session to view the videos.

See the DrupalCon traditional group photo on our Facebook page.Please "Like" us while you are on Facebook to keep up-to-date with future DrupalCons.

Those of you still in town, enjoy today's Code Sprint!

We owe a huge thank you to our local lead Sydney organizers, Owen Lansbury, all our volunteers this week, Board member Donna Benjamin, and all our DrupalCon sponsors. We couldn't have held such an amazing event without all of you!

Next up: DrupalCon Portland in the City of Roses, Portland, Oregon, USA. Register now to receive great early-bird prices.

Categories: Drupal

Acquia: Is PHP Secure? "It is if you do it right" says Anthony Ferrara

Fri, 2013-02-08 11:16

This is part three of a conversation I had with Anthony Ferrara – PHP core contributor, security expert, and Senior Architect at NBCUniversal – at the PHP BeNeLux '13 conference. In part one of our conversation, we talked about open source as an ethos and how it affects business. In part two, we talk about what the Four Freedoms mean to us as IT and web professionals, and the growing impact and influence of open source software.

php_myths_anthony_ferrara.mp3
Categories: Drupal

Acquia: Trickle-down & ripple-out: the 4 Freedoms with Anthony Ferrara

Fri, 2013-02-08 11:11

PHP core contributor, security expert, and Senior Architect at NBCUniversal, Anthony Ferrara and I sat down to talk at the PHP BeNeLux '13 conference. In part one of our conversation, we talked about open source as an ethos and how it affects business. In this part, we talk about what the Four Freedoms mean to us as IT and web professionals, but also the growing impact of open source software outside the world of software development.

anthony_ferrara_4f.mp3
Categories: Drupal

Drupal core announcements: Help test unified in-place editing - feedback needed

Fri, 2013-02-08 09:26

Drupal 7 has an administration overlay and contextual links for local operations. Contextual links are “best friends” with overlay because they allow you to go do a contextual operation, close down the overlay, and you are right back where you were. You don’t need to go away from your page to do your action. You get to change what you wanted and then get the page reloaded as it changed. It is as close as you can get to an "in-place" administration experience in Drupal 7 core.

The overlay is also overused as a generic admin browser when the context sensitivity does not matter, so when you click an admin link in your toolbar you also get to use the overlay to essentially navigate around your administration interface. Drupal 8 is now much closer to actual in-place editing because CKEditor just got committed. Soon it will be fully integrated with in-place editing that is already in core and people will get actual in-place editing for textfields without popup boxes or overlays.

The goal we set out for Drupal 8 is to make actual context-sensitive operations simpler by bringing them under one umbrella with in-place editing. We want to de-clutter the overlay for contextual operations and unify all operations in contextual links. This means no more local tasks privileges for the primary content. The result is one unified way to initiate operations on things, including "number of items displayed in the recent comments block" or "add a menu item here", or "reorder menu items in this menu" which would not be possible to edit truly in-place. It removes admin related pieces (local tasks) from the normal page view and hopefully simplifies quick operations.

Now we are at a point where a fully working Drupal 8 patched build is available to test our proposal (which has several iterations of improvements already in it based on user testing and reviews in issue queues). The changes include:

  • An edit toggle that is always present in the top-right corner of the toolbar. This is useful to see all the places you have contextual operations. Essential on mobile.
  • Contextual operations on each block. More things are converted to blocks including site name, global menus, etc, so we consider this a universal tool eventually (in the sense that you will be able to initiate contextual editing for everything in the end - some of which will be implemented with actual in-place editing).
  • Contextual links are of three types: (1) Quick edit link on entities let you edit the fields of the entity in-place (2) major editing actions, like full edit on nodes opens in a new window, not in the overlay anymore (3) other contextual operations open in a simplified overlay.
  • The “simplified overlay” does away with tabs, breadcrumbs and other navigational elements to focus the user on the task at hand. The form is also separated to a visible and a hidden part, the last of which contains complex elements.

All of this works in our build, but the pieces of the experience are less and less agreed on as you move down the list above. The forms changes for example are highly debated.

Right now we need more feedback! You can go test all this at http://simplytest.me/project/spark/8.x-1.x. Provide feedback on the meta issue at http://drupal.org/node/1882482 and the sub-issues for the concrete change proposals (currently managed in three issues).

Find more background information on this effort at http://buytaert.net/spark-update-unified-in-place-editing.

Categories: Drupal

Klaus Purer: State of the project application issue queue 2013

Fri, 2013-02-08 09:26

I wrote a brief status update of what is going on in the Drupal project application issue queue lately. Read more at groups.drupal.org.

Categories: DrupalDrupal planet
Categories: Drupal

Mediacurrent: Using Scalable Vector Graphics (SVG) as button backgrounds

Fri, 2013-02-08 08:31

Last night I was working on a project where the mockups called for some assymetrical button shapes that were all different sizes. Rather than creating a half a dozen background images for each button length, I wondered if I might just use an SVG or Scalable Vector Graphic file as the background which I could then stretch as needed. As you know, there's no penalty of pixelation when stretching SVGs because they are not based on pixels. This would also save a lot of load time on the site, as I can load one vector image instead of half a dozen pixel-based images. 

Categories: Drupal

Code Karate: Drupal 7 Colorbox module

Fri, 2013-02-08 08:07
Episode Number:  105 Post Topics:  Drupal Contrib Drupal 7 Image Handling Drupal Planet UI/Design Modal Forms

The Drupal 7 Colorbox module is one of the many Drupal modules that allows you to display things in a lightbox style modal dialog window.

In this episode you will learn:

  • How to use the Drupal Colorbox module to display image fields in a Colorbox window

Thanks again to Drupalize.me for sponsoring this episode of the Daily Dose of Drupal.

DDoD Video: 
Categories: Drupal

Web Omelette: Cool module: Field Quick Required

Fri, 2013-02-08 03:40

Field Quick Required is a handy administration tool that speeds up your work when dealing with content types that have a lot of fields. This is particularly true for those cases in which you are dealing with content authors and need to have a good overview over what fields are required to be filled in.

Categories: Drupal

Angie Byron: Step-by-step: Converting modules from Drupal 7 to Drupal 8

Fri, 2013-02-08 02:55

As Gábor pointed out, now's the time to help make Drupal 8 more unified and user/developer friendly. A great way to do that is try porting your modules, now, while there's still time to fix the APIs before code freeze.

Here's the video and slides from my Upgrading your modules to Drupal 8 talk at DrupalCon Sydney 2013, featuring the Pants module.

Slides: PDF | PPT | KEY (the canonical version)

But wait, there's more! ;)

The DrupalCon talk was only an hour, so wasn't nearly long enough to walk through the actual steps involved in each API. However! Thanks to the magic of Git (and particularly git rebase -i ;)), you can actually step through each step in the porting process.


$ git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/pants.git

This will get you the 7.x version of the Pants module so you can look at code that hopefully looks somewhat familiar. :)

From there, you can step through each of the steps as follows:


$ git branch -a
* 7.x-1.x
8.x-01-basics
8.x-02-tests
8.x-03-config
8.x-04-blocks
8.x-05-router
8.x-06-twig
8.x-1.x

$ git checkout 8.x-01-basics
$ git log

Note: Each commit message cross-references the change notification for that particular issue. (They're more granular at the beginning than at the end; sorry. :\)

There's also kind of a "brain-dump" of notes if you want to present these at your local user group: http://drupal.org/node/1911346

Note: This is accurate now, but not necessarily tomorrow or especially not next week. ;) Nevertheless, I hope this is able to help someone out there get involved in Drupal core! :) There's a global sprint happening tomorrow!

Tags: drupaldrupal 8
Categories: Drupal

Web Wash: Using EpicEditor In Drupal 7

Thu, 2013-02-07 23:38

EpicEditor is an awesome light weight JavaScript Markdown editor. If you love to write using Markdown, then seriously have a look at EpicEditor. When you think of editors for websites CKEditor or TinyMCE come to mind. These editors have their place in the world, however sometimes you can spend more time fighting against an editor. The two biggest features that I like about EpicEditor is the preview and the split fullscreen editing. Check out the EpicEditor homepage for more details and have a play around with the editor.

In this tutorial, we'll configure EpicEditor using Wysiwyg and Markdown filter for Drupal.

Categories: Drupal

comm-press | Drupal in Hamburg: Video of updating a patch, re-rolling, and making a tests-only patch for the Drupal testbot

Thu, 2013-02-07 22:46

This video has an example of re-rolling a patch that does not apply (a simple automatic merge with no conflicts). Also, it shows updating a patch and making an interdiff.

Weiterlesen

Categories: Drupal

Drupal core announcements: D8 Sydney Q&A happening LIVE!

Thu, 2013-02-07 21:58

Hey dreeps,

Got a question for D8 Initiative owners? Come ask us, we're recording responses at Sydney Core Conversation RIGHT NOW (4pm sydney time), and you can send us questions on twitter using #IOHeckle !

-Shan

Categories: Drupal

Chromatic: Cron Hasn’t Run in HOW LONG!?

Thu, 2013-02-07 18:08

If you work with Drupal long enough, cron will hang and fail on you. It has failed us all. This may not always be a big deal, but it becomes a real issue when your web application or Drupal site has cron-dependent processes, actions, triggers, etc. We whipped up a clever solution to alert us when there’s an issue with cron.

The problem with cron failing is that most of the time we don’t realize it has hung up and is no longer running until one of our clients calls and says, “Do you know why this isn’t working correctly?”. If they’ve noticed, then users have noticed. When this happens, it is imperative that you figure out what went wrong and get cron back to running like it should. After doing so, you may then have to explain why it hung in the first place and why 200+ notifications will be sent out all at once. Frustrating? Yes. Thankfully, we have a solution.

So Cron has Failed/Hung…

First and foremost, when you have a problem with cron (or anything Drupal-related), it is wise to investigate what others have done to fix the same or similar issue(s) by checking with Drupal.org and/or consulting the Googles. If I were a betting man (and I am), then I would say that you’ll find an answer. In the case of Cron issues this page on Drupal.org has some great cron troubleshooting advice.

Clear your cache and try to run cron again

If you’re getting the typical “Attempting to re-run cron while it is already running” or “Cron has been running for more than an hour and is most likely stuck” messages, then you’ll need to clear the cron_last and cron_semaphore variables from your database. Here are a few ways to do this:

  • This sequel query should work: DELETE FROM variable WHERE name = 'cron_semaphore' OR name = 'cron_last'
  • Manually delete them using an application like Sequel Pro.
  • Using Drush, you can execute the following command: drush vdel cron_semaphore && drush vdel cron_last

You may need to increase the max_execution_time in your php.ini file if you’re getting the “Cron run exceeded the time limit and was aborted” error. You may also be hitting a php memory limit if you are receiving an error like “PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in file on line x“. In this case, you will need to increase that limit.

There are countless other ways to troubleshoot cron and the functions that are executed during a cron run. See example here (“Identifying the problematic Task”). Also, consider adding a cron ‘enhancement’ module such as Ultimate Cron.

Our Solution Ok, thanks for Googling that for me, but I need to know when cron fails so that I can fix it!

Pondering, Googling, and looking around Drupal.org, I sought an answer to the following question: “How can I know when cron has hung?”. Finally, a potential resolution (which seemed to make the most sense) came to me: use a Drush script called by a crontab on the server to monitor cron hangs. Note: if you aren’t using Drush, you should be. Do yourself a favor and check out Drush here, here, or here. Once you understand it, keep reading.

I decided that I would check the cron_last system variable and see how long it had been since the last cron run. If cron hadn’t been run in a certain amount of time (one hour for now), then I wanted an email to be sent to the site admin. There are many other options: from filing a ticket/issue in your tracking system of choice (Assembla, Mantis, Desk, Basecamp, Github, etc.) to clearing the cron_last and cron_semaphore variables automatically (which probably isn’t recommended, but possible).

Assumption: You have an up-to-date version of Drush installed and working on your development environment.

Warning: Don’t do any of this on a production site until you have tested and performed quality assurance locally or on a development server.

Set up a new Drush command

All of the information about creating a new Drush command can be found within the Drush module, or see this article. Alternatively, you can run drush topic docs-commands for more information about command authoring. Additionally, you can refer to the Drush sandwich.drush.inc example.

I created a file called croncheck.drush.inc and added it to the /sites/all/drush folder. There are a few different places that you can place this file, but I placed it there because I wanted to be able to track it in git and make per-site changes. You could also put it in a custom module.

The level of detail that you wish to incorporate into your Drush command file is completely up to you. Once again, following the help provided from Drush should point you in the right direction. I am only going to include the ‘critical’ code here and will provide a file for download at the end of this post.

1. Start with hook_drush_command() /** * Implementation of hook_drush_command(). * * @return * An associative array describing your command(s). */ function croncheck_drush_command() { $items = array(); $items['checkcron'] = array( 'description' => "Check on time since cron run and send alert if needed.", 'aliases' => array('checkc'), 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL, ); return $items; } 2. Add a Drush help /** * Implementation of hook_drush_help(). * * @param * A string with the help section (prepend with 'drush:') * * @return * A string with the help text for your command. */ function croncheck_drush_help($section) { switch ($section) { case 'drush:checkcron': return dt("This command will check to see the last time cron ran and send an alert if needed."); case 'meta:checkcron:title': return dt("checkcron commands"); case 'meta:checkcron:summary': return dt("Keeping cron running helps to keep the site running smoothly."); } } 3. Create the main Drush command callback /** * Main drush command callback. This is where the action takes place. */ function drush_croncheck_checkcron() { // Get the last time cron was run via the cron_last variable. $last_cron = variable_get('cron_last', ''); // Make the default time to check one hour (3600s). Use the // drushcroncheck_time_to_check variable to change this. $time_to_check = variable_get('drushcroncheck_time_to_check', 3600); // Get the difference in seconds between now and the last time cron ran. $difference = time() - $last_cron; // Has it been longer than our time to check since cron ran? if ($difference >= $time_to_check) { // Format the date so it is more readable than timestamp seconds. $cleandate = date('l F d Y - G:i:s A', $last_cron); // Format a message to be used via the command line OR the email. $message = t('We have a problem, ' . $cleandate . ' is the last time cron ran! Time since last cron is: ' . drush_timesince($difference)); // Uncomment this line if you want to have the display in the command line. // drush_print($message); // Configure and send the email. drush_mail_send_email('admin@somesite.com', 'Somesite.com: Cron has failed or hung', $message); } else { // Add whatever is needed for successful cron runs, this is unneeded now. drush_print('All good'); } } 4. Add additional functions as needed

In this case, I’m borrowing some code for sending emails with Drush from here.

/** * Send an e-mail to a specified e-mail address. * @see http://drupal.org/files/mail.drush_.inc__0.txt */ function drush_mail_send_email($to, $subject, $body) { // Define $from and headers if (!$from = drush_get_option('from')) $from = variable_get('site_mail', ini_get('sendmail_from')); $headers = array(); $headers['From'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $from; $headers['X-Priority'] = 1; $headers['X-MSMail-Priority'] = 'High'; $headers['Importance'] = 'High'; // If $to is not a valid e-mail address, try to load the account based on the username. if(!valid_email_address($to)) { if(function_exists('user_load_by_name')) $account = user_load_by_name($to); else $account = user_load(array('name' => $to)); if(empty($account)) return drush_set_error('DRUSH_BAD_EMAIL_OR_USERNAME', dt('Bad e-mail address or username.')); else $to = $account->mail; } // D7 implementation of drupal_mail if(function_exists('drupal_mail_system')) { // Prepare the message. $message = drupal_mail('drush', 'key', $to, NULL, array(), $from, FALSE); $message['subject'] = $subject; $message['body'] = array(); $message['body'][] = $body; $message['headers'] = $headers; // Retrieve the responsible implementation for this message. $system = drupal_mail_system('drush', 'key'); // Format the message body. $message = $system->format($message); // Send e-mail. $message['result'] = $system->mail($message); $result = $message['result']; // D6 implementation of drupal_mail_send } else { $message = array( 'to' => $to, 'subject' => $subject, 'body' => $body, 'headers' => $headers, ); $result = drupal_mail_send($message); } // Return result. if($result) drush_log(dt('E-mail message sent to <!to>', array('!to' => $to)), 'ok'); else drush_set_error('DRUSH_MAIL_ERROR', dt('An error occurred while sending the e-mail message.')); }

Lastly, I added a helper function for formatting the time since cron last ran. The format is Days, Hours, Minutes and Seconds, which with this script running, shouldn’t be more than hours. Get the script here.

/** * Helper function to transfor seconds into a usable time since string * @see http://www.neowin.net/forum/topic/806866-changing-seconds-into-days-hours-minutes-seconds/page__p__591387898#entry591387898 */ function drush_timesince($seconds) { if ($seconds > 3600){ $days = $seconds / 86400; $day_explode = explode(".", $days); $day = $day_explode[0]; } else { $day = 0; } if ($seconds > 3600){ $hours = '.'.@$day_explode[1].''; $hour = $hours * 24; $hourr = explode(".", $hour); $hourrs = $hourr[0]; } else { $hours = $seconds / 3600; $hourr = explode(".", $hours); $hourrs = $hourr[0]; } $minute = '.'.@$hourr[1].''; $minutes = $minute * 60; $minute = explode(".", $minutes); $minuter = $minute[0]; $seconds = '.'.@$minute[1].''; $second = $seconds * 60; $second = round($second); return(@$day.' Days '.@$hourrs.' Hours '.@$minuter.' minutes, '.@$second.' seconds'); } Call the new Drush command using crontab

Since this will need to be added to your system’s crontab, here is one way to do it so that it gets called once every hour on the 5 minute mark. Check out the Drupal.org reference on Configuring crontab with Drupal if needed.

5 * * * * /usr/bin/drush -l http://www.example.com -r /var/www/site checkcron

It would be wise to check that the Drush command works before adding it to the crontab. To verify that it is working, run the following:

& drush checkcron<

Feel free to download my croncheck.drush.inc file for use or for tweaking. Please note: CHROMATIC nor myself bear any liability for its usage. I’d love feedback, so feel free to post comments, questions, and suggestions to the comments! Enjoy!

Categories: Drupal

Jeff Linwood: Training Class Recap – Building your first Android App for Drupal – SandCamp 2013

Thu, 2013-02-07 15:55

Recently, I had the opportunity to provide training on building Android apps at SandCamp in San Diego! I was excited to teach my first training class at a Drupal camp, because I like to teach, and I like Drupal. We built this app from scratch:

Why Android apps? First, Android is open source, and the developer tools run on Windows, Mac, or Linux. Second, you can run the app you create in the class on your Android phone or tablet just by plugging it in, changing a simple setting on the phone, and then clicking “Play” in the Android Developer Tools. Third, a lot of the concepts for native mobile app development with Drupal (asynchronous networking, threads, list views, JSON/REST) are shared between the Android, iPhone/iPad, BlackBerry 10, and Windows Phone platforms.

I chose to teach how to build a Android 2.x style of application for this class – it was an intro class, with no expectations of knowing anything about app development or Java. Android 4 (Ice Cream Sandwich) has many new components, including the Action Bar, and Fragments, but they don’t work out of the box on Android 2.x, which is still running about 50% of Android devices.

We covered a lot of interesting topics – including Android layouts, Java classes, methods and exceptions, Android’s AsyncTask, Drupal’s Services and REST Server, Android ListViews, parsing JSON with Android, Android’s permissions, and last, loading an image off the web into an Android app.

I haven’t given a training class for a Drupal Camp before, but I found it to be very useful to me to create a training guide for the students that basically covered everything I spoke about, with lots of screenshots of how the app should look when you add this code, code listings, and discussion. It ended up being about 80 pages for a four-hour class, so it’s about half of a decent book right now.

The biggest request at the end of the class was – where should we go from here? There aren’t a lot of specific resources for building Android apps that talk to Drupal, but I can definitely recommend the Android Design web site:

http://developer.android.com/design/index.html

Before getting too deep into Android, it’s definitely important to understand how Google wants you to design apps. It’s definitely different from iOS app design, which is what you will usually find in when mobile design is discussed. Beyond that, I also highly recommend this book on Android development:

Android UI Fundamentals: Develop & Design by Jason Ostrander.

Google has an Android Developers web site, but I feel that it’s not well suited to beginning app development.

If you’re interested in Android or iOS mobile app development for Drupal, and you have any questions, feel free to contact me here through the Contact Form at the top.

Categories: Drupal

Lullabot: Fourth GRAMMY for Drupal and Lullabot

Thu, 2013-02-07 15:22
Lullabot Re-Launches a Responsive GRAMMY.com for Music’s Biggest Night

Lullabot is excited to announce its fourth annual redesign and relaunch of GRAMMY.com! Just in time for the 55th Grammy Awards this Sunday, February 10th, this year's site features a complete redesign, as well as an upgrade to Drupal 7 leveraging Panels and Views 3.x, some cool, fullscreen, swipeable photo galleries and other mobile-web bells and whistles. The site is also fully responsive, allowing the 40 million+ expected viewers to stream, share, and interact across any web or mobile device. Special congratulations to Acquia for hosting GRAMMY.com for the first time, as well as to our good friends over at Ooyala for once again delivering the site’s archive video content, and to AEG for delivering the live stream video via YouTube.

Simultaneously tune in to every aspect of music’s biggest night so you won’t miss a thing: awards news, video, pictures, artist info, Liveblog posts, thousands of tweets-per-minute and behind-the-scenes action.

The GRAMMY Live stream starts tomorrow, Friday February 8th at 5pm ET / 2pm PT, so you can spend all weekend with the website as you gear up for the CBS telecast on Sunday night. Don't miss any of the GRAMMY action this weekend!

We'll be watching and tweeting along from @lullabot. Follow us on Twitter and let us know what you think.

Categories: Drupal

Powered By