docs.roxen.comBack to normal mode
DocsRoxenWebServer 5.0System Developer Manual PikeThe Roxen Module API
Copyright © 2012, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

Introduction to Roxen Modules

Roxen's native programming interface is available through the Roxen module API. Modules can be conceptually categorized by their type; parser modules (unformally also known as "tag modules") add custom tags to the RXML parser, location (or filesystem) modules serve entire documents in a portion of the virtual namespace of the server, logger modules take notes of the traffic passing through the server and so on. Depending on what task a module is trying to accomplish, it will be of one or more of the available module types. The module type establishes the relationship between roxen and the module, and determines when and how the module will be called into action.

All modules have access to the entire Roxen API, and there is no difference between a module delivered with Roxen and a module developed by a third party.

Roxen modules are .pike files implementing at least the methods required by its module types(s), and probably others as well. All modules must inherit module.pike, which besides implementing stubs for API functions marked as "optional" in this manual, also adds mnemonic names for various constants, among others, the types.

If you in a module want to inherit another module, you can do that with the following special syntax:

inherit "roxen-module://the_module";

the_module is the file name of the Roxen module you want to inherit, without path and the .pike extension. The advantage of this is that the module is searched for in the Roxen module search path, so you can avoid using an absolute or relative path from your own module.

The rest of this chapter is devoted to describing the specifics of the array of module types, their API methods and where they fit in the big picture.