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 1060609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:21:11+00:00 2026-05-16T18:21:11+00:00

I was reading the following answer about regions on the topic of programming standards:

  • 0

I was reading the following answer about regions on the topic of programming standards:

https://softwareengineering.stackexchange.com/questions/1338/worst-coding-standard-youve-ever-had-to-follow/1937#1937

I tend to agree with what @Cumbayah is saying, but I have to admit that there’s one place where I’m relying on regions to keep the code tidy. That’s in the Global.asax to keep my long list of routes somewhat legible.

The thing is, there’s 5 – 10 Controllers and each has a handfull of routes into it, some specifically for certain action methods and others more general. So with that we’re talking ~30,40,50ish route definitions defined in a single method in Global.asax. Right now I have them divided into different #Regions for each Controller to tidy it up a bit, but there sure is a stink off it! Is there a better way for me to do this?

  • 1 1 Answer
  • 1 View
  • 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-16T18:21:12+00:00Added an answer on May 16, 2026 at 6:21 pm
    1. As per Noon, consider the use of Areas

    2. As per eglasius, consider moving the route registration concerns out of global.asax and into a separate file. Check out the RouteInitialiser class in the "Who Can Help Me" sample application for one way to do this.

    3. Consider DRY’ing up your route configuration by adopting a better route registration API, like Steve Hodgkiss’s restful-routing stuff http://github.com/stevehodgkiss/restful-routing

    4. Don’t sweat it. If you have lots of controllers, you will have lots of routes. Can’t get around that 😉

    Oh, and 5) Get rid of your regions.

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

Sidebar

Related Questions

I was reading about Empty Base Optimization(EBO). While reading, the following questions popped up
Reading a book I have found the following statement: (Object) Behaviors answer either of
I was reading the following text from Stanford's Programming Paradigms class , and I
I’ve recently started learning IOCP on Windows and been reading the following article: http://www.codeproject.com/Tips/95363/Another-TCP-echo-server-using-IOCP
I was reading the following article: http://odetocode.com/articles/294.aspx This article raised me a lot of
I am learning CSS, and was reading questions about Relative vs Absolute font-sizes on
This question follows this other question about C declarations . Reading the answer to
I'm studying the Intel's IA-32 software developer manual. In particular, I'm reading the following
I have the following code reading a file containing unicode text (Japanese). File f
Reading through documentation, I found following: 1.9.1 1.8.4 1.8.2 A version of 1.8.2 select

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.