Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Pete Palmer wrote:So, going with the example, I think, you are saying that this "Business Layer" is defined by the "Service" interface.
In my case, the Service interface provides a means of accessing the Data class from the GUI and also "hiding" how the Data class is accessed ie it could be direct or using RMI. I don't see any Buiness logic here. Obviously, I am missing a point or two !.
Should the above logic need to performed somewhere else ?
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
- correctGiven this, your "business logic" is really the Data class because in the service layer you get an instance of Data class
I am interpreting this to mean that I invoke the necessary operations, from the GUI controller, on the business logic to "book" and "search". I don't have such methods as "book" or "search" declared in either the business logic or the Data class.and delegate the book/search methods to the Data class.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Is that OK ? Thank you.I have made all the public interfaces of the Data class available in the business layer, even though I don't use all of them.
So, going with the example, I think, you are saying that this "Business Layer" is defined by the "Service" interface.
In my case, the Service interface provides a means of accessing the Data class from the GUI and also "hiding" how the Data class is accessed ie it could be direct or using RMI. I don't see any Buiness logic here. Obviously, I am missing a point or two !.
Should the above logic need to performed somewhere else ?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
You are correct, it is in the controller.The above interfaces are invoked from the GUI controller", so it looks like you are putting business logic in a controller (or I may be wrong).
This is done by providing the Search() & Book() operation. But this layer also hids from the GUI the detail of whether it is accessing the local or remote database. Is this considered to be implementing the business rule ?The business logic layer is more related to implementing the business rules of a particular problem that an application is going to solve
This is done by providing the Search() & Book() operation. But this layer also hids from the GUI the detail of whether it is accessing the local or remote database. Is this considered to be implementing the business rule ?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Thats very encouraging, however, I think I have a little way to go !I do believe that very soon you'll be a SCJD too
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
GUI Controller -> Business layer -> Remote Services (on the server side) -> Data class -> .db file (for remote implementation)
GUI Controller -> Business layer -> Data class -> .db file (for local implementation)
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|