 |
Requirements and Test Management kit
For effective test automation IBM Rational offers a team-based, test management solution set that includes requirements, test management and change management for streamlined test planning, test execution, and results analysis. In this kit you will find demos and articles on Rational requirements and test management tools and best practices.
»
Use Rational's Change and Release Management Solution in Your IDE
This demonstration illustrates how Rational® ClearCase®, ClearQuest® and Build Forge® can be used to help developers develop, build, and test their applications in the comfort of their IDE.
»
Using IBM Rational Tester for SOA Quality: Testing SOAP Secured Web Services
Learn how to test SOAP-secured Web services by using the IBM Rational Tester for SOA quality.
»
IBM Rational Testing Ekits
Access five complimentary kits for testers, developers and business domain experts. Each kit provides a collection of materials that can help you understand and use IBM Rational testing tools and best practices.
»
|
 |
|
|
|
|
|
suPerlative: The ht Preprocessor
|
ht is a pre-processor for HTML.
It facilitates the maintenance of a large site by abstracting
out common 'boilerplate' segments of code, e.g. header and
footer segments that are similar system-wide. A number of
varying styles and macros can also be supported.
|
Central to our operations is 'ht', which takes a simplified
HTML file and adds 'boilerplate' stuff such as banner ads
and navigation menus. ht files start with a header
such as:-
Title : suPerlative: The ht Preprocessor
Author : ALR
Abstract:
<b>ht</b> is a <em>pre-processor</em> for HTML.
It facilitates the maintenance of a large site by abstracting
out common 'boilerplate' segments of code, e.g. header and
footer segments that are similar system-wide. A number of
varying styles and macros can also be supported.
+++
Content :
Central to our operations is 'ht', which takes a simplified
HTML file and adds 'boilerplate' stuff such as banner ads
and navigation menus. ht files start with a header
<a href="HT.ht">such as</a>:-
It's wired with several standard conventions, such as author
abbreviations ('AR' for 'Alan Richmond') and table macros, and with styles.
There is a main program and several
subroutines, e.g. Head
and Foot, which are also used by most of our other scripts.
The benefits of using ht are:-
- Helps enforce consistency and uniform style.
- Writes valid HTML 4
code for the boilerplate.
- Enables abbreviation of common constructs, saving time.
- Facilitates site moves, as when we moved to the
Internet.com servers -
took much less than a day, which surprised the new owners..
- Facilitates global changes, e.g copyright year, navigation menus, etc.
- Figures out where it is, so that navigation uplinks can be appended.
I believe most people think you only have two choices for creating HTML
- use an editor or code by hand.
But there's a third one which works very well for us:
we use a (home-grown) preprocessor. If you like it's a variant of the
template method; we have a number of styles built in and can modify them
with some parameters.
ht
is a Perl
preprocessor that I wrote for maintaining The WDVL. It
allows me to write HTML without having to put on all the 'boilerplate'.
ht generates all the header, table and footer HTML... Using a
preprocessor such as ht provides much more flexibility than typical
HTML editors
(which anyway tend to generate bloated and unreadable code)
- for example I can easily change the site style by changing ht and
running source files through it.. (very powerful when combined with
style sheets).
An ht file looks like this.
You run the file through 'ht' and it sticks on the boilerplate,
modified if necessary according to the header parameters and with any
macros (abbreviations) expanded.
This makes it very easy to create HTML in one of our
standard styles, but you can also control
the end result
as much as you want
since the input can contain HTML. And it's also very useful for
our mirrors, e.g. there can be small differences automatically
introduced such as crediting the host or pointing to CGI programs on the
primary site because we don't have CGI access on every mirror.
With 1,500 pages to maintain this would hard to do with an editor..
We don't currently use a database but a logical extension of this
method would be to put the ht files into a database
and then we could generate
the pages dynamically, e.g. to account for browser differences.
This approach isn't for everyone but anyone who wallows in Perl and
HTML should love it..
Finally - ht also allows a small set of abbreviations; e.g.
<center>
@Prev(Why.html)
@Up(index.html)
@Next(Stats.html)
</center>
creates the following links:-
suPerlative: Why Perl Scripting?
suPerlative Web Construction !
suPerlative: Log File Analysers
To use ht, you need:
You would certainly need to edit the subroutines file to change or remove things like the list of author initials, and the navigation menus.
|