Right now I am trying to apply the n-tier architecture to our web application, and I get the basic concept of every layer’s functionality and relationships between these layers.
So the question is:
In which layer should I do calculations that are business related?
Thanks!
Right now I am trying to apply the n-tier architecture to our web application,
Share
The answer is in your question, the business layer. The presentation layer should simply tie your business logic to your UI. So the typical process is to retrieve data from the business layer and display it in the UI. Then you could allow the UI to alter the data and then pass it back to the business layer.
The basic idea is to keep the UI layer as thin as possible, and only let it perform logic related to the UI itself.