Directory Hierarchy

Results 1 to 2 of 2

Thread: Directory Hierarchy

  1. #1
    Join Date
    Dec 1969

    Default Directory Hierarchy

    Not knowing what is all involved in creating full fledged portals via ASP and C#, what is an appropriate directory hierarchy? In C, it was fine to do the following:<BR><BR>/u/<BR> MyCompany/<BR> Libraries/<BR> LibraryA.a (A linkable library for all applications)<BR> LibraryB.a (A linkable library for all applications)<BR> src/<BR> LibraryA/<BR> (Source code for LibraryA)<BR> LibraryB<BR> (Source code for LibraryB)<BR><BR>/u/<BR> MyCompany/<BR> ApplicationA/<BR> bin/<BR> All executables for ApplicationA<BR> src/<BR> ProgramA/<BR> (Source code for ApplicationA&#039;s ProgramA)<BR> ProgramB/<BR> .<BR> .<BR> ProgramZ/<BR> (Source code for ApplicationA&#039;s ProgramZ)<BR><BR>It was easy with C to identify the building blocks and organize the directory structure as such. But with ASP and C#, I might be writing a portal web application. This portal will certainly contain many different web pages and allow the user to go to many different pages. Any of which could have their own source code. <BR>What is the standard here when organizing this type of source code. Do I have one directory for the entire application and put all of the .cs and .aspx files in the one directory, or like in &#039;C&#039;, should I create a different directory for each web page and have that page&#039;s source code there?<BR>It seems that the latter would be the best, but unlike &#039;C&#039;, each of these different web pages within the portal application are all part of the same program, sharing data and resources.<BR><BR>Please help an old &#039;C&#039; programmer trying to stay organized in the new world of C#.<BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default My fellow C developer...

    what i do is logically group files... say you have a couple of files that all have to do with a user... say a user collection and a user class, and say you put those in different files...<BR><BR>i&#039;d have:<BR><BR>User/<BR> User.cs<BR> UserCollection.cs<BR><BR>these would both be in the namespace "User" so, to define a new user, you&#039;d say<BR><BR>User.User user = new User.User();<BR><BR>or<BR><BR>using User<BR><BR>class a{<BR> ...<BR> User user = new User();<BR>}<BR><BR><BR>as for web pages and file heirarchy... i don&#039;t know a good way to do it.... you can have files in folders based on sub application (you app would be the web page, sub apps would be like a store, forum, contact form, etc)<BR><BR>however, don&#039;t upload your cs files because, although iis won&#039;t allow them to be downloaded, they aren&#039;t needed after you compile the dll. you upload the dll into the bin folder and upload all of your aspx files, then you are good to go. good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts