What I mean by this is that it separates the functional requirements of an FTP server from the actual implementation of those requirements, thereby allowing numerous and flexible means of handling the functional requirements.
It provides two means of connecting the perceived behavior of the FTP server to the actual means of implementation - hooks and subclassing. By hooks, I mean small subroutines which are called at various phases of FTP service processing (ie, pre-connect, post-connect, pre-login, post-login, pre-command, post-command, pre-transfer, during-transfer, post-transfer) which provide control of the service process. These hooks are methods whose implementation can be over-ridden in subclasses to provide almost any type of desired functionality at any phase of processing.
On one assignment, for example, we over-rode the authentication hook so that we could use our database of users for authentication. We also over-rode the file-listing and directory-changing methods so that we could list files on two remotely networked repositories but still provide a single FTP front-end to them.
When you are thinking of designing a scaleable , customizable piece of software, be sure to download Net::FTPServer and take a good look at its architecture first.
|
|---|