Sash
Sash

Reputation: 3535

Testable ASP.NET architectures

I am looking for guidance on designing asp.net applications using n-tier architecture. Can anyone suggest architectures (not MVC) that use web-forms, and support modules and allow repeatable tests.

I understand the vagueness of the question, but am unsure of how else to put it.

A little more specifics : - Must use ASP.NET web forms. - .NET 4.0 (not that the version really matters). - I should be able to expose part of the business logic as services (if need be).

Upvotes: 0

Views: 108

Answers (3)

John Saunders
John Saunders

Reputation: 161773

Regardless of the "framework" or patterns used, there's one thing that will ensure your application is testable: use test-driven development, so that your application will not exist except as a way to make unit tests pass.

Upvotes: 1

jgauffin
jgauffin

Reputation: 101150

Simple:

Only have presentation logic in the WebForms project and move all business logic into a class library. And test that class library.

Upvotes: 1

NerdFury
NerdFury

Reputation: 19214

I have done Model-View-Presenter development with ASP.NET WebForms. This allows your logic to live in testable presenter classes. If you are stuck with WebForms, then this is an option.

When I did this, I rolled my own framework. But it looks like someone might have done the hard work for you.

http://haacked.com/archive/2006/08/08/ASP.NETSupervisingControllerModelViewPresenterFromSchematicToUnitTestsToCode.aspx

http://webformsmvp.com/

Upvotes: 1

Related Questions