Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


suPerlative: Summary

The scripts were developed over a period of 3 years, mostly by myself and more recently by Lucy. So yes, there's quite a lot of person-hours behind them.. We spent a lot of time coding Perl instead of HTML, but once a script works you can use it over and over to create HTML pages, so we gained a lot of 'leverage' (an overused buzzword, IMHO).

How do we carry out global updates ? It depends; the site map is created by cmap.pl and so that's the one that needs to be run to update the site map, while the Authoring page is created by ht - as are most other pages. However, both programs use the ht subroutines so the changes e.g. in the URL of a menu item, need to be made in one place only (ht_subs.pl).

Let's suppose I want to change something globally, e.g. move the navigation menu from the bottom of the page to the right margin (there are reasons why this is better than the left...). I would edit ht_subs.pl and then go to the root directory of the web document tree, and say 'find . -name "*.ht" -print>htt' - this would create a list of all the .ht files (nearly 1500) we have, in the file called 'htt'. I would then edit this file to put 'ht ' at the beginning of every line (:g,^,s,,ht , in vi), ensure it has execute permission (chmod +x htt) and run it.

That procedure could be streamlined a little - I could code most of it directly into ht for example - but it's already fairly simple for anyone comfortable in UNIX, vi, and Perl. Anything else would really be syntactic sugar for novices, but if I get any indication that there are some novices (or even veterans) who would appreciate the extra automation, then I'll look into it.

That would get most of our pages; the remaining 100 or so are updated by the other procedures described, e.g. for the Vlib and the Glossary. Updating the whole site (1600 pages) for a global change such as changing a menu item, takes only a few minutes; ten at the most.. When Mecklermedia bought the site, I moved it to their servers in less than half a day - which amazed them. Now I had not only to change the ad banner links, copyright and legal notices, but also the scripts, because their directory structure was slightly different (hey, that's UNIX..).

I'd be interested to hear if anyone has had similar experiences with commercial systems. I shudder to think of all that pointing and clicking they might need to do comparable changes such as I described - but perhaps I'm mistaken. But it seems to me that if you can actually generate a whole site from scripts, you can do almost anything in a relatively short time. But, this approach is really only good for skilled programmers.

This article described our home-grown Perl scripts, all of which are available for download. Note that many of them require ht_subs.pl. This software is provided freely on the understanding that the Author will not be held responsible for any problems arising from it's use, and that there is no support. We wrote it for our own use, and you may well have to hack it to suit your own needs. If you make any general improvements please feed back the new code, we will credit you in the source.

suPerlative: Downloading, Installation, and Usage
suPerlative Web Construction !

Please note that we offer no support for these scripts, and we accept no liability for any problems they may cause.



Up to => Home / Software / Perl




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers