Revision 454 (by dpavlin, 2004/09/15 22:36:23) new simplier implementation of WebPAC::Tree with support for recursion
(still buggy)
=head1 NAME

Quick overview of things that are new in v2.x of WebPAC

=head1 Changes from version 1

This document will describe new features in WebPAC version v2.x.
It will also attempt to document upgrade procedure to migrate
WebPAC v1.x installations to new v2.x.

=head2 Input file handling

Database files are now read in memory (using swap if not enough
memory is not available) and used from there.

Also, in-memory structure will be dumped to temporary disk
cache, so that unchanged databases won't be re-read (and parsed) if source
database hasn't changed. Nice consequence of this is that memory lookups
are now for free (see below).

=head2 Two-step processing of databases

In first step database is read and in-memory structure is created (or
read from on-disk cache if source database hasn't changed).

In second step output formats are created.

=head2 Lookups

For a start, lookup files are no longer supported. Since memory lookups
are newer and more powerful (for example, each key can have more than
one value) it's not a great loss. However, you will have to re-write
your C<import_xml> files if you use lookup files to use memory lookups.

Lookups B<are not> specified by C<[v900^4]> as in v1.x. Now, you have
to use something like C<lookup{v900^4}>. Recursive lookups are also
possible: C<lookup{foo:lookup{v900^4}}>.

Memory lookups (referred as lookups for new versions of WebPAC) are now
always available. Since whole database is available when creating
output linking should be much easier now.

However, using new lookups require to define lookups in different way.
Additional benefit of that is conditional insert into lookup using eval
(TODO: explain new lookup format).

If you have any lookups in your tag (e.g. <isis>lookup{v900^5}</isis>)
smart delimiters will be turned off (this behaviour is consistent with
old in v1.x if you use C<type="lookup*"> or C<filter="mem_lookup">).

=head2 Field definition in C<import_xml>

Field definitions in C<import_xml> files has changed. Previously, you could
write something like C<250a> and expect to get data from field B<250> subfield
B<a>. Now you have to write C<v250^a> which is more ISIS-like and easier to
parse. Don't be afraid, there is migration script in C<import_xml> to do
this task for you.

=head2 Templates

Templateing engine has changed. WebPAC doesn't use C<HTML::Template> anymore,
but Template Toolkit. TT proved to be workhorse for many tasks
and limitations of C<HTML::Template> forced me to move from it.

For you, the user, that will result in changes to all templates. I'm sorry
about this, but it had to be done.

=head2 Order of substitution

This was never really documented, so here it is now:

=over 5

=item fields

substitution of fields like C<v200^a> into values

=item lookups

next, lookups are performed (C<lookup{...}>)

=item format

then formats (defined by C<format_name=> and C<format_delimiter=>) are
applied. If formats have lookups, they will be performed again.

=head1 New features of version 2

Here are new features which didn't exist in version 1.

=head2 Documentation

Code is well documented using C<pod>.

=head2 Baking as opposed to cooking your WebPAC

It's possible to create searchable WebPAC completely static, from HTML and
JavaScript, so you can burn it on CD-ROM.

This was original reason for writing version 2 in the first place.

=head2 Tree structures for data display

See L<WebPAC::Tree>.

=cut