We are developing an 3-tier application where presentation layer communicates with service layer, which in turn communicates with the business layer. The business layer has access to database. Currently we have implemented business layer to hold CRUD operations for tables. We have a couple of doubts regarding organizing the methods in service layer and business layer.
Firstly, how should the methods at service layer be grouped? Should we group the methods based on a page basis, where in all the data a page needs are provided by a method of a service. Or should we fetch the page data by multiple service calls ?
The other concern is about organizing methods at the business layer, it seems that for any method at the service layer we have to implement a corresponding method at business layer. If we go by this logic the methods at service layer would be acting like dummies, and only taking care of authorization and validation. For ex: when fetching a data that comes from join of two table, should we fetch the two tables on the service layer and then do the join on the service layer or should we have a function on business layer which does the same thing. Essentially reducing the data transfer between service layer and business layer.