Skip to content
Jutaro edited this page Oct 3, 2011 · 8 revisions

Welcome to the billeksah wiki!

Developers documentation for the new modular Leksah library: New leksah will live in the repos:

  • billeksah repo (replacing ltk)

  • leksah1 repo (replacing leksah and build on top of billeksah)

  • any other repo that provides plugins for Leksah

Currently only a plugin config editor and a preferences pane is working. To try it install billeksah and leksah1 via cabal and start it with:

cd leksah1/lekah-main/data/plugins billeksah-main leksah.lkshc

We want to support dynamic loading of plugins, and we achieve this with the plugins package from cabal. However, currently this package hardly install on Windows (I don't know the state on Mac). Now after I reinstalled packages with the cabal option shared: true it doesn't work any more for me on Linux as well! So we find need to find a solution! So we alternatively make the plugins work in a statically linked executable that includes code for all plugins included:

billeksah-main-static leksah.lkshc

We hope that the Haskell community will commit to support one system for dynamic loading of a library build as a cabal package, which is the only feature we need.

Introduction

The aim is to build Leksah on a modular base, so that it is easy to add extensions or to modify its behaviour. The modularization should make it easier for new developers to contribute new parts, or to rework and enhance existing parts.

As well it is possible to build other GUI Apps on the base of the following packages:

* billeksah-main package (Executable)
    Loads the plugins from configuration, based on billeksah-services

* billeksah-main-static (Executable)
    Replaces billeksah-main for an environment in which dynamic linking is not working
    (currently hsplugins)

* billeksah-services (Library)           
    * plugin mechanism
    * events 
    * state 
    * ini files

* billeksah-pane package (Library on top of gtk2hs and billeksah-services)
    * splittable layout with embedded groups and rudimentary detachment
    * move panes with keyboard or by dragging
    * save and recover session to a config file
    * shared menus, toolbar, keyboard accelerators, statusbar

* billeksah-forms package (Library on top of gtk2hs and billeksah-pane) 
    * simple description of input forms
    * bunch of primitive and composed editors
    * shared preferences with editing and storage

For us in the process of the introduction of the plugin system, the plugin mechanism itself is not the problem, but the problem lies in the monolithic architecture of Leksah. So currently we have one place were we define the state, one place for preferences The same for keystrokes, menu, status-bar. Now we have to re-implement Leksah, so that every plugin can add to the definitions. So the big change (and chance) for us is, that we restructure all of Leksah, so that it has well defined interfaces.

It is not easy to use Haskell's static type checker in an open world (e.g. we don't know what kind of state some plugin will add) for tasks on heterogeneous types. We resort to the use of Typeable, which adds run-time type information, and the possibility to recover concrete types via a type-safe cast (which may of course fail, if used inappropriate).

Please look here for further information:

Plugins

Services

Panes

Forms

Please read as well the general information about developing plugins on the leksah1 wiki.

Have fun

Jürgen

Clone this wiki locally