php

First Days with CodeIgniter and MVC

I have begun the research and studying that will be required to rewrite SecurityDistro.com. This research has lead me to believe that the most efficient way to start would be with a PHP framework.

I started by looking through a few common frameworks, their install process, and their documentation. The search began with Zend, CodeIgniter, and Symfony. I installed each one and started looking into what it would take for someone like myself to learn MVC using these frameworks. My requirements were that it needed to be an easy introduction to MVC and that it wouldn’t require me to start from scratch on SecurityDistro.com. I wanted to make incremental improvements to the site as I learned the framework.

At first glance Zend appeared to be a hodge podge of different libraries which would require me to do a good bit of work just to start playing with it. I could be wrong but this was my first impression.

Symfony was actually my first choice in frameworks but when I started going through the Propel ORM setup which appears to be required for Symfony I decided that I didn’t want to spend the next 2 weeks learning an ORM tool before I got started in the framework.

Last on the list was CodeIgniter. From the description it was lightweight and would require little setup to get going. The description of the framework was oddly accurate. I installed CodeIgniter in a subdirectory on my test box and was viewing the default index page in just a few minutes. CodeIgniter also offers two “getting started” style video tutorials that are fairly short and very helpful. After watching the videos and playing around a bit I started looking through the documentation. The documentation provided was straight forward and gave easy to understand instructions on how to use the various resources provided by the framework.

After watching the tutorials and browsing the documentation I started to write a little code. This quickly led me to more questions including how to get the index.php segment out of the middle of my URL. A little searching provided this tutorial which was exactly what I was looking for. The tutorial walked through the best way to rewrite the URL in order to have a nice clean URL.

My next issue was MVC structure. Since I have never worked on an MVC application I was in the dark about the structure and how things were supposed to be designed. I knew what the M, V, and C stood for and did but had no idea how the data flowed between them. Turning back to the CodeIgniter documentation I found a nice little diagram to get me started. This got me moving in the correct direction but after more coding I can already tell that MVC application structure will need to be added to my required reading list.

I have now started reading an older CodeIgniter book called CodeIgniter for Rapid PHP Application Development. So far it has been very informative even though it is somewhat out of date.

»crosslinked«

Tags: , ,

Wednesday, November 19th, 2008 Development No Comments

First Encounters with PHP Architect

A few months ago I was able to sign up for my first developers conference. The destination was PHPWorks 08 in Atlanta which was being hosted by PHP Architect. While registering for the conference I kept seeing an offer for a free PHP training class. I knew that there was a catch but but didn’t know what it was yet. When it comes to development I tend like instructor oriented training whether it be in a class or online. Knowing this, I clicked the offer button to see what it was all about. The offer was that I could sign up for the tutorials section of the conference for an extra $250 but in exchange I could pick from almost any training class in the PHP Arch catalog. After reviewing the catalog I found that all classes were instructor lead online classes that usually ran around $900 per seat. I decided that it was worth it and signed up for the whole package. This meant that for $850 I would get access to the conference, tutorial day, a training class, and a 1 year subscription to PHP Architect which I was planning on getting at some point anyways. As far as cost comparison to other conferences I see this as a great value and I am excited to see what the outcome is.

The conference payment and registration was now complete so I needed to find a class and get registered. It wasn’t immediately apparent to me when I logged in to my new PHP Arch account how to select the class without having to pay for it. I may have overlooked the area but there just didn’t seem to be a mapping in the system which understood that I had met the requirements for the conference that would result in a free class. With the contact info quickly accessible via the website I gave them a call. I was promptly put in touch with a human who solved my problem in a matter of minutes. He had me sign up for a class via the website and immediately waived the cost due to the conference tutorial day sign up. For me this was a great start to a beautiful friendship. There is nothing better than the feeling you get with prompt customer service that ends in problem resolution.

This marks the first of many posts that will be related to PHP Architect. I look forward to passing on information about how the well class goes as well as semi-live blogging the conference.

Tags: , , , , , ,

Monday, October 27th, 2008 Local Events 1 Comment