John ORourke пишет:

> Vladimir S. Tikhonjuk wrote:
>
>>
>> O.K. Thanks for answer :)
>> I want to write rather big project. How I have to construct it: I mean,
>> should I make a lot of handlers, like, /debitor, /debitor/documents,
>> /debitor/documents/contracts .... Or, create *.pl scripts. Or may be
>> there is another theory ?
>>  
>>
>
> Personally I use a more flexible approach - I don't want to have to
> put the whole website structure inside httpd.conf, because every
> change requires a re-start.  Also, you will probably have common
> startup and exit code in each handler.
>
> So you could try something like this:
>
> <VirtualServer>
>    ....
>    PerlResponseHandler My::Module
> </VirtualServer>
>
> then
>
> sub handler {
>    # common startup code - check database connection is up, check
> config has been read, etc
>    # check URI
>    if uri is for static files
>           return DECLINED
>    else
>           call the code for that URI
>    # common exit code - clean up etc
> }
>
> You could even do something really clever and make it map URI onto
> module - eg. so /debitor/contract/create calls
> Debitor::Contract->create(), but that wouldn't be very secure!
>
> John

Are there any tutorials about how to build the structure of the project ?

Reply via email to