Collecting the Internet So You Don't Have To

We work on the Internet. As such, we are constantly consuming information. Believe me, there is a lot of it out there. Sometimes we even forget things unless we write them down. Our blog covers everything from web standards to the muppets, php to comic books, music and everything else that we find interesting. Leave us a note when you drop by.

2010 Comes to a Close and With A Well Needed Break

Business
Julian Moffatt
Julian Moffatt CEO / Partner
Visual Lizard
work
1 (204) 957-5520 ext:1
toll-free
1 (888) 237-9559
url
http://www.visuallizard.com
Julian Moffatt Purveyor of Good Times

Well, it is that time of year again. The time when we look at the calendar and wonder where the past year went. 2010 was a great year for we lowly web developers here at Visual Lizard. Doug touched on a few of our projects from earlier in the year. Some launches since the end of the year include:

Botanicalpaperworks.com screenshot
botanicalpaperworks.com designed by Tetro

rmh.mb.ca screenshot
rmh.mb.ca designed by Fjord

Cultureoneverycorner.ca screenshot
cultureoneverycorner.ca designed by Doowah

Economicdevelopmentwinnipeg.com screenshot
economicdevelopmentwinnipeg.com / tourismwinnipeg.com / visitwinnipegnow.com designed by Guppy

Each of the above sites deserves, and will get, their own post, but in the interest of time, they are for now a short list.

On the overall web development front, web standards took a great leap forward with Apple and Google pushing versions of their web browsers to market with the webkit engine humming under the hood. HTML 5 as a written specification, took one step closer to being finalized, which is awesome.

AListApart.com published a couple of great books through their ABookApart publishing company. We have all been reading HTML 5 and CSS 3 on our iPads.

Since this is the last post of 2010, Visual Lizard will be closed for the holidays from December 23rd, 2010 through to January 4th, 2011. If you need us urgently, you can call the office and leave our voicemail a message. We will get back to you as soon as we can, but realize that we are on holidays. Email will be checked infrequently.

If you didn’t get our holiday email, and you like Christmas music, you can get your fill over at our holiday jukebox - http://www.visuallizard.com/christmas/ - and enjoy!

Merry Christmas and Happy New Year! We look forward to working with you in 2011.

Tron Legacy

Event
Wil Alambre
Wil Alambre Senior Programmer
Visual Lizard
work
1 (204) 957-5520 ext:152
toll-free
1 (888) 237-9559
url
http://www.visuallizard.com
Wil Alambre Whiteboard Ninja

After over twenty years, one of my favourite Disney movies finally gets a sequel. And visually, what a sequel! Neon colours and black glass everywhere, plus a plot that picks up where the original left off... though naturally a few decades later. Supposedly it will also be in 3D, though with all that black, I doubt it will really stand out too much. However, computer-generated young Jeff Bridges should pop out.

And the original soundtrack by Daft Punk kicks ass! Seriously, if you haven't picked it up already, do so now! :D

Common CakePHP Hurdles: Naming Conventions

Functionality
Wil Alambre
Wil Alambre Senior Programmer
Visual Lizard
work
1 (204) 957-5520 ext:152
toll-free
1 (888) 237-9559
url
http://www.visuallizard.com
Wil Alambre Whiteboard Ninja

Recently, I’ve been helping one or two people with some CakePHP questions. I’m happy to help these folks get past issues I remember confounding me back when I first started developing with the framework, and I’ve had a couple requests to write some blog articles about it.

One of the regular issues I keep tripping over when developing with CakePHP is the naming conventions. Even years later and dozens of CakePHP applications under my belt, I can still lose hours being frustrated at an obscure bug that turns out to be caused by a simple typo.

The general idea is that datatables, files, and classes should all be named a very specific way. If done right, not only will CakePHP be able to auto-magically link these associated items together, its built-in functionality will set up as many of the options and parameters for you. This can save a developer a lot of time and coding. However, if set up incorrectly, one of two things will happen.

One, the app cannot work, and if you look at the debug information,CakePHP will give you as much information as it can. Using the provided debug tools, settings, reading the provided notifications and error messages, and going through any logs are invaluable.

Two, CakePHP will use auto-magic to work around your link and not tell you it’s doing so. This is the point where debugging can be difficult if you don’t know what you’re looking for.

The issue most commonly comes when a file is misnamed. In my case, it tends to be a model file. CakePHP will recognize a call to a model but not be able to find the model file, so it will create a model class in memory under the name it is looking for. If it then finds the datatable correctly, it continues on it’s merry way. This auto-magically created model class is pretty bare bones, however, and will not include any customization the actual model file has, like relationships, attributes, methods, etc. So if the developer gets errors, the most prominent ones will be about a relationship or attribute and the like not being available... but when he checks his file, they are clearly there.

So, if you seem to be unable to access methods that have no syntax errors or there seem to be attributes with the wrong values in them despite you declaring them otherwise, check to make sure all your files are actually being used like you think they are. Check that file names, folder names, class names, and datatable names follow CakePHP’s naming conventions. Throw in pr() functions and exit() functions to display on screen that those files and functions are actually be used or set. Check file and folder permissions to make sure they are accessible.

Also, if you are working with plugins, make doubly sure you are accessing the files from the right place. Another common trip up I had early on was having CakePHP trying to access a class from the root app folders rather than the plugins’ folders.

Finally, I recommend keeping a cheat sheet handy, such as this one or this one. They may be out of date by a version or two as of this writing, but it should at least get you looking in the right direction if something comes up.

Hope this helps :)