MVC for PHP

With the amazing buzz around RubyonRails, everyone seems to be hooked on the Model-View-Controller (or just MVC) paradigm – and do strive to mindlessly implement the ”Ruby way” into other programming languages without too much reflection and thoughts on how to do it. . Even tough most of the efforts I’ve seen so far seem pretty hopeless; I do believe you could actually do something good with MVC and PHP. Let me try to tell you how.
Continue reading MVC for PHP

Validation: black or white list

When you’re validating data – either client- or serverside – there are basically two strategies you can choose between. You can either blacklist data or white list data. Blacklisting seems to be the most popular way to validate data, but white listing is so much better. Here’s a brief description of the two strategies and why the white listing is better.
Continue reading Validation: black or white list

Do Repeat Yourself

It seems most developers has listen too much to the principle of “don’t repeat yourself”, and so otherwise bright developers in some cases strive too much to avoid repeating themselves and makes a mess of their systems but avoids repetitions completely. If your developer and reads about the DRY, do also remember the important step one: Think.
Continue reading Do Repeat Yourself

Developers, Designers and Templates

David HH has an interesting piece on “The false promise of template languages“. While neither Perl nor PHP may offer the same clean syntax in the code as Ruby can do, it does indeed raise a few interesting questions about how actually benefit from the templates and who does in the space between designers and developers.
Continue reading Developers, Designers and Templates

Secure PHP Programming

A new group has appeared on the net – the PHP Security Consortium (PHPSC). It is an international group of PHP experts dedicated to promoting secure programming practices within the PHP community. Nice. While many PHP developers make sites people are supposed to use and enjoy, few as actual education and experience in how to make secure applications and websites.

Through projects and articles, they’ll try to educate PHP developers.