Next Previous Up Top Contents Index

3 Programming in Functional Developer

3.5 Source, database, and run-time views

We have seen that Functional Developer provides several tools to allow us to view projects in different ways. Some tools can look at the source representation of a project, while others can look at the run-time representation--the threads of a running application built from a project.

It is useful to think of there being three "worlds" in which we can simultaneously view projects: source, database, and run-time.

Every project has a representation in source code. We view this source representation with the editor mainly, but the debugger's source pane can show us the source code for a function on the stack, and the browser can show the source for some kinds of object in its Source page.

When we build a project, the compiler database that is created provides a second representation. Then, when we run the application or DLL we have created, the running program is itself a third representation of the project.

So, at any given time, an object may exist in each of these worlds simultaneously. The source code of the object may exist in a Dylan source file, a model of the object may exist in the compiler database, and the object may be instantiated in a running program.

Editor windows show projects in their source representation only. Browser windows show information from the compiler database, and, if a program is running, this database information is combined with information from the program, so you can see the "live" version of the object.

The debugger and its interaction pane allows you to view the threads of running programs, and allows you to execute expressions and definitions in these threads. When you do this, the running program is modified. When you enter definitions in this way, the definitions are saved in a temporary layer of the compiler database so that browsing will continue to be accurate. However, these temporary changes are not saved to disk in the compiler database file, nor are they reflected in the project source code files.

There are ways in which the three worlds can get out of sync. Remember that if you edit a source code definition, the model of it in the database will not be updated until you rebuild the project. So, for instance, if you change the inheritance characteristics of a class, the change will not be reflected in the browser Superclasses page for that definition until you rebuild. And if you add new definitions to the project sources, they will also not be visible until you build the project again.


Getting Started with Functional Developer - 31 MAR 2000

Next Previous Up Top Contents Index