Tentative title: Modern CGI Applications in Perl
Ch 1: Common Gateway Interface
What is CGI? Perl good language for CGI. CGI not dead yet. (Advantages
over proprietary methods like java, .net) CGI.pm standard for perl CGI
programming (with example.)
Ch 2: Architecture of a CGI::App
Model-View-Controller design pattern explained. CGI.pm's inadequacy for
MVC. CGI::Application is a solution. CGI.pm example rewritten using
CGI::Application and contrasted. Basic CGI::App features (setup, teardown
runmodes etc.) introduced.
Ch 3: Run modes.
The central concept of run modes explained in detail. run_modes(),
start_mode(), error_mode(), mode_param() explained. The CGI::App
processing pipeline. setup(), teardown(), cgiapp_prerun(),
cgiapp_postrun(),
Ch 4: Templates
HTML::Template and all its features introduced.
Ch 5: Object orientation
The OOP nature of CGI::App discussed. cgiapp_init(). Plugins.
subclassing and mixins discussed. When to use each.
Ch 6: Processing Forms
How to do it with CGI::App. tainting and other security issues.
HTML::FillInForm. Data::FormValidator, C::A::P::ValidateRM
Ch 7: Database Integration
C::A::P::DBH, Implementing BREAD (or CRUD) with C::A::P::Bread,
C::A::P::DBIProfiler, SQL::Abstract, Data::Page discussed.
Ch 8: Sessions and Authentication
Cookies. CGI::Session and C::A::P::Session discussed and explained.
session id in url as an alternative to cookies. Authen and Authz
discussed.
Ch 9: Alternative Output
C::A::P::Stream. C::A::P::Gzip, outputting PDFs, CSV files or sending
email.
Ch 10: Further Enhancements to the Application
Some miscellaneous topics. The various plugins related to configuration
discussed and contrasted. Logging with C::A::P::LogDispatch. Validation
and clean HTML with C::A::P::HtmlTidy
Ch 11: Enhancing interactivity with AJAX
HTML::Prototype and C::A::P::HTMLPrototype
Ch 12: Alternative Templating
Template Toolkit and C::A::P::TT. C::A::P::HtDot, C::A::P::PageBuilder,
C::A::P::TemplateRunner, C::A::P::AnyTemplate
Ch 13: Testing and Optimizing the Application
Testing. Ways to speed things up discussed. Running under Apache::Registry for
modperl. C::A::P::Apache
Ch 14: Distributing the Application
Best practices for Layout of directories and resources (templates etc.)
Packaging a CGI::App for CPAN
Appendix A: Getting help
CGI::App wiki and mailing list
Appendix B: CGI environment variables
Appendix C: HTTP Error codes, headers and other relevant info.
阅读(516) | 评论(0) | 转发(0) |