p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: Best Practices


Message #1 by "Ben Smith" <ben@b...> on Tue, 14 Aug 2001 14:39:52 +0100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Ben Smith" <ben@b...>
Subject: [proasp_howto] Best Practices


: I was wondering, in terms of coding best practices and
: in terms of the fastest approach, is it best to keep all one's
: repeated code in a common.asp or to keep it in various
: includes and include them when required.
:
: I realise that the common.asp could get quite big and
: not every part would get used but I was also unsure
: about including something like 7 includes!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Only 7 includes? <grin>

All the included code is in routines right? (subs and functions?). I'd group
them by type, and include only those files required. Including a dozen files
isn't a problem - layout though is key, so your page doesn't become a mess:

<% @Declarations here%>
<% Option Explicit %>
<!-- #include files here -->
<%
ASP event driven code here
%>
<html>
    Presentation here
</html>

Also, I can not say how strongly I agree with Aaron - includes that include
more includes are a sign of bad code organisation in my books...

Cheers
Ken


  Return to Index