E Apache Mod_perl
Perl.com: Buildling a Large-scale E-commerce Site with Apache and mod_perl 2001Apache/mod_perl/CPAN
By Perrin Harkins (Translated by Tatsuhiko Miyagawa e C++ Java () e Perl CGI Perl Programming Perl O'Reilly Perl Perl Apache Apache, mod_perl CPAN (Comprehensive Perl Archive Network) making you limited only by your team's abilities. 1999 eToys MySQL CGI CGI Perl4 MySQL Oracle DBA 8 Media Metrix eToys eBay, Amazon 3 e 2000 HTML Perl Randal Schwartz Damian Conway 3 1 3e- Intel Web ( ) f5 Networks IMB NUMA-Q DYNIX/ptx 1 C++ Perl ID HTML Web ID Perl Oracle Perl CPAN 1 ``sticky'' f5 cookie e SmallTalk Web Model-View-Controller MVC 3 Model API HTTP HTML cron Web Controller Web Model Model View HTML View HTMLController Model View View Web Template Toolkit Perl ``time-to-live'' Berkeley DB CPAN Storable IP C 1 2000 99% Expires NFS HTTP cookie ID e ``!'' SSL ``''( ID) cookie Message Authentication Code (MAC) CPAN HTML URL CPAN Randal Schwartz MAC Web O'Reilly CGI Programming with Perl, 2nd Edition Writing Apache Modules with Perl and C Java Perl Java CPAN Graham Barr Error Perl Perl Error syntactic sugar 1DBI DBI RaiseError try Error DBI Error HTML CPAN Template Toolkit Perl Template Toolkit HTML Perl HTML ! Template Toolkit Perl Mason & co-branfing Template Toolkit : Model-View-Controller Hello World Controller Model Model Model ID Perl OO save Model Hello World View :
mod_perl
Perl Apache Perl Java Perl
Apache::PerlRun
CGI mod_perl
CGImod_perl
() Apache::DBI
mod_perl
Oracle
mod_perl
Linux Linux Linux
mod_perl
Apache Apache Apache Cookie mod_session 1 400 Apache HTTP Network Appliance filer NFS mod_perl
( ) mod_perl
mod_perl
http://perl.apache.org/guide/
mod_perl
Berkeley DB Perl Web HTML NetApp filer NFS CPU 1GB RAM
Search::InvertedIndex
DBIx::FullTextSearch
ID
mod_proxy
URL mod_proxy
1If-Modified-Since mod_proxy
mod_session
ID ID ``sticky'' -- --
Digest::SHA1
seed MAC cookie ID Crypt::
Crypt::CBC
Stonehenge::Throttle
NFS 1
try { do_some_stuff(); } catch My::Exception with { my $E = shift; handle_exception($E); };
try { $sth->execute(); } catch Error with { # roll back and recover $dbh->rollback(); # etc. };
DBI
try{}
Apache::Registry
mod_perl
[% FOREACH item = cart.items %] name: [% item.name %] price: [% item.price %] [% END %]
package ESF::Control::Hello; use strict; use ESF::Control; @ESF::Control::Hello::ISA = qw(ESF::Control); use ESF::Util; sub handler { ### my $class = shift; my $apr = ESF::Util->get_request();
### model my $name = $apr->param('name');
# Model::Hello my $hello = ESF::Model::Hello->new(NAME => $name);
### view my $view_data{'hello'} = $hello->view();
# process_template() # ESF::Control $class->process_template( TEMPLATE => 'hello.html', DATA => \%view_data); }
ESF::Control
ESF::Control->run()
try{}
handler()
process_template()
Template Toolkit
HTTPController Last-Modified
Expires
package ESF::Model::Hello; use strict; sub new { my $class = shift; my %args = @_; my $self = bless {}, $class; $self{'name'} = $args{'NAME'} || 'World'; return $self; }
sub view { # view return shift; }
load()
Model save()
new()
load()
new()
bless load()
load()
: sub load { my $class = shift; my %args = @_; my $id = $args{'ID'}; $self = _fetch_from_cache($id) || _fetch_from_database($id); return $self; }
view()
Model Facade view()
0 コメント:
コメントを投稿