OpenRoad: Dynamic use of field templates?

OpenRoad: Dynamic use of field templates?

Post by Wojtek Rappa » Sun, 25 Jun 1995 04:00:00

Funny how a useful new feature generates a requirement which
makes you feel that the feature is, well... great, but there is something

The new field templates in OpenRoad are very useful but it would be great
if they could work dynamically: if they could be bound with a frame
not only at edit time but also at run time.  

Take a real-life example.  I have an application with about 150 user
frames.  About 120 of them all have standard controls: same set of fields,
mostly buttons, doing the same sort of work times 120.  Obviously, we
have a field template which is included in all these frames at edit time.

In the current implementation of templates, we have the familiar story of
one change needing to be propagated 120 times.  The ideal would be some
way of linking with the field template at run time, or at least having some
pre-processing facility which included it during image build. (By the way,
the new pre-processing facility goes part way but obviously it only handles
script.  This new feature is supremely useful and is a must on any feature

We can dynamically create most of the system classes and attach their
instances to the current running frame (via the create() method). But these
instances are created from scratch (the duplicate() method repeats something
that has already been created). There is no easy way of using the component
catalogue as a kind of dynamic library.  There is a CompSource object
but that only takes frames, procedures and user classes as objects.

It's interesting to note that the OpenRoad developers saw this problem and
tried to solve it.  If you look at the OpenRoad on-line help under Templates,
you'll see a reference to a utility called ReconcileApp in the Architect
product. I guess you would run it against your application and all
template references would be refreshed.  Not exactly dynamic, but it's a

I wonder whether we'll see this in OpenRoad 3.5?


OpenRoad: Dynamic use of field templates?

Post by Graham James Bolt » Mon, 26 Jun 1995 04:00:00

Wojtek, I have seen a number of your postings to the Ingres newsgroup and
it seems that we might be working in the same direction.  I shall be in
the UK for about five weeks, most of July in fact.  Give my office a buzz
and maybe I can droip in on you and show your the package Elegance - a
code generatro for OpenROAD and Ingres.

Judging from your last posting, we may be able to give each other a few
useful pointers...

Graham Bolton
Graham Bolton, Principal Consultant
Elegant Relational Development (ERD) bv
Hoogstraat 125a, NL-3111 HD  SCHIEDAM, The Netherlands
Tel: +31.10.2732233, Fax: +31.10.2731114


OpenRoad: Dynamic use of field templates?

Post by Paul Andre » Mon, 26 Jun 1995 04:00:00


>In the current implementation of templates, we have the familiar story of
>one change needing to be propagated 120 times.


        I have seen this problem and the solution is not as difficullt as you might
imagine. In commonly replicated field/frame template code dont put the code into the
field/frame script put it into an included script file. That way all 120 frames/templates
will pick up your change when you recompile the application. You only need to keep the
code on ONE place. The macro-processor also allows cutomisation of frame templates. Design
the frame templates to be customised using macro-variables. Set up 'default' values for the
macro-variables in the frame template. When you create a frame using the template then you can
customise it further by adjusting the macro-variables that are part of the frame. I guess
there might be a problem using reconcileapp if you do this but we'll wait and see.

        My understanding of reconcileapp is that it will be most beneficial for
the visual changes to components rather tahn code changes. For example if you decided
that your input fields should have a zany pink background in 18pt text and then built 120 frames
using the template and then changed your mind, you could change the template to have
a tastefull green or whatever background with 12pt text and run reconcileapp which would
re-colour fields dependent on the template.


(Lets hope I avoid the cliff this time)