ASP.NET OOP and Unit Testing
page 1 of 7
Published: 02 Jul 2007
Abstract
This article discusses some of the approaches to business logic in an ASP.NET application, as well as using unit testing for an ASP.NET site. It shows you how a Model-View-Controller approach can be used in a web application.
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 15894/ 332

Introduction

ASP.NET is a very functional framework for developing web applications. Creating an object-oriented solution is harder to do so because of the coding effort involved with doing so. This coding effort means creating a custom page or user control class that drives the ASP.NET page.

You may wonder why you would want to do all that work to get around a few complicated problems. The biggest benefit that I have found is that with this extra work, it is possible to unit test ASP.NET pages, which is a huge benefit to ensure that application logic is correct. You can ensure that controls are shown/hidden, that the data displays correctly, and test many of the other visual mechanisms as well. The drawbacks to this approach are the strong coupling between the ASP.NET page and the custom page object and the level of coding effort involved.

There are some challenges when working with ASP.NET objects that I will explain in detail later on. Before we start looking at the problem and the solution, an understanding of some of the capabilities is needed.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 1 and 8 and type the answer here:

User Comments

Title: Good   
Name: venkat
Date: 1/25/2008 2:43:08 AM
Comment:
its Good...! better to provide code for this.
Title: good   
Name: max
Date: 10/9/2007 3:07:04 AM
Comment:
this article is very..good...keep it up
Title: zee   
Name: mami
Date: 8/13/2007 8:35:18 PM
Comment:
zzzzzzzzzzz

toooo borrring to read and make things much more fuzzzzy than it should be.
Title: gud   
Name: mini
Date: 7/12/2007 9:23:00 AM
Comment:
gud one

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 8/22/2008 12:34:17 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search