If you develop an application/library/framework it is sometimes tempting to provide different ways to solve a particular “problem”. In CakePHP you can, for example, create a submit button with:

echo $form->submit('Save');

or with:

echo $form->end('Save');

The first snippet shows the generic solution to create a submit button, the second is a shortcut to create such a button at the end of a form (plus it closes the form).

At first glance this looks pretty nice. But if you think about it, you will see there is quite a price to pay: you have to write and maintain more code, you have more to document and to teach the users, and the users have more to learn…

Sometimes it is worth to pay this price, sometimes not. It’s your decision whether you are willing to pay the price.