Logicept's Back-End Implementation for Seniors.comby Howard Wen
Seniors.com is a portal providing current and useful information for men and women, 50 and over. With more than 10,000 registered users, many of whom visit the site daily, Seniors.com needed an extensive list of standard Web-portal features like user registration, user login, discussion forums, site navigation, and newsletter distribution. So Seniors.com hired Logicept Corporation last year to create and implement the enormous technical back-end that provides content management, user and site administration, and user interaction. And all of this was built entirely with Perl.
Based in Brooklyn, New York, in the shadow of the Manhattan Bridge, Logicept is a Web development and graphic design firm that specializes in using open source technologies for Web applications. "We've embraced Perl, PHP, Apache, and Linux since our inception," says Jaron Rubenstein, one of the company's founders and its Director of Technology. Aside from managing the Logicept development team, he selects implementation technologies and development platforms. At Logicept, he has used Perl and other open source technologies for over five years.
While the company has been using Perl for automating Linux server administration and for software development, it wasn't until the Seniors.com project that Logicept decided to use Perl instead of PHP or other technologies for the implementation of a large-scale Web application.
Rubenstein says the selection of Perl for the redesign of Seniors.com was made based on the decision to use Mason, a collection of Perl modules that form a powerful Web site development and delivery engine. Mason allows Perl to be embedded in HTML and allows pages to be constructed by shared, reusable components.
For Logicept, using open source software has always been a natural and comfortable choice since the company's business has revolved around using open source technologies. But it was the Seniors.com people who suggested using Mason for their site's redevelopment. "Prior to Seniors.com, we hadn't explored the Perl/Mason combination and the power of its component-based architecture," Rubenstein said. "Although we had heard of Mason, we had not done any in-depth research or prototyping with Mason until we began meeting with Seniors.com."
Thanks to Mason, Perl turned out to be the right tool for making the new Seniors.com work. By encapsulating code into Perl modules, and using Mason's component-based architecture, Logicept's programmers were able to create a Web portal that could be easily enhanced and modified. "This same code base can be retooled for use in other subject areas," says Rubenstein. Code versatility was one of the goals that Logicept wanted to achieve in order to make its work on Seniors.com more efficient, and this was possible due to Mason.
Additionally, using several off-the-shelf CPAN (Comprehensive Perl Archive Network) modules, Logicept was able to minimize development time while maximizing functionality. In fact, Rubenstein found that everything he could ever want or need in a Perl module already exists on CPAN.
Still, one category he thinks might benefit from further advancement is Perl recipes. "Perl Cookbook filled a gap for programmers looking for canned examples of code. A similar Perl module, containing such libraries of code, might find a large user base," he suggests. "A module that contains a large set of commonly used, regular expressions (such as phone numbers, dates, times) for input checking, and format coercing, would be a great timesaver."
One example of how such a module would have helped Logicept even more with its work on Seniors.com was in checking on and validation of user input. "We wanted to ensure that all user data input was in an acceptable format and that we were inserting clean data into the database. In one area, we asked for the user's zip code. While it's trivial to write a regular expression to check that an input string is a valid zip code, it would be nice to have a library of such functions that can be even more easily called," Rubenstein says.
But, for other developers who are considering designing a Web application with Perl on the same scale as Seniors.com, Rubenstein's praise for Mason is his strongest recommendation. "I personally wouldn't attempt a large-scale Web project in Perl without the use of Mason," he attests. "Mason provides a framework that is ideal for the development of medium- to large-scale Web applications. For Seniors.com, the combination of Perl's object-oriented capabilities and Mason's component-based architecture provided a highly versatile Web application development platform."
Learn how large and small companies are putting Perl to work by reading more Perl Success Stories.