in reply to Re^2: Model-View-Controller: Template Toolkit vs. XSLT
in thread Model-View-Controller: Template Toolkit vs. XSLT

CGI::Application does many other things than "a giant if/elsif/else statement" -- and it doesn't even really do that. (It implements a hash-based dispatch table that maps a query string to a method; if no match is found, it uses a default as specified.)

What does CGI::Application do?

If used correctly, CGI::Application can be used as a very good Controller for an MVC setup -- have it simply do the work of validating and sanitizing input, passing it to the Model, and piping the Model's return values to the View (a templating system).

What I like most about it is that, at it's core, it's a very slim piece of code that simply stays the heck out of my way as I build my applications -- no extraneous doodads or geegaws are loaded unless I specifically do so myself.

Yes, it's another dependency, but it has very little overhead and benefits that outweigh the dependency a thousandfold.

  • Comment on Re^3: Model-View-Controller: Template Toolkit vs. XSLT