tags:

views:

40

answers:

1

Hello,

Something I have always had problem with is structuring my web applications. When I was learning PHP at college a teacher used to have the PHP in a separate file to the HTML and he then included the PHP file at the top.

How does everyone else structure there applications (web or not).

This is an example of my latest web application (coded with ASP classic).

Base Directory - Default.asp - Common -- commonProcedures.asp -- commonFunctions.asp -- databaseConnection.asp -- main.css - Pages -- Layout --- pageTestPageOne.asp - Being the HTML. --- pageTestPageTwo.asp -- Processing --- pageTestPageOne.asp - Being the ASP. --- pageTestPageTwo.asp

Many Thanks, J

A: 

Your structure looks okay. On my previous job we had a very similar structure for an classic ASP site.

One thing we did different was to name all modules .inc to distinguish them from the base page (Default.asp in your example).

Keeping this structure allows you to reuse most of the code when creating language specific versions of your site - or even a clone or a spin-off.

Filburt
Thanks filbert- never through of using a .inc file!
J Harley
@J Harley : You're welcome. Using .inc allows you to configure IIS to reject serving modules called directly, adding a bit of security.
Filburt