On IBM’s developerWorks the second part of the series “Create an interactive production wiki using PHP” has been published. It deals with user registration and custom markup rendering.

I am not so happy with this part. First, it uses functions of the HTML helper which are deprecated since version 0.9.2 of CakePHP, like passwordTag() and submitTag() (you should use password() resp. submit() instead). And second, I think the rendering of the markup shouldn’t be done in the controller. It should be done in a component or a helper (depends on whether you look at it as business logic or presentation logic). The advantages:

  • the code would be easier to test
  • the controller would be easier to read
  • the markup rendering could be reused

Anyway, here the links to the article: article (registration needed), PDF

Part 1