wiredesignz - 17 November 2009 03:05 AM
I thought that was specific.
Business logic is that logic that makes your application function and is not related to the request, input validation or the response.
The business logic is that which might ensure a user does not register with a username of `Administrator` or that some monetary value when multiplied by some other value does not end up being a negative number etc.
Your models in an MVC context, are supposed to provide this logic.
Doctrine does have support for Data Validation, and it’s actually more extensive than the CI form_validation class. And it also supports custom validators, where you could for example check for special usernames like (‘Administrator’) as you just mentioned.
I am already planning on making that part of an upcoming episode.
The thing is, I just can’t present all the concepts at once in the very first Model I create in the tutorials. I need to go at a certain pace, as these are meant to be readable by beginners in CI and Doctrine.
Thanks for bringing it up though. If you have any other specific suggestions let me know.