
![]()
Copyright © 2007 SoftVelocity, All rights reserved worldwide |
|
The Template Registry A template is a complete set of instructions, both Template and "target" language statements, which the Application Generator uses to process the programmer's input for application customizations and is then used to generate the "target" language (usually, but not limited to, Clarion language) source code. Clarion's templates are completely reusable. They generate only the exact code required for each specific instance of its use; they do not inherit unused methods. The templates are also polymorphic, since the programmer specifies the features and functions of each template that are required for the procedure. This means one template can generate different functionality based upon the programmer's desires. Once the developer makes a selection, it's stored in the Application tree. When you are ready to generate the source code for the application, the Application Generator reads the template, substitutes the dictionary properties the developer selected for data references, inserts these into the source code stored in the template, interprets the control statements and other options selected by the developer, and according to the selections, it then outputs a source code file that contains the final product: source code that does what the developer specified, referencing the data elements chosen. The project system then compiles the application. Clarion templates are highly configurable, interactive, interpreted, code generation scripts. A template typically prompts you for information then generates a custom set of source code based on your responses. Each template also contains embed points: access points at which the developer can insert their own code to execute in the midst of the code generated by the template. This allows for an unlimited degree of customization. Moreover, even if the developer changes the options in the template's design time user interface, the application generator will not overwrite the custom code placed by the developer in the embed points, when it next regenerates the application. The illustration below shows a developer placing code in an embed point: Even after generating a project, developers can continue editing the options in the application metabase, and regenerate part of the application without overwriting previous customizations. This makes ongoing maintenance easier than any other development system. This greatly aids businesses by minimizing what is often the most overlooked major expense in any software development project —application maintenance. This ability to regenerate an application to reflect new template functionality or revised database schema without overwriting previous customizations marks a revolutionary advance for software developers. These developers have relied heavily on wizards supplied by rapid application development environments to generate user interfaces, and class libraries for application logic. With Clarion, these same developers can take advantage of a rapid application development environment that continues to provide the same wizards and shortcuts, only now the developers can rerun wizard functionality at anytime, and can implement class methods and property options through a design time interface customized for each piece of application logic. There are several different ways to apply the templates, and remember that you can change the default behavior for any template, or create your own version:
Some of the template "types" that Clarion includes:
|
||||
Copyright © 2007 SoftVelocity, All rights reserved worldwide |