In the past a common method used by developers to create new functions was to copy an existing function, removing unwanted functionality and then develop the required additional code.

Function and fragment templates enable developers to identify reusable code and catalogue this code in a form that can be easily accessed by others for inclusion in their code during the development process. Only a developer with administrator access privileges is able to modify the catalogue but all developers can Promote a function or fragment to be a candidate for inclusion in the catalogue. The catalogue can be accessed by all developers for the creation of a function based on a catalogue function or pasting of a catalogue code fragment. Functions can be promoted by selection of the promote option within the utility tab of the open object dialogue, Fig 1. The selected function will be copied to the candidate library, from where the administrator can add the function into the catalogue.

Fig 1 Object Utilities

Clip fragments are promoted from within the clipboard manager, which allows a populated slot to be promoted to a candidate, Fig 2. The promotion of a fragment candidate results in the contents of the slot being copied with structure to the candidate library. The template description is the identifier proposed for the fragment and will be used to locate the fragment within the catalogue either visually within the catalogue list or by use of the search facility.

Fig 2 Clip Manager Promote

Within the administration manager two tabs are provided for the management of the function and fragment catalogues, both behave in the same manner. The following screens show the addition and developer usage of a fragment template, the same principles applies to a function template.

Fig 3 shows a candidate being selected for addition into a catalogue. The paging area details the fragment type and description with the right hand tabs used for selection of the paging view. In this example the candidate tab has been selected and Time sheet entry/update fragment is about to be added to the Timesheet common screen parts catalogue. The bracketed number shown on the tab is the current content total for that catalogue. The creation of new catalogues and re-organization of catalogue tabs is also possible using the facilities provided by this screen.

Fig 3 Admin Fragment Templates

A new PROIV Developer toolbar item has been added to provide access to the fragment templates for paste. Function templates may be accessed within the new object dialogue shown in Fig 1. The fragment paste selection, Fig 4, shows the contents of the selected catalogue Timesheet parts in which our new screen fragment is now shown. Items may be selected from the paging area and pasted into the current selection point within the supporting PROIV Developer views. This behaves in the same way as a paste from the clipboard described earlier. The search facility allows a developer to specify text and fragment type which will be used for a search of the entire catalogue system and display the results in the results view of this screen.

Fig 4 Admin Fragment Templates

Fig 5 shows the properties for a selected fragment with a structure list of included objects. This helps to further identify the fragment prior to pasting into the current edit function.

Fig 5 Template Fragment Contents

The template facility should provide improved speed of development and reduce the cost of duplicated code development. Depending on how sites wish to use templates it is possible to provide standards based on initial template formats, training examples or two-tier development. Advanced developers may be responsible for complex template creation and less advanced developers tasked with assembly of functions from template parts.

Comment on this topic

Topic ID: 500161

Table of Contents

Index

Glossary

-Search-

Back