What’s In Chris’ Brain: November 2007 Edition

  • Why the heck can’t I find any info on reusable views in Code Ignitor so I can quit duplicating code I see all over the place?
  • Found a cool article on using debugging PHP using XDebug in vim. Sometimes Komodo gets resource hungry and a quick drop into vim usually makes me feel better.
  • Man, how much time should someone spend refactoring code they’ve inherited? Is it really true that people think everyone else’s code is ugly and theirs is a paragon a beauty?
  • Working on the script for a podcast entitled ‘Coding Standards Only Matter When Things Go Wrong’
  • Trying to figure out if I can fit in an opportunity to teach some online courses into my current employment
  • Rallyhat (my sporting road trip planning site) is actually in the ‘designing screens on paper’ stage. Maybe I will scan some notes for showing people in another post
  • Jeff Griffiths from ActiveState (Hi Jeff!) emailed me to ask me to provide some feedback on using CakePHP with Komodo. If anyone else is building CakePHP apps with Komodo, let me know how you’re making out.
Article Tags >> || || || || || ||

6 Responses to this post.

  1. Georgi Momchilov's Gravatar

    Posted by Georgi Momchilov on 07.11.07 at 5:30 pm

    “Man, how much time should someone spend refactoring code they’ve inherited? Is it really true that people think everyone else’s code is ugly and theirs is a paragon a beauty?”

    Absolutely… I guess programmers are quite a haughty tribe :)

  2. Matt Curry's Gravatar

    Posted by Matt Curry on 07.11.07 at 5:30 pm

    Hey Chris,
    I use the free version of Komodo to develope CakePHP apps. Generally I have no complaints, except for the occasional hard crash.

    The one feature I wish I had was CakePHP specific code completion. There was a thread in the Google Group a few weeks ago about getting this to work in Eclipse by adding a fake include file to your project. One of these days when I get the time I was going to try something similar with Komodo.

    -Matt

  3. Chris Meller's Gravatar

    Posted by Chris Meller on 07.11.07 at 5:30 pm

    I use Code Igniter frequently, along with what you apparently refer to as “reusable views”.

    For example, I have a header and a footer view that contain my basic HTML that will be included on every page. So I call my normal view:
    $this->load->view('user/login');

    In that view, I have load two other views (the header and footer):


    $headers['title'] = ‘Login Page’;
    $this->load->view(’header’, $headers);

    <login form code>

    $this->load->view(’footer’);

    So the “reusable views” are really no different than any other view. While CakePHP splits them out specifically into ‘elements’ (IIRC), Code Igniter doesn’t do any special abstraction.

    Hopefully my code didn’t get mangled…

  4. Travis Swicegood's Gravatar

    Posted by Travis Swicegood on 07.11.07 at 5:30 pm

    Oh man - that DBGp in vim is awesome. That’s geekiness on steriods… :-D

  5. Chris Hartjes's Gravatar

    Posted by Chris Hartjes on 07.11.07 at 5:30 pm

    @Chris Meller
    Yeah, I managed to figure out that you could use $this->load->view(…) in your templates after searching around some more.

    I will say this: despite there being a very clear user guide for CI, it still took a lot of digging around to find what I felt was a simple answer. A very similar experience for people who are trying to find out info about CakePHP as well, but at least now there is a manual online for CakePHP 1.2.

  6. Todd's Gravatar

    Posted by Todd on 07.11.07 at 5:30 pm

    Matt: For CakePHP specific code completions, you’ll need to add the cake library directory to Komodo’s list of known PHP library references, see:
    http://community.activestate.com/forum-topic/komodo-and-cakephp#comment-3405

Respond to this post

Want to advertise on this blog? Send email to chartjes@littlehart.net
GTcars Canadian Car Audio TurboDodge Car For Sale Sign
Audi Forum Mustang Forum Dodge Intrepid Miata Turbo
GTscene Pontiac Bonneville


@TheKeyboard is Digg proof thanks to caching by WP Super Cache!