New answers tagged business-logic
As already mentioned MVC is just a presentation pattern and there is nothing wrong in having a business layer. However, you should not call that layer directly from the Controller, as these are supposed to be very thin and without any logic. There are actually multiple patters that you can, it seesms the Pattern3 mentioned here suits your requirments.
Certainly an Active Record is a great start, but what about the business logic for integrity (e.g., add an order - that affects the customer's balance). I would caution about putting that in the client model, since it is not exposed as a service for reuse by other clients, other computers and so forth. I'd recommend architecting this into a middle tier or ...
If your data access layer doesn't provide the methods to access data that you need, why would you have it at all? The point of a DAL is not just to provide generic methods for accessing whatever data the caller wants. The database driver already provides those, and if you want to be independent of the particular database, you want a wrapper or adapter, but ...
Top 50 recent answers are included