<MacroPage>
Overview
Overview |  Command Reference |  Download


    Introduction...
MacroPage is basically an HTML compiler - it allows you to use variable, functions, etc in a very HTML-ish way and still generate normal run of the mill HTML at the end of the day. In the programming world, this is the equivalent of C/C++ (where source code is compiled into executables) vs scripting languages such as PHP which are processed at runtime. Don't confuse this with meaning MacroPage is better than PHP or whatever your scripting language of choice is - on the contrary, it's not nearly as versatile - but what it gives up in versatility it gets back in other ways.

    Assumptions...
One of the biggest trends that I really dislike in the web world is the concept of realtime sites - by realtime sites I mean sites where every page is generated when it is requested by a user. Some of the scripting systems have decent caching systems incorporated, that if used properly can reduce the amount of times a particular page is regenerated. What I personally think are better are what I call 'near realtime' sites, meaning that at some specified interval a rebuild is triggered; in some cases this might be once a day (SnapFiles), every 5 minutes (Internet Traffic Report), or as content is added (AnalogX). There are several advantages to this approach; if something fails (such as the DB), for 90% of the site it's transparent to the end user, the site runs at peak performance, etc.

    What is it Good For...
MacroPage has a couple of advantages over traditional scripting languages, but it doesn't solve everything. The biggest single advantage it has over all scripting languages is performance - nothing can come close since it effectively is compiled once with the result being usable an unlimited number of times. By contrast, a scripting language needs to generate a page each time a user requests it (at worst) or implement some sort of caching mechanism to only rebuild it periodically (at best). Since the output of MacroPage is plain old HTML, it's performance is limited only by the speed of the server that it's running on.

    In the Beginning...
MacroPage dates back to the late 90's, when I originally started working with HTML and was frustrated by it's inability to abstract design from actual content - after mucking around with raw HTML for a few years, I finally just said the heck with it and wrote MacroPage. At first it was nothing more than a sort of preprocessed Server Side Include (SSI) basically supporting only the 'include' command you see today, but over the years it's grown in it's implementation and use. Now it provides a good base of functions, from ODBC database integration to conditional processing to basic HTML structure analysis.


Last rebuilt on: Wednesday, May 6, 2009 04:27:27 PM Pacific Standard Time All trademarks used are properties of their respective owners
Copyright 1998-2009, AnalogX. All rights reserved.