 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 22nd, 2006, 09:21 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP to ASP.NET
Hi guys we are trying to migrate from asp to ASP.NET, we currently have around 500 ASP files. We are going towards code-behind and my question is how would we structure the application, i mean once the application is finished i can imagine VS2005 taking forever to load. Currently the proposed solution is to have a Solution file with a web site inside it and subfolders within these containing our aspx files.
thanks
|
|

August 22nd, 2006, 10:07 AM
|
|
Friend of Wrox
|
|
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP.NET 2.0 no longer uses solution files, or at least not overtly, and not for production purposes (I think its only to hold VS2005 preferences, breakpoints and what files you left open).
Also, I wouldn't assume that because your ASP implementation has "500" files that your ASP.NET implementation will as well. It's been my experience that ASP.NET applications have far less code than ASP applications.
The only performance problems I have experienced with Visual Studio 2005 is with VS itself. It's a huge pig on memory. I upgraded my desktops memory to 2 GB and I've been fine ever since. My coworker is finishing a project now with hundreds of classes and web forms and has experienced no performance problems (and we use modest low end Dell Optiplex's). I think the key is having enough memory. With 2 GB I am able to have a few projects open at a time without any noticeable slowdown, plus Photoshop and Outlook and everything else.
Neil Timmerman
Programmer II
School of Medicine
University of Missouri Columbia
|
|

August 22nd, 2006, 10:33 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you for you post, as a recommendation, how would you structure these files.(p.s. at the moment we have around 900 asp files, i belive moving to .NET will bring this down to 500, we have a massive application and even using generic code i still strongly belive this will be around the 500 figure, every screen is different with differencet business logic,hence the number of files.
but i would be intrested from your expericence how you would structure this. at the moments its as follows:-
A
B
C
D
E
etc
the letters refering to directories (subsystems)that hold asp files.
|
|

August 22nd, 2006, 03:59 PM
|
|
Friend of Wrox
|
|
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Well for one thing, with ASP.NET you are definitely encouraged to separate your business logic from your presentation teir. Even the code behind of the web forms are not the "best practice" place for business or data access code. In reality if your project is small it's fine, but for a project with hundreds of business classes, I think you definitely should keep your presentation, business, and data access code seperate.
ASP.NET has some "special folders" that are designated for a purpose. One such folder is "App_Code", which is the appropriate place for your data access and business classes. All classes in this special folder are globally accessible to the rest of the project files.
Also you mentioned that you estimate the need for 500 ASP.NET pages based on there being that many different "screens". However, ASP.NET 2.0 has some web controls such as panels, MultiViews, Wizards, and User controls you might be able to consolidate some files, but still have different screens. Theres a bit of style choice there depending on what you prefer.
So as far as your question about how to structure the directories, I guess without knowing more off the top of my head I would do something like:
Bin
App_Code
BLL
DAL
Stylesheets
JavaScript
WebFormGroupA
WebFormGroupB
WebFormGroupC
WebFormGroupD
WebFormGroupE
etc.
Neil Timmerman
Programmer II
School of Medicine
University of Missouri Columbia
|
|

August 23rd, 2006, 11:16 PM
|
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I believe you will end up with even less files that that. I inherited (don't you hate inheriting headaches) a ASP written portal. Imagine how many asp files are in the mother hehe. Most of the aps files were just files holding more script like they were class files hehe. It also had other apps on there written in a combination of VBScript and JScript. I cannot give you file count but it made me believe there was no end. I was told to update this site to ASP.NET. It took me almost a year but I converted that bad boy to ASP.NET with C#. My file count dropped to less than 1/4 of what it was before. Either it was because of over file usage or what but it did drop alot. Version 2 dropped even more when I used some of the more advanced controls to drop code count and attempt at more performance. Version 3 actually increased but that was because I AJAX'ed the site to make it more rich. Final version was Atlas controls and removing the adhoc AJAX script I wrote.
You will be quite suprised how much less code you will have. Over time you will end up writing classes that can be used across your app cutting down alot of repetitive code. Controls that encompass alot of what you normally would have to write. Best thing of it all is I made it so simplistic, I was able to give it off to someone else to carry on while they threw me at other conversion projects. It isn't just controls and commands that will reduce your code but in the middle you may have a change in logic due to the more robust framework. If I am still posting here in a year, let me know how many files are in your .NET version.
|
|
 |