Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6140159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:04:53+00:00 2026-05-23T18:04:53+00:00

I have an ASP.NET website that I built that has grown considerably in size

  • 0

I have an ASP.NET website that I built that has grown considerably in size and complexity. I did not create a DAL or BLL in the beginning because I was a newbie and decided that was simpler for me. Instead I used a lot of SqlDataSources and put all of the business logic in the code-behinds for the relevant pages. It was one heck of a learning project. But over time I’ve steadily added features all the while usage of the site has grown significantly. I now find myself with something that has become unwieldy to maintain. Some refactoring is definitely in order.

What I would like to do is to begin separating my UI, business logic and data access code. I picked up a book by Fowler and have also read enough online to know that this is a good thing to do. My trouble is that most examples and tutorials assume the reader is starting from scratch. I need to put together a plan to accomplish this methodically. And I need to do this in a manner that allows me to continue to learn and build skills as I go.

So with all of that as context, my question is how do I break this task down into bite-size chunks? For example, should I start by replacing all of those SQLDataSource controls with a new layer? Or, should I start by creating some stored procs? Or maybe I should migrate first to Linq. You probably get the idea by now. What I’m looking for is an answer that prescribes a sequence of small incremental steps that I can use as my roadmap. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:04:54+00:00Added an answer on May 23, 2026 at 6:04 pm

    I wouldn’t start with DAL, your code probably won’t become much clearer this way but you’d have to implement the whole DAL infrastructure and bind it with your asp.net code, a lot of work. The ideal way would be to start with unit tests but I suppose it’s not as easy if your code isn’t organized well.

    I’d try to extract business logic to separate layer first, this will require you to think like you’re building from scratch. And I bet it’ll make you want to refactor a lot more in the process. You can start by creating a separate Class Library project and start to extract logic with all data access code required.

    When your UI layer is free from everything but presentation logic, then it’s time to refactor your new BLL. Choose the right abstraction for your DAL (for ex. Unit of work), so you could easily write Unit and Integration Tests.

    Then write a lot of Tests. And then you’re ready to really start to refactor your code 🙂

    The point is don’t try to perform too much refactoring at once from the start, just move the code around to make everything more clear and separated. A little mind-shift is always involved in such scenarios.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I have a website that has been built with ASP.NET 2.0 and is
I have built an ASP.NET MVC 2 website that I am hosting with Rackspace
Hi, I have built a ASP.NET MVC website that uses Membership, this works fine.
I have a solution that has a plain old asp.net website and a winforms
I have an e-commerce website built upon ASP.net MVC3. It has appx. 200k products.
I have an ASP.NET website that is contacting a webservice. Everything works fine connecting
I have an ASP.NET MVC website that works in tandem with a Windows Service
I have an asp.net mvc website that returns a JSON result to certain pages
I have an ASP.NET MVC 3 website that works perfectly in IIS7 integrated mode.
So I have this ASP.Net 2.0 website that uses functions contained within a JS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.