revjim.net: cafelog: a look at bad code

revjim reviewed Cafelog/b2 here. I have to be honest here and admit I haven’t looked at, or been concerned much with the internal workings of b2 yet.
I’ve worked on adding features I saw as vital to any blogging software I wanted to use. Now that those are in place (namely various template enhancements) I have to look seriously at the backend code.
On another note, can anyone access the Cafelog forum or Cafelog itself? I suspect the domains weren’t renewed and now they’re innaccessible.

PHP, MVC – continued

I’ve thought about this for a while after posting my previous attempt at using MVC to design a registration form.
So far, I’ve removed the need for the fields array, and simply used the Smarty “include” function to include html code for text boxes and checkboxes.
I also changed the controller so I could pass the names of different model and view classes to it. The controller should really create different view and model classes for each view IMO but that might be overkill for this. It’ll be a challenge when it comes to more non-linear apps where it’ll make sense to put code into seperate files.

Thank you Bruno for your comments. I think having as minimal a view class as possible is good and desirable considering the power of Smarty templates! The Template becomes the view class in other words.

Here’s a good description of the different components of the MVC architecture. There’s also a good page on Controller design.