views:

88

answers:

1

This question may have been asked before, but I'm looking for a different answer than what I've seen.

Our website is in ASP.NET and we use the model-view-presenter pattern to get business logic out of the markup codebehind.

Is there an accepted pattern for web services for getting business logic out of the codebehind? It seems like putting the logic in a 'presenter' is misleading since the calls don't really present anything to the user, and may not even send back data to the client.

A: 

I think ASP MVC.NET works well for websites allowing you to separate business logic as well as write unit tests.

If you insist doing it yourself nothing stops you from creating "controllers" that take models , execute business logic and generate presenters. I agree that business logic in the presenter is not a good idea.

Vitalik