Blog Revival

Hello! I just came up with a new theme. Nothing fancy. No images. No galleries. Just plain old text. It looks like a blog design circa 2005. One thing for sure though, it’s fast since there’s not much overhead. This theme is based on the _s framework, a good starter theme kit developed by the WordPress development team themselves. How about that! If you’re interested in learning how the WordPress theme is constructed, download the underscore theme and study its code. You’ll be surprised what you’ll see. You’ll learn quite a bit by analyzing how this theme is constructed. Anyways, I think it’s time to revive this old crusty blog. It’s time to breathe some new life into it. You are probably asking, “where have you been?” Well, I’ve been concentrating on all my other blogs for the last several months. I just didn’t have the cycles to maintain this blog among all the other web projects. So maybe, a new theme will jumpstart the old blog. We shall see, indeed!

A New Theme

A new year, a new theme, a new framework, a somewhat familiar layout, and the same old background. The new theme is based on the Genesis framework by StudioPress. I’m using a child theme called News.

The new theme should be more flexible when it comes to layout and functionality. The Genesis framework is quite robust. The framework has a plugin called Simple Hooks that makes it easier to make theme customizations.

A piece of code can be inserted using Simple Hooks. It will accept any HTML, Javascript and PHP code. The hooks can do wonders when inserted in key sections of the framework. Plugins shortcodes can be inserted as well.

Overall, I’m still learning how to work with this framework works. The concept is a little foreign to what I am used to, but I like what I have done to the theme so far.

I hope you like the new theme.

Fuel PHP

I recently started looking into Fuel PHP. As much as I love CodeIgniter, it’s far from perfect. I’m more than curious if Fuel PHP can offer anything new to a glut of PHP frameworks that is already out there. There is Zend, CakePHP, CodeIgniter – which is my current favorite at the moment, and now Fuel. I was introduced to Fuel because some of the main supporters of CodeIgniter are now working with Fuel.

Here are some details from Fuel’s website.

Fuel is a simple, flexible, community driven PHP 5.3 web framework based on the best ideas of other frameworks with a fresh start.

The framework was started in late 2010 by Dan Horrigan then shortly after the team grew to include Phil Sturgeon, Jelmer Schreuder and Harro Verton. The team has decades of PHP experience between them and have all been involved with Open-Source projects such as CodeIgniter, PyroCMS, ExciteCMS and DataMapper ORM to name but a few.

April 1st, 2011 was the date of the first feature frozen Release Candidate, marking Fuel as ready to be used for development of new projects. v1.0 final is not yet ready but the only changes will be bug-fixes.

 

Differences Between CodeIgniter 1.7.2 and 2.0.0

It has been a year since I last touched CodeIgniter. At that time, I was working with version 1.7.2. Wanting to get back into it, I revisited the CodeIgniter website last week, and I learned that there is a new version of CodeIgniter, version 2.0.0. Last year, I created three personal projects that helped me learn how CodeIgniter works, as well as learn how MVC frameworks work in general.

I downloaded the latest version of CodeIgniter hoping that I should be able to move my old projects into the new version of CodeIgniter. Needless to say, the move was unsuccessful. I found out there are some significant changes to how CodeIgniter controllers and models are constructed between version 1.7.2 and 2.0.0. I should mention also, that there was a version in between that was released, version 1.7.3.

Here are the major differences in the way controllers and models are constructed between version 1.7.2 and version 2.0.0. In both cases, I’m using class constructors.

Version 1.7.2

Controllers

class Contact extends Controller {
  function Contact() {
    parent::Controller();
  }
}

Models

class Contact_model extends Model {
  function Contact_model() {
    parent::Model();
  }
}

Version 2.0.0

Controllers

class Contact extends CI_Controller {
  function __construct() {
    parent::__construct();
  }
}

Models

class Contact_model extends CI_Model {
  function __construct() {
    parent::__contruct();
  }
}

I might add, there are other changes I haven’t even mentioned. The biggest change is the removal of PHP 4 support. Version 2.0.0 requires PHP 5.1.6. Scaffolding is deprecated. Plugins have been removed in favor of Helpers, and few more.

Going Back To CodeIgniter

It’s has been months since I played around with CodeIgniter. I say, it’s time to head back into it. Or should I say, jump back head first. I just realized how much easier it is to whip out an application or two, by just piecing together a few lines of code.

The resulting code is light, fast and fairly efficient. I tried other PHP frameworks, like CakePHP, but for some reason I can’t really explain, I just couldn’t latch on to it. It’s a weak try on my part, but I just feel much more comfortable with CodeIgniter. Maybe, it’s the simplicity.

In any case, both CakePHP and CodeIgniter requires some heat, starting a fire, and some baking. But, first off, I need to get reacquainted with CodeIgniter.

I’m back reading The User Guide.