Fixed – jQuery DatePicker not working in Thickbox

Posted: January 27th, 2009 | Author: Rob Searles | Filed under: JavaScript | Comments

I’ve been struggling today for about an hour trying to get jQuery’s DatePicker working in Thickbox. There appeared to be some kind of conflict. I tried hacking up the Datepicker plugin file, changing the z-index of the CSS but nothing. The date picker wasn’t even being called.

Eventually I found that other people were having the same problem, and a comment by Kevin Luck (the author of DatePicker) flicked my brain into gear.

The problem was that I was initialising the datepicker on page load, not on the loading of the thickbox content.

For example, at the start of the page the Thickbox was going to be loaded in I had this:

<script type="text/javascript">
	$(function(){
		// initiate date picker
		$('.pick-date').datePicker();
	});
</script>
</head>

However, I found that if I removed that from the head, and instead inserted it in the Thickbox content, e.g:

<div id="MyThickboxContent">
<script type="text/javascript">
	$(function(){
		// initiate date picker
		$('.pick-date').datePicker();
	});
</script>

It worked fine, problem solved!


Kohana PHP Framework – My Thoughts

Posted: January 25th, 2009 | Author: Rob Searles | Filed under: PHP | Tags: | Comments

As some of you know, over the past few weeks I’ve been building a prototype for a new web app. For this I decided to try out the Kohana PHP framework to see if it will help speed up development. I chose Kohana primarily because it was light weight and PHP5 only, and I have to say I’m really glad I did. After several weeks hacking around with Kohana (mostly playing admitedly, but I’m almost to the point of having a fully working web app up and running) I have collected a few thoughts on the framework.

Good Points

  • It is PHP5 only (5.2 and above) so it allows for utilising the full power of OO PHP.
  • It is light weight.
  • True auto loading – it’s PHP5, you shouldn’t have to explicate load a class!
  • The cascading file system – this is a joy to work with. It easily allows you to extend and add to modules, libraries, models and configuration files.
  • Kohana has greatly speeded up the development of my prototype and has allowed me to focus on the actual functionality of the app, leaving all the boring, repetitive bits of coding to the framework.
  • I have had to dig about under the bonnet a few times to see what’s going on, and I have been impressed by the clean and well structured code.
  • The community – behind Kohana there is a small but active and knowledgeable community. I have been stuck a number of times when hacking around with Kohana, and on both occasions I have received prompt and useful replies.
  • Most importantly it lets you code how you want, without getting in the way, whilst at the same time can take out a lot of the donkey work for repetitive tasks.

Bad Points

This is going to be difficult, but I’ll give it a try

  • Documentation.  From what I can make out it has come on leaps and bounds over the past few months, however, it sometimes isn’t always clear. Also, the tutorial site hasn’t been updated for a good few months now.
  • Limited number of modules currently available.

However, the above points aren’t deal breakers. Kohana is an open source project, and relatively young at that. This means that I can actively do something about both the documentation (it’s a wiki that anyone can register) and the modules. I just need to find some time and contribute!

Conclusion

As you might already be able to tell, my conclusion is going to be positive. I have really enjoyed playing around with Kohana, it is solid, secure and well designed. Being PHP5 only, not only can I utilise the full potential of PHP, but so can the framework. As said, I’m really glad I chose Kohana, and I am pretty excited about its future developments.

If anyone out there needs a solid, well thought out framework for PHP5, that is backed by an active community, you can’t go wrong if you chose Kohana.

Notes

I have been using Kohana version 2.3 exported from the SVN – details on the Kohana dev site.

Other Reviews

Don’t take my word for it, other people are talking about Kohana too

  • Review at phoenixheart.net – very recent so a good review of the state that Kohana is in at the moment.
  • The final part of a review comparing Zend, Symfony and Kohana. This review is about 6 months old, so the comments about the lack of documentation are slightly less accurate today.
  • Comparision of Kohana and CodeIgnitor (the framework Kohana was originally forked from).

Setting up XDebug for PHP in Ubuntu Intrepid Ibex

Posted: January 13th, 2009 | Author: Rob Searles | Filed under: Linux, PHP | Comments

