Niklas Mehner
October 3, 2007
Feder is the development environment used to develop applications for Sieben Geisslein.
It aims not only at supporting the full development cycle including a vastly improved support for class evolution, but also at integrating code development with the creation and manipulation of the application data.
The problem with existing approaches to class (or in the RDMBMS world: table) evolution is, that much of the information about changes is lost during the development process. Migration scripts have to be created and much effort is put in keeping existing application data and the code using it synchronized. Updating an application to a newer version can become a major hurdle.
Feder solves this by capturing all refactoring information during development. Renaming a field is transparently handled as well as simple type changes.
Of course some changes still require writing migration code (e.g. splitting a field ``name'' into ``forename'' and ``lastname''). This is supported in Feder and all mirgration logic is included in the generated application. No scripts have to be run on installation, but all upgrades are still handled transparently.
Another domain that is almost completely ignored by existing IDEs is application data. Feder allows defining much of the data within in the IDE. This allows referencing this data from the application code in a way that can be validated during compile time.
Especially in GUI design the lack of support for creating data in existing IDEs has led to GUI designers to persist the GUI as generated source code. Feder persists the GUI structure as it is, without the need to convert it to source code and back again.
By providing solutions to these existing issues in development tools, I hope Feder helps improving developer productivity and removes some tedious and error prone tasks
The distribution contains a script ``createDB.sh'' in the example directory that can be used to create a object store1. After entering a user name and password, the script exits after creating an initially empty store.
sh createDB.sh System user: feder System password: secret 17.06.2005 20:49:24 org.siebengeisslein.Server <init> INFO: Server ready.
After the data store has been created, the server can be started using the ``startDB.sh'' script:
sh startDB.sh 17.06.2005 20:50:20 org.siebengeisslein.Server main INFO: Starting server ... 17.06.2005 20:50:20 org.siebengeisslein.net.ConnectionHandler <init> INFO: ConnectionHandler listening on port 2903. 17.06.2005 20:50:20 org.siebengeisslein.Server <init> INFO: Server ready.
Now Feder can be started using the ``startFeder.sh'' script. After entering the credentials used to create the object store in the login screen (figure 1) the main screen of Feder is displayed (figure 2).
Packages can be added by pressing the ``Add package''-button () in the toolbar. Correspondingly classes can be added by pressing the ``Add class''-button () and removed by pressing the ``Remove''-button ().
A class is opened by a double-click.
By clicking on a method, the method code is opened in the code panel. The visibility of the method can be changed by selecting a new value from the dropdown-box in the access column.
The name can be changed by editing the table cell. Changes to the name are automatically reflected in the source code.
Each field has a read- and a write visibility. This determines the visibility of the getter respectivly setter that are generated for the field.
After changing the type of a class that has already been installed to the object store, a conversion expression has to be provided (see section 4).
Method parameters can be added () and removed (). The return type and method name can be set.
The code editor is not yet finished. Some statements/expressions can be inserted, others cannot. Please wait for the coming Feder versions for improvements.
Feder currently supports the following class changes:
This is done by opening the migration view (figure 8) clicking on the migrate icon ().
In the migration view for each type change a conversion expression has to be entered. Currently only the field itself can be referenced in the expression. Later versions of Feder will support referencing any field, that was present in the converted version of the class.
The first entry in the table is special in that it contains the initial value of the field. This is relevant for fields that are later added to the class. The field of the converted instances of the class will have this value as their initial value. The initial value does not affect instances created by any constructor.
As a quick fix a cast can be inserted by pressing ``Alt-C''. Unfortunatly the expression editor does not yet support writing casts directly.
This makes the implementation of the GUI designer much easier, but also requires some conceptual changes. Even for a multi-user application each GUI component only exists once. This makes sense for the ``structure'' of the GUI (e.g. components contained by a panel), but not for the ``state'' (e.g. links to the model). Therefor links from the GUI structure to the state are modelled as ``User Local'' variables. User Local variables are (analogous to thread local variables) variables that have a different value for each user.
GUI components are made available to the application code as global variables. E.g. a frame can be made visible by the statement:
GUI.FRAME.frameName.show();
Once these properties have been filled, the application can be installed into the object store using the ``Install'' entry in the ``Project'' menu.
When aan application is installed into the object store for the first time, an instance of the class ``Start class'' is instantiated and persisted. Also all objects that are (transitively) referenced by the instance of the start class are persisted.
On subsequent installs, this instance is migrated to the new class version (see section 4 for details on class evolution). Referenced objects are migrated when they are loaded from the store.
After installing the application it can be run by selecting the ``Run'' entry in the ``Project'' menu. When an application is run, the ``start()'' method of the instance of the start class is invoked.
If a new version of the application ist installed after starting it, the running application is transparently upgraded.
After clicking on an application link, a login dialog is displayed (figure 11) and the application is started.