tercoz has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: web applications: what is the correct way to realise web applications
by pajout (Curate) on Dec 30, 2011 at 10:00 UTC | |
by tercoz (Acolyte) on Dec 30, 2011 at 14:05 UTC | |
by pajout (Curate) on Jan 02, 2012 at 10:11 UTC | |
|
Re: web applications: what is the correct way to realise web applications
by Anonymous Monk on Dec 30, 2011 at 07:29 UTC | |
by tercoz (Acolyte) on Dec 30, 2011 at 14:00 UTC | |
by Anonymous Monk on Dec 30, 2011 at 21:07 UTC |