I am writing a website.
I use CGI, HTML::Template, CGI::Sessions, DBI
my working www folder structure is
cgi-bin : contains all *.pl scripts
html : html, pictures, JS, CSS
SQL : *.sql files to create databases, and play with queries
templates: all html/css templates of the application
the logic of work is next:
When I want to register I run register.pl, which uses query->prepare("sql query") functions to write to the db inside this script, create session with sessions.pm, show register form with register.tmpl template.
When I want to show admin form I run admin.pl which does the whole job, sessions control, database operations, it shows admin form and so on
So the logic is that each separate pl file is responsible for his own single page of my website
Question: why do I feel that this method of writing web site (web application) is not normal, and how to write web application with correct arhitecture? What -is- correct arhitecture?
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |