Monday, May 19, 2014

Talks submitted to IPC/WTC



I just submitted two talks for the +International PHP Conference.
Take your PHP app to the Cloud with Google AppEngine

Do you worry about not having the right amount of servers and configurations to handle your PHP app's success? Or do you worry about paying too much money for an over-architected solution? Google’s AppEngine only charges you for what’s used and can automatically scale up & down to meet your app’s demands. It’s a great way to deploy your PHP application into the cloud with managed scalability, performance and reliability. This session will guide you through a typical implementation as well as show you how to migrate your existing applications over.
I was thinking I can use the experience I gained from the Google Cloud Developer Challenge to build upon for this talk.

I also submitted a workshop idea for +Drupal. I figure I'm still recently engaged enough with Drupal to tap into an outsider's perspective and at the same time, have the years of experience to share.
Building Your Web Presence with Drupal

If you’ve been considering using Drupal for your website, but find the documentation and vastness of the platform overwhelming, this workshop will give you a guided introduction that will give you the confidence you’re looking for. We’ll start with an overview and then go through the steps of building a site or migrating an existing site. Then we’ll highlight contributed modules & themes that can take your site to the next level. We’ll also cover how to extend Drupal by writing your own custom modules to extend Drupal farther. Finally, we’ll talk about some typical server configurations to ensure your website can handle its traffic.

And for good measure, I also submitted a talk I've given before on +Google Analytics to +WebTech Conference:

Making Cents from Google Analytics

Google Analytics is a free and powerful tool that should be utilized by every website. At first glance, you can easily retrieve common metrics, such as pageviews, visitors, etc, but if you don't dig deeper, you're missing out on some really powerful ways to monetize your website even further. This session will guide you through these deeper layers, helping you monetize your traffic.

What do you think? Sound like something you're interested in?

Monday, April 14, 2014

How to work with confirm_form in Drupal 7

Screen capture of the confirmation screen.
Either my google-fu is losing its kung-fu grip or no one has really good documentation on confirm_form. This post hopes to change that (on both respects, since I hope to be able to find my own post later ;)). I have someone who's writing some custom Drupal module code to delete an object, but we want to confirm it with the user before actually deleting the object and she's running into a wall trying to understand how to accomplish that.

The trick is to use $form_state['rebuild'] = TRUE in your submit function. This kicks it back to your form method. So the form method should have two branches, one if it's the initial request and one if it's the confirmation request. Then your submit method should also have two branches, one for the initial submission and one for the confirmation submission. You should also use $form_state['storage'] to store the underlying states and data required for state discernment and form completion. Here's a simplified gist of what I'm getting at:

The healthy dose of dpm()'s are useful to help figure out what's going on, too. If you don't know, dpm() is a great function that's provided by the devel module.

I also uploaded the example module on GitHub for your perusal, download and adoption. :)