DerekAllard.com

Second Annual ExpressionEngine Roadshow

Last year I had the chance to speak at the very first ever Annual ExpressionEngine Roadshow. I had a blast, I met a bunch of really cool people, and it was a great experience both as an EE dev, and as an EE fan.

Now in the second year – and second city (Seattle) – the ExpressionEngine Roadshow is coming up again. Its a conference designed to bring ExpressionEngine users and developers together offline. The conference offers something for everyone, newcomers included, but also provides in-depth development tips for advanced developers.  So far, the day will include 6 excellent, varied sessions on ExpressionEngine with breakfast before the event, and a great party and networking event after.

If you have the chance to go, I strongly recommend you get down there. You’ll learn tips, techniques and development expertise from others who have been using ExpressionEngine for years, plus meet people in the EE community. From EllisLab this year, Rick Ellis, Leslie Camacho, and Lisa Wess will all be there; as well as Ryan Irelan (of EE Insider and Airbag Industries) coming, and they’re working on several other big names.

Friday, October 02, 2009
Seattle, WA

For full information hit up the ExpressionEngine Roadshow site.

Using JSON on servers without native support

If you’re building a distributed application one of the luxuries you lack is knowing exactly how the server that will be hosting your application is configured. One common obstacle I encounter is lack of JSON support (JSON is only natively available to PHP since version 5 version 5.2, and even then is not uniformly available on servers). Here’s how I code around this situation; firstly, if the server does support JSON, then I don’t want to mess with it, but if it lacks support for JSON, then we need to define the JSON functions so it can use them externally. There are 2 JSON functions that we want to re-create - json_decode(), and json_encode().

Often times these types of things are set using configuration variables (in CodeIgniter, the $config array), but a configuration variable in this case is not really desirable, as a server may get the ability afterwards, or the person implementing it may not set the variable correctly. What I do in order to ensure the system will guess correctly is simply use PHP’s native function_exists() function to determine if the server can handle JSON. If it cannot, then I re-implement all the functions using the PEAR Json_services file, which I implement as a CodeIgniter library.

// Not all servers will have json_decode() available but those that do should
// use it, and we'll fall back to another solution for those who don't. 
if ( ! function_exists('json_decode'))
{
    $this
->load->library('Services_json');

The library is available from the Pear repository and will work in any environment that CodeIgniter itself works in, simply drop it into your libraries folder.

function codeigniter_controller ()
{
    
if ( ! function_exists('json_decode'))
    
{
        $this
->load->library('Services_json');
    
}

    $json 
'{"a":1,"b":2,"c":3,"d":4,"e":5}';

    
$vars['json'json_decode($json);

    
$this->load->view('view'$vars);

I’ve used this technique successfully now across several CodeIgniter projects.

I’m speaking at the first ExpressionEngine & CodeIgniter Conference

I’m very pleased to announce I’ll be joining Leslie Camacho, Simon Collison, Veerle Pieters and a host of other brilliant minds at the the first ExpressionEngine & CodeIgniter Conference in Leiden (Netherlands) at the end of October.

2009 ExpressionEngine & CodeIgniter Conference

What doubly excites me about the entire conference (well… aside from the whole European vacation thing) is that they are specifically focusing on both of my favourite tools, not only EE or only CI, but both. The topics are balanced, the conference is very well organized so far… this will be a pleasure.

If you don’t already have plans, why not take a few extra days and make a vacation of it; and join us for several days of nerding out.

DOMPDF moved to Google Code, New dev team

When I was building BambooInvoice, I wanted to have the ability to export invoices as PDFs. There are a number of excellent PHP based solutions for this, but Bamboo was unique in that it was a distributed application. I wouldn’t have control over the servers it was being installed onto. This meant I needed a PDF conversion library that didn’t rely on certain server libraries being present. I was also limited in that I wanted BambooInvoice to be released under an Open Source license.

DOMPDF was perfect for what I needed, and today the project changed hands, and is once again being actively developed at http://code.google.com/p/dompdf/. I’m very excited for the future of this excellent project.

Read the full post for details.

BambooInvoice 0.8.9 Released

I’m proud to release BambooInvoice 0.8.9 today. Its mostly a maintenance release, but there are some tasty new features as always.

EllisLab Business Card

Hot on the trail of my last post (”Coolest business card I’ve ever seen”) Lookie what arrived in the mail today.

EllisLab Business Card

I have to admit, I love them. I think its the perfect mix of playful and professional, and really captures the spirit of ExpressionEngine. The text is a little hard to read, but on the back it reads:

{exp:robots orders=“kill all humans”}
    http://derekallard.com
    @dallard
{/exp:robots}

If you’re an EE user, you’ll recognize the {exp} syntax right away, and of course the other bits are my website (d’uh) and my Twitter. I’m thinking about writing in an {exp:robots} easter egg now, just for people who get my card! (yeah, ok, I won’t, but let’s just say that robots may make an appearance in EE2).

Quick Link: Coolest business card I’ve ever seen

Found via the watchmaker project, I present the coolest business card I’ve ever seen!

Those little apps I just can’t live without

Recently Derek Jones shared a little addon for Textmate with me called ProjectPlus.  I love it, and now I wonder how I was getting along without it.  This isn’t the first time someone has shared a little utility or app with me that I’ve found indispensable.

So here’s my list of lesser known apps that I use on a regular basis.

Rebuilding DerekAllard.com: The invasion has progressed

Who doesn’t love cheesy killer robots? Nobody that’s who!

I’ve decided to give my blog a facelift. We’ve been living with the old design for a few years now, and those darn robots just weren’t making as much progress on the invasion as they thought they would - so I decided to help them along with a rebuild.  Here’s the before and after:

Keep reading to see drafts of the robots as they evolved, and a peak into the process of the rebuild.

Getting the value of a selected radio button out of a radio group in jQuery

Just a quick tip, I needed to get the value of the selected radio button from a radio group using jQuery. While several custom selectors are available for forms, there isn’t a simple way to do it that I could find. I ended up using a solution that I quite like, and wanted to share.

$("input[name=radio_group]:checked").val(); 

Have I mentioned that I love jQuery?

Edit: This entry was directly attacked by the robots, and all comments were lost. Please leave one again if you left it earlier, and accept my sincerest of apologies.