We are in the process of developing a e-commerce application. It is a web site for a book shop. It is a site very similar to Amazon.com where
you can order books online. Front end is in Java Technology. There is however a concern about where to put the business logic.
I am suggesting to put all business logic in the Oracle Database, as stored procedures (i.e. packages).
However, one of my colleague says that when you call a Oracle stored procedure from Java,
it takes 2 round trips, one to validate the procedure and then to validate the input / ouput parameters of the procedure.
So he is saying there could be a performance issue. So his suggestion is to code all the business logic in the
middle tier in Java.
Is this true?
In a website application like what we are trying to build, is it sound advice to put all business logic in the DB?
Or should it be in the middle tier (app. server) programmed in Java? Or should you spread in between the
middle tier and DB? If so how?