How do I organize my include files?

Results 1 to 3 of 3

Thread: How do I organize my include files?

  1. #1
    Join Date
    Dec 1969

    Default How do I organize my include files?

    I need some direction in ASP application functionality organization. That is to say, what method would you all use to organize commonly used subs and functions as well as the global variables used by them? Should I:<BR><BR>A. Group the modules with common or related functionality into a smaller set of include files that can be distributed across other websites?<BR><BR>B. Isolate each module into it&#039;s own include file, thereby avoiding the "Where is it" problem that could be faced in using "A".<BR><BR>C. Follow the same methodology in "A" but add an acronym to the beginning of each module that indicates where the module&#039;s code can be found. For example file CST_CommonServerTools.asp would hold CST_GenerateDropdown module.<BR><BR>D. Follow the same methodology in "C" but add a more descriptive name to each module. For example file CommonServerTools.asp would hold the CommonServerGenerateDropdown module. This would prevent an instance where you have two include files with the same acronym. <BR><BR>E. Other __________________________.<BR><BR>What do you all think?<BR>

  2. #2
    Join Date
    Dec 1969

    Default it all depends...

    for instance, i do use include files and the way i do it is,i use seperate file for db connection, seperate file fro common vbscript functions and other seperate files which i will need across only a few pages, and yet another set of pages for html include in top and bottom of the page. <BR><BR>In some pages u will not need connection page but the common it depends on ur requirement. You can also decide to have all code in a single include page also, but it will increase the page to u to decide on it. on a whole it would be better if u have seperate pages that differ in their functionality ad for what the include will be used!!!

  3. #3

    Default RE: it all depends...

    How you name and where you place include files is closely related to your semantics.<BR><BR>The names of your include files should communicate what they do, they should be general enough that they are in one common folder for the entire site.<BR>You should generaly separate code includes from markup includes.<BR>Try to avoid executing code in includes, it can be hard to trace, create functions/subs and call them from your main page.<BR><BR>For a working example, look into the Retail Solution Site for MS Commerce Server 2k.<BR><BR><BR><BR><BR>

Posting Permissions

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