Perl Frameworks

April 4, 2011 Leave a comment

What’s the best way to write a CGI application in Perl?
Absolute answer is, using Perl Framework. There are many frameworks available with or without MVC architecture empowered. You can get a list with comparison in this link.

My personal choice is to go with CGI::Application since its very light-weight and easily maintainable. Templates can be designed using amazing perl module called HTML::Template. I found this framework magical mainly for AJAX calls using jQuery along with CGI-Application-Plugin-AutoRunmode module.
If you have existing perl code using CGI::Application and want to migrate the same to mod_perl environment, there is a CPAN module (CGI::Application::Plugin::Apache) available to do so.

You can refer to this tutorial to start using the CGI::Application. Enjoy coding!


jqGrid =TableSoter+Pager+Filter+Colorize UI plugins !!

March 19, 2011 Leave a comment
Recently in one of the projects, client requirement was to represent the huge data in a very dynamic interactive table view. Even though jqGrid was my first choice, it was bit complicated to incorporate all the html formatting rules inside the logic.jqGrid definitely has tons of built-in features, but the UI customization is not easy to implement and it has lots of rendering issues.

The solution I adapted was using the combination of jQuery plugins – Table Sorter,Pager, Filter and Colorize.  By interconnecting those plug-ins, application could get the exact similar grid view with sorting, paging and searching capabilities as well as dynamic formatting.

Sample Call:

$(document).ready(function() {
widthFixed: false, widgets: [‘zebra’] <– Provide Default Sort_Order here –>})
.tablesorterPager({container: $(“#pager”),positionFixed : false})
.tablesorterFilter({ filterContainer: $(“#searchFilter”),
filterClearContainer: $(“#filterClearOne”),
filterColumns: [0, 1, 2, 3, 4, 5, 6,7,8,9,10,11],
filterCaseSensitive: false
$(“#header”).click(function() {

Used jQuery plug-ins:
(1) jQuery TableSorter-2.0.3
(2) jQuery Metadata
(3) jQuery Colorize
(4) jQuery Pager

Note: With the new version of jqGrid 3.5, external css files can be called.

Categories: jQuery Tags: ,