Experts, I would really like your inputs on this issue that has been nagging me whenever I try to design a good architecture for a web application..
I would really like your inputs on how to apply design patterns like MVC on a web application. I have read articles and links which explain the patterns as such. Most of these consider the scenarios where the development is for a windows application or where the approach is very OO that it might not be very practical when the design is for a web project (not a product) where the environment is more controlled and tightly coupled. Taking the case of a MVC pattern, its pretty well implemented in the ASP.net projects where the aspx page is the view, the code behind page is the controller and the business layer + data layer is the model. Do correct me if I am wrong here .. So basically it looks just like a n-tiered architecture or am I missing anything?
I would like to separate each of these blocks and have definte rules set for each of them. For eg, I would prefer that the model never interacts with any of the HTTPcontext or UI objects. But then I had some issues when I was planning to implement caching/sessions etc. Would my business layer never refer to cache objects? If not, does it make sense to pass all these values as parameters to methods defined in business layer? What happens when you run into a situation like a master-detail screen where the all the records needs to be updated with a transaction. So if you plan to hold on to the information in the session till the user commits, will the code to store and retrive values from the session be written in the business or UI layer?
Now that SP have become really very powerful, most of the business logic can be implemented on the database design or in stored procedures. Now that even XML data types are supported by SQL server, transaction is also not an issue and all the records that need to be updated in a transaction can be send in one database connection as a XML and the stored procedure can handle the transaction. So what exactly will you use business layer for?
Please provide your inputs or any links that I can read to get a more practical explantion of all these scenarios .. I would love to hear about your experience in designing web application and your approach in tackling these issues ..
Do have a look at this link. It started well and looked interesting, but it is not complete ..
Design Patterns in Web Programming
another one ..
Improving the design pattern of web applications with AJAX
Thanks a lot in advance