20110328

Validation in Zend Framework model

The model part of the Zend Framework is very open. In fact, ZF doesn't help you at all with it, other than providing some classes that manage a DB connection. Zend_Db_Table is good and all, but if you want a real-life model you need to work from scratch.

Which is how it should be, really.

The model is the base for your application. It should have all the so called "business rules", and this includes, of course, validation. Now, ZF has some pretty neat validation classes that you can use. The problem is how to write the code only once for the model and for the forms (view).

20110320

Biometric login

In Ecuador we have this bank, which we will call .. Banco del Pichincha, since that is its name and I have no intentions of masking it. My dear bank is arguably (very, though they are quite confident about themselves) the most reliable and stable bank in the country, or at least one of the most reputable ones.

So a month or so ago they decide to change the login system for their website, which means people have to register again and answer a bunch of questions about themselves if they (we) want access again. So far so good, we are promised a new login, which basically consists of a username and password instead of your id number and the incredibly unsafe 4-digit PIN. The new system is called nothing less than "biometric login". Now, I assume anyone with a slightly greater-than-average curiosity will try to figure out exactly what it means, but there's no real explanation on the website other than something like "it magically knows who you are using a digital fingerprint, of your damn soul". (I'm paraphrasing)