summaryrefslogtreecommitdiff
path: root/fml/doc/en/tutorial/internals/cgi.examples.sgml
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-07-27 12:21:35 +0000
committerfukachan <fukachan>2005-07-27 12:21:35 +0000
commit02f0eb5231edfb665704bd0cfd9bfbe5ec59fae1 (patch)
treea1a9302fc1d5d74b41fe5659504c59501e2f5ab9 /fml/doc/en/tutorial/internals/cgi.examples.sgml
parent1a4284d5533f07c7b4828a5283281e95b8bd3f3e (diff)
downloadfml8-02f0eb5231edfb665704bd0cfd9bfbe5ec59fae1.tar.gz
fml8-02f0eb5231edfb665704bd0cfd9bfbe5ec59fae1.tar.bz2
fml8-02f0eb5231edfb665704bd0cfd9bfbe5ec59fae1.zip
sync and translated.
Diffstat (limited to 'fml/doc/en/tutorial/internals/cgi.examples.sgml')
-rw-r--r--fml/doc/en/tutorial/internals/cgi.examples.sgml125
1 files changed, 125 insertions, 0 deletions
diff --git a/fml/doc/en/tutorial/internals/cgi.examples.sgml b/fml/doc/en/tutorial/internals/cgi.examples.sgml
new file mode 100644
index 00000000..bf10702d
--- /dev/null
+++ b/fml/doc/en/tutorial/internals/cgi.examples.sgml
@@ -0,0 +1,125 @@
+<!--
+ $FML: cgi.examples.sgml,v 1.3 2005/06/25 15:11:33 fukachan Exp $
+-->
+
+
+<sect1 id="cgi.internal.example.isa">
+ <title>
+ CGI implementation: inheritance among CGI classes
+ </title>
+
+<para>
+@ISA of config.cgi follow:
+<screen>
+FML::CGI::Menu FML::Process::CGI::Kernel FML::Process::CGI::Param
+</screen>
+In the case of thread.cgi, @ISA is
+<screen>
+FML::CGI::Thread FML::Process::CGI::Kernel FML::Process::CGI::Param
+</screen>
+</para>
+
+<para>
+.cgi specific codes locate at FML::CGI:: class layer.
+</para>
+
+<para>
+FML::Process::CGI::Kernel provides the main part of CGI process
+and CGI specific function run_cgi_XXX().
+If needed, FML::CGI:: class overloads this layer.
+Currently,
+the following methods in FML::Process::CGI::Kernel are not used.
+<screen>
+run_cgi_log
+run_cgi_dummy
+run_cgi_date
+</screen>
+</para>
+
+</sect1>
+
+
+<sect1 id="cgi.internal.example.config.cgi">
+ <title>
+ CGI Implementation: config.cgi
+ </title>
+
+<para>
+@ISA of config.cgi is as follows:
+<screen>
+FML::CGI::Menu FML::Process::CGI::Kernel FML::Process::CGI::Param
+</screen>
+Let see processing of config.cgi below.
+</para>
+
+<para>
+config.cgi process object $curproc is a
+FML::Process::CGI::Kernel class.
+<screen>
+ new()
+ prepare()
+ verify_request()
+ run()
+ finish()
+</screen>
+is sequentially called from FML::Process::CGI::Kernel class.
+</para>
+
+<para>
+run() is important. run() executes the following methods sequentially.
+<screen>
+ $curproc->html_start(); (FML::CGI::Menu)
+ $curproc->_drive_cgi_by_table(); (FML::Process::CGI::Kernel)
+ $curproc->html_end(); (FML::CGI::Menu)
+</screen>
+_drive_cgi_by_table() prepares the screen.
+This function calls the main part of CGI.
+</para>
+
+<para>
+$curproc->_drive_cgi_by_table()
+calles the following run_XXX() methods.
+<screen>
+run_cgi_main (FML::CGI::Menu)
+</screen>
+calls cgi_execute_command (FML::Process::CGI::Kernel) to
+execute FML::Command::Admin::$COMMAND via FML::Command class.
+This is the main part of command execution via CGI but
+the screen creation is a role of another part.
+</para>
+
+<para>
+For example, consider subscribe an address via CGI.
+run_cgi_main() executes the real process of subscription.
+Instead run_cgi_menu() creates input menu.
+Former calls FML::Command::Admin::subscribe::process() method,
+latter calls FML::Command::Admin::subscribe::cgi_menu() method.
+</para>
+
+<para>
+There are several other run_cgi_XXX() methods. They are optional for
+screen creation.
+</para>
+
+<para>
+The following run_cgi_XXX() uses the default method.
+<screen>
+run_cgi_title FML::Process::CGI::Kernel (show title)
+run_cgi_options FML::Process::CGI::Kernel (show language selection)
+</screen>
+.cgi specific methods are as follows:
+<screen>
+run_cgi_navigator FML::CGI::Menu
+run_cgi_help FML::CGI::Menu
+run_cgi_command_help FML::CGI::Menu
+run_cgi_menu FML::CGI::Menu
+</screen>
+</para>
+
+<para>
+run_cgi_menu() executes
+FML::Command::Admin::COMMAND::cgi_menu()
+via cgi_execute_cgi_menu() method.
+</para>
+
+</sect1>