Thursday, March 22, 2012

Thoughts on getting away from so many aspx files....

Hi,

I have been working on a web project since the very early .net 2.0 days - around 13 months now but it seems to be getting very bulky. I have dozens of aspx files and many folders containing them! I also have way too many files in app_code.

I was thinking maybe I need single entry page - maybe written as a http handler which decides what to do and then loads content xml files to generate output. My concern here is I loose the benefits of master pages - I guess I could store all the xml files in the db but maintenance is harder then.

Any suggestions on this? What about the ever growing app_code folder?

Thanks

-c

what makes the concern for the number of files? Sure you could combine them, but isn't that going to make maintenance harder, instead of easier?

As for the pages themselves (the .aspx). If you want a different look on each, you'll have to use some custom skinning (css) and dynamic content. This will mean either lots of .css files and/or lots in the DB (or xmls) to layout each page. Not really going to save yourself anything...

As for the app_code.. same thing.. you can combine, but will it save you anything? Proper use of Master Pages, base pages and inheritance will get rid of A LOT of the code within the files, but as long as you have custom pages, you'll need the files. Dynamically adding controls can help with some reusability, but in the end its often not worth the headaches...

0 comments:

Post a Comment