|
|
|
|
|
by Ramone
5348 days ago
|
|
It's really all about factoring. You'll notice now that you have model logic in your controller. If you want to reuse that elsewhere, you'll first have to extract it to another class. That class is effectively a SQL generation library, except it's not useful in a general sense and it's not as well tested. The more you do this, the more you converge on reinventing a full blown ORM. I'm not saying there aren't downsides to ORMs, but the counter-arguments to SQL in your controller are pretty obvious. |
|