Introduction to PPWIZARD, Part 1

By: Walter Metcalf
Date: 11/17/99

When I first became your Guide I was using a well-known WYSIWYG (What-You-See-Is-What-You-Get), or graphical, HTML editor. In the beginning that was a good choice as it enabled me concentrate on "learning the ropes" of being a Guide without letting the mechanics of HTML get in the way. However, gradually the very thing that was such a help in the beginning started getting in my way. It's simply this: the user is locked into the graphics paradigm.1 If a feature isn't supported by the editor, then you can't use it, period. If the program doesn't support a set of fonts, for example, then there is no way at all to use them on your Web site.

So, I began looking around for something more flexible, and I chose PPWIZARD written by Dennis Bareis. PPWizard is such a rich program that I can't hope to give an complete review or exhaustive treatment of it here. For that please consult the massive on-line manual and the four-part tutorial, Building Dynamic Web Sites In OS/2, in OS/2 e-Zine.2 What I want to do this week is briefly describe the nature of PPWizard, and a few of its features. Starting next week I'll show you how to build a relatively simple Web document using this tool, and later show you how to fancy it up a bit.

  1. What is PPWizard?

    1. PPWizard is a Preprocessor

      1. If you have a development or compiler background, you may recognize the term "preprocessor" as a term for a "pass" or procedure that the compiler puts your program through before the actual "compile" begins. By using this extra pass, the compiler is able to give you an extra set of features that would otherwise not be possible. These features primarily include macros, but include conditional symbols--symbols which are only compiled under certain conditions. Although you may not have heard of the latter, they are so important that much modern software, including operating systems, could not be written without them!

      2. PPWizard can be thought of as a front-end, i.e. preprocessor, to an HTML browser. It certainly provides the same type of functions of a traditional pre-processor--macros, conditional symbols, and expressions--and much more.

        • Note: If you find the preprocessor model is too difficult to grasp, then in the HTML context just think of PPWizard as running in a special standalone mode. It is, however, a true Rexx preprocessor.

    2. A PPWizard source file for our purposes has an extension of .IT and consists of a mixture of PPWizard statements (perhaps including macros, #include statements, REXX statements etc.), raw HTML statements and plain text. PPWizard processes the file by expanding the PPWizard statements, incorporating them into the HTML statements and plain text, and creating a standard HTML file.

    3. PPWizard is freeware and is downloadable from the author's Web site.

  2. What are some of PPWizard's Main Features?

      Note: PPWWizard has hundreds of features; these only a few of the outstanding ones!

    1. One-Time Definitions

      1. If a variable or expression is used all over your Web site, you can (and should) define it once as a variable, and then use the variable whenever the expression is needed. Two excellent examples are your email addresses and Web site URL address. Often you put your email address on several pages to make it easy for people to access you. When something happens to cause your email address and/or URL address to change (e.g. you change ISP's) then you have only to change two lines in a Definitions area of your source, instead of hunting through all the HTML and possibly making changes in several places.

      2. Complex strings, such as image definitions, can be similarly defined once as a variable and used throughout the document as needed.

    2. Macro, Macros, Macros!

      1. Macros are among PPWizard's strongest features. They are supported to a degree that is almost beyond belief! Lately the author has been strengthening this support almost weekly.

        1. Macros can be nested indefinitely, limited only by your system memory.

        2. Macros can be defined in terms of HTML (i.e. text), other macros or REXX functions and expressions. Most REXX functions are supported by PPWizard.

        3. Macros can be defined to have optional  parameters: i.e. parameters that can be omitted when the macro is actually called.

        4. PPWizard supports the #include command, so it is highly recommended to put your macros into one or more files, grouped according to function, but different from your main Web site documents. Then you can use one or more #include files in the body of your main document, and the documents containing the appropriate macro will be automatically accessed.

        5. Note: to make PPWizard as easy to use as possible, you'll need a good programmer's editor. In fact, you'll need your editor to be able to support macros as well. This eliminates many of the common, inexpensive OS/2 editors floating around the Internet. You need not lay out big bucks, however:

          • Kon
            Kon, which I reviewed two weeks ago, has more than sufficient power for that task and is currently selling for only $20 U.S.

          • Jedit
            If you have absolutely no money to spend, you may want to consider Jedit, a free Java editor. However it requires a couple of Java modules be on your system in addition to the Java Runtime Kit, and is relatively slow.

          • EPM
            Finally, if you install enough freeware packages, it's probably possible to make the Warp's Enhanced Editor do the job quite nicely. These packages are available on Hobbes.

    3. Mix 'n' Match

      1. Macros and raw HTML can be mixed interchangeably on the same page, even on the same line! This gives you an enormous sense of freedom, because it allows you to do whatever you want to do to get the results you want.

      2. You can cut and paste raw html from another document (e.g. a table or a form) into your PPWizard source. This is impossible with most WYSIWYG editors, and further enhances what you can do.

    4. Database Interface

      • I have not used this as yet, so I will only mention that certain standard types of databases (e.g. SQL and comma-delimited) can be imported into your Web page. For more information see the Part 4 of Building Dynamic Web Sites.

Next week we'll begin building our HTML document.

Walter Metcalf

Next week: Introduction to PPWIZARD, Part 2


1 There may well be work-arounds for this in some WYSIWYG editors, but in HomePage Publisher, at least, there isn't.

2 See also Part 2, Part 3 and Part 4.

Unless otherwise noted, all content on this site is Copyright © 2004, VOICE