John Sequeira

Amped::Technology
John Sequeira's weblog: enterprise application development, typed weakly.

Friday, August 09, 2002


Amy Wohl: "So far, Sun has never been a smart and persistent seller of software. Scott has, in fact, been their own worst enemy, telling me on many occasions that software exists for the purpose of selling hardware. Maybe he's now changed his mind. That would be a good first step."  [Scripting News]
6:16:14 PM      comment []  trackback []


Aaah, Perlscript

I'm doing some ASP based work, and I've been doing all the new code on the site using Activestate's Perlscript. There've been a few hiccups, where built in ASP functionality hasn't worked quite the same way, but overall I've been very happy with it.

Using Perlscript as opposed to VBScript, it's a heck of a lot easier to well factored pages that use business objects (.pm files) that have xcopy deployment, implement MVC using the aforementioned business objects and the excellent Template Toolkit, and you get a host of excellent web page generation widgets in the expansive CGI.pm. Database interaction is a breeze using DBI and it's built-in utility functions, compared to the clunky Field("").Value calls and horrendous concatenation functionality of VBScript. In each of the examples above, many lines of VBScript or VB.NET collapse into a concise perl idiom.

Some of the reports have been business intelligence-type stuff, where you have a multi-level information hierarchy (Customer->Dollars->Product->Day being a typical one.) The code to produce nested data structures in Perl is too easy in the sense that it's easy to make mistakes and reference something incorrectly. But there's an incredibly smaller amount of code to do the same type of work wrt VB and it's ilk, and once the data structure has been set up, knocking out the report XHTML is a breeze with Template Toolkit (which hides the bulk of the awkward perl/object syntax.)

In addition, using Win32::ASP, the actual amount of ASP code in the pages becomes quite small, making a port to Apache or even Perl.NET a straightforward endeavor. This also allows me to prototype and run the more complicated scripts in Perl from the command line, using the step-debugger if necessary. And I get to do this without ponying up the big bucks to become dependent on an IDEsolution like Visual Studio.NET, which often wedges IIS, forgets version control settings, and pretty much brings any machine older than 1.5 years to a standstill with memory and CPU requirements.

(VS|ASP|VB).NET offer some amount of catch-up on the features above, but I find they still lag pretty far the code I can easily generate myself with free tools in terms of learning curve (pod vs. 10Gigs of compiled html help - ugh), time-to-market, maintainability, testability and ease of customization.

I'll admit, there are times when it's good to use a typed language like what you get with .NET ( it's helpful in the business objects, for instance ) And I've looked into the many ways to add this back in to Perl, but there are so many options, none of which seems to have much mindshare ( perl and typing mix like oil and water ), that I haven't really got beyond the judicious use of Carp::Assert assertions to make my code more bulletproof. I'd like to add in some more design-by-contract functionality and have named/required and/or typed arguments to some subroutines ( I'm mostly stealing these ideas from OpenACS ). But for now, I'm appreciating the ease in overloading inherent in being free of type restrictions.
5:50:05 PM      comment []  trackback []



Why Lindows Won't Matter?

News Flash! Experienced users won't buy a linux distribution that is being marketed to inexperienced users:

http://www.extremetech.com/article2/0,3973,440900,00.asp

(You can probably just skip the link)
5:50:05 PM      comment []  trackback []


© Copyright 2005 John Sequeira.
 
August 2002
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Jul   Sep

Click to see the XML version of this web page.
Click here to send an email to the editor of this weblog.
Yahoo: johnseq2
MSN: john_seq@hotmail.com
AIM: amped02139
Skype: johnjulian