I love Ubuntu and today reminded me exactly why. It’s just so easy to do stuff in it!

I run a LAMP development server off my laptop, and today some of the PHP I was writing was throwing up some errors. Unfortunately I hadn’t installed XDebug which makes life so much easier when debugging PHP.

Oh no, I though. I’ll have to download it, install it, update the PHP.ini file. Argh.

But wait…no! I have Ubuntu, all it took was 2 easy steps:

Step 1, install Xdebug

sudo apt-get install php5-xdebug

Step 2, restart Apache

sudo /etc/init.d/apache2 restart

Done! Easy peasy.

Thanks Ubuntu :)


400 Tweets Later, What Have I Learned?

Posted: January 8th, 2009 | Author: Rob Searles | Filed under: General | Tags: | Comments

I’ve just posted my 400th tweet, which is ironically a link to this blog entry. I’ve been using Twitter for about a year and a half, with my first tweet being:

Just joined twitter to see what all the fuss is about 5:18 PM Jul 20th, 2007 from web

A modest start I think you’ll agree. But now I’m on my 400th, I thought I’ll post a little post about what I’ve learned over that time, and why I’m addicted to it.

Now a quick caveat. I’m not a Twitter “power user” I follow about 200ish people and about 100ish people follow me which I’m more than fine with. I can’t imagine following thousands, or have thousands follow me and I don’t really want to. I don’t post that often, but I always have Twitter on in the background, both at work and home.

So here we go, and in no particular order:

1. Twitter is a great News Service.
I’m following a few news sites, plus a few people with their fingers on the pulse, and through Twitter I get to hear about the latest breaking news.

2. Twitter is great background noise.
I think I like using Twitter for the same reason I like having an IRC channel open for the particular framework I’m using at the time, or why I like having the radio on (especially the Cricket) in the background. It reminds me that other people are “out there” living their lives and getting about their daily business. It’s sort of comforting.

3. It’s great for keeping in touch.
I follow a few friends from real life(!!) on Twitter, and it’s really easy to pass on a quick “how’s things” which is all you really need to keep in touch

4. It’s less obtrusive than IM or Skype etc.
Basically it is much easier to ignore Twitter if you want to

5. Keep up with trends.
I don’t mean what which shoes are “to die for this season” or anything like that, but more abstract. As you may know I’m a programmer, who runs my own web development company, and I follow people in a similar situation. It’s good to hear their take on things, which way they think the land lies, what they are up to. “Trends” I think is the marketing name for it.

7. Get inspired.
Related to the above as it follows along the same lines. Twitter allows you a bite sized view in to peoples lives to see what they are up to. Some of the people I’m following are doing some really good stuff, and it inspires me to do more myself.


Hello 2009!

Posted: January 5th, 2009 | Author: Rob Searles | Filed under: General | Comments

Hello and a Happy New Year to everyone out there.

I hope you all had a relaxing (not boring) or busy (but fun) Christmas and New Year break. I took the liberty to have a complete break from work, laptop, interweb, Twitter et al and it has done me the world of good. I’m fully refreshed and raring to get on with 2009

So what can you expect from me over the coming 12 months? Hopefully lots of interesting stuff. Here is a quick breakdown:

  1. I need to re-brand and reposition the business for the coming year. Nothing drastic, just focusing what ibrow is all about.
  2. Loads more work on Timesheet Next Gen. I should be getting the first official release out this weekend, so that’s exciting. Lots of ideas for this and we have a great team.
  3. Have fallen for Kohana PHP framework, and will be using it for a new project starting this month. You can expect to see lots of stuff being added here as I happily hack around in this well written, well thought out framework.
  4. More falling in love with Ubuntu, Xubuntu and OBbuntu?! If you can call it that. Have discovered the lovely window manager OpenBox which is simply, well, loverly. Really want to get my teeth into this and start hacking it up. All encounters will be posted.
  5. Lots of thoughts about system and working more efficiently. Especially if you’re teaming up with multiple developers in either a work or open source related environment.

So, until then stay tuned with the RSS feed