| RADpage / heitml for Programmers |
RADpage includes the object oriented HTML/XML like programming language heitml. As long as you just use preexisting components you probably will not notice anything from heitml. If you one the other hand want to further customize components or program complete applications yourself, heitml provides the programming power needed to do so.
Besides being a full-featured programming language heitml (whose features we describe later) contains many features for integration with the components.

|
<def checkrecord;
if !contains (this.ff.email,"@"); return "Email field must contain a @"; /if; return this.ff; /def> |
The first thing you can do with heitml is to program events hooks of RADpage components, such as button actions. So when the user presses a certain button (or link) on your page, your heitml program is executed. This happens on the server (in contrast to JavaScript events that are executed on the client), so you can freely manipulate the database and all the heitml components. Other very common hooks check the data entered into a form for consistency. The example on the right shows a simple check of the email form field of a database form (dbform). See the (Tutorial) for details on this example.

|
<let top = right(default(Srv_remote_host,""),'.')>
<counter name=("source_"+top)> |
Obviously it is possible to embed programs inside pages. It is however not obvious, that components can be called and parameterized from these programs. The example on the right hand side shows a counter component whose name is dynamically calculated by a program. In this case the name depends on the top-level domain of the requesting client, so the page effectively shows a different counter for each top-level domain. Besides calculating component parameters, components can also be contained inside conditionals, loops, or arbitrary procedures. (Tutorial).

In addition to that, you can program you own components in heitml or modify existing components using object-oriented inheritance. In fact all the RADpage components are programmed in heitml. In fact heitml offers you the convenience of an object-oriented programming language with built-in database support. It is totally integrated with HTML and the Web Server, thus providing a seamless environment for the creation of all your Web Pages, regardless of their requirements. Here's what you can expect when working with this language:
| Programming Features |
|---|
| Control Structures if expr; ... else ... /if while expr; ... /while break and return |
| Expression Evaluation Operators +,-,*,/,%,=,==,!=,<,<=,&&,|| |
| Data Types Integer, Float, Boolean, String, and Object Fully Dynamic Type System |
| Statements ?, assign, def, defenv, include, let, mail, shell |
| Built in functions to process strings, objects, null values, convert numbers, etc. |
| User-defined Procedures and Functions local variables, input and output parameters, keyword and positional parameters, full recursion |
heitml contains all the features you have come to expect from a Scripting Language. But it is also an integrated Document Description and Programming Language. The Document Description features (as shown on the Designers page) can be naturally combined and used in cooperation with the programming features. In fact, many features, like Procedure Calls and the expansion of User-defined Tags are merely different manifestations of the same concept. You only have to learn and use just one language in order to create powerful component libraries of your own.

heitml features the persistent dynamic objects: Objects have reference semantics and can be processed and extended dynamically. They can live across several pages accesses throughout a session. Each object belongs to a class. Classes and methods can be defined as usual in object oriented languages. heitml supports multiple inheritance.
Classes and objects are integrated into HTML/XML. Tags can be defined to be class constructors, i.e. using the user-defined tag on a page creates an appropriate object. heitml components are realized this way. Objects are also integrated with SQL. They can be read from the database, processed and displayed without having to work explicitly on each field name. Objects can also be used as resizable arrays and can be arbitrarily combined together (e.g. arrays of objects, objects containing arrays, and arrays of arrays (i.e. multidimensional arrays) are all possible). In this manner, complex data structures necessary for shopping cart applications, tree-structured Web Sites, and scrollable relations, etc. can easily be modeled.
|
heitml handles all Transaction Processing
and CGI problems.
A Web Server with a database works like a Transaction Processing System; so Web-based Application programs are continually confronted with the problem of how to preserve data between page accesses. Most Web Server tools require you to save and restore data explicitly, a most unnatural procedure in comparison to other programming environments. This adds to the complexity of your program structure and often results in lengthy, time-consuming test procedures to eliminate bugs. With heitml, internal data structures stay alive at all times, just like any conventional programming language. heitml keeps data of any size, any data type, and any complex structure (i.e. object) available for use whenever you need them. The data can be stored on disk for as long as you want (even years) surviving Server re-configurations or even Server crashes. |
| Finally heitml has integrated database access and formatting functions. heitml objects and database tuples are compatible with each other, and high-level functions can be used to process and manipulate their underlying contents. heitml directly supports Web Pages that display data from databases, and Component Libraries can be used to greatly simplify the production of vary large, complex database applications. |
|

heitml automatically determines (through it's own internal garbage collection procedures) what data needs to be saved. This process is completely hidden and works without intervention or requiring the attention of the programmer. In other words, heitml Web Applications programming is just like programming a stand-alone application, allowing you to exploit the full power and capabilities made possible by HTML and the Internet/an intranet. For more information on the ideas that form the basis to this unique approach to Web Applications programming, read the General Design page of the heitml Language Reference Manual.
If you've ever used a professional programming language like C, Pascal, or Java, you'll love using heitml!