Application::Firewall - Input Validation as a Middleware

My recent exposure to Node.js (the non-blocking server-side JavaScript Event framework) (which because of its nature uses all plugins as middlewares), got me thinking about approaching the issue of input validation as a middleware in my own non-Node.js applications.

Most modern web application frameworks allow its developers to specify hooks that execute specific functionality before a route is executed and rendered. This is an ideal place to insert site-wide input validation rules. Many snazzy input validation frameworks or libraries allow its users to design input validation profiles which promotes code reuse which is good.

I myself have developed an input validation framework for Perl (Validation::Class) which I use in a few active perl web applications. As stated in the documentation:

Validation::Class is a different approach to data validation, it attempts to simplify and centralize data validation rules to ensure DRY (don’t repeat yourself) code. The primary intent of this module is to provide a simplistic validation work-flow and promote code (validation) reuse.

… read more here

1 Comment

Hi Al

Sounds very much like this marvellous module:

Brannigan.

Leave a comment

About Al Newkirk

user-pic ... proud Perl hacker, ask me anything!