Version 0
Lecture: Kasten - KParts on steroids
A framework made of dreams
Mostly under the hoods of "Okteta", the hex editor, over the last years a component framework named "Kasten" has been (and still is) in development which aims to be a successor to the component system KParts.
Kasten should enforce simply structured and maintainable software that is quickly portable and easy to integrate into new platforms and UIs, whether desktop, tablet or mobile, while sharing most of the code between the ports.
The talk will explain the basic principles of Kasten and how they make it additionally more easy to support e.g. realtime collaboration or migration of running apps between devices. The current state of the Kasten implementation will be demonstrated with "Okteta" and programs from other domains.
A big contribution to the success of the KDE software has been the component model KParts. The most prominent example is the program Konqueror, which is basically a shell to all kinds of KPart implementations. Yet the success story of the KParts system has stopped: New successful frameworks, like Plasma or Sublime (the platform of KDevelop), seem not to be able to build on it. Others, like the KTextEditor interfaces in kdelibs and their implementation by Kate, constructed a new architecture on top of it which does not really match the KParts one. Calligra has been moving away from KParts to its own framework. So obviously there are shortcomings.
This talk presents a new approach to a component system, implemented in a C++ framework based on Qt, named "Kasten". Starting at the lowest level by taking a computing device with running software as a virtual object with a state and input/output which can be decomposed into other virtual objects with states and input/output, the fundamental principle of Kasten is the recursive application of the model-view-controller pattern, that way decoupling the actual UI components as much as possible from the overall implementation.
Other principles are
- fine-grained read/write locking of the model's data structures
- asynchronous operations wherever possible
- synchronization between data models in working memory to streaming formats on storage devices or to data models in other working memories
- concept of users with different rights who are acting on the models
- aiming for reusable components by general-purpose programming interfaces.
Kasten already provides an increasing set of common program shells or legacy component wrappers. Ideally developers just have to write the code for the behavioural logic of their domain-specific data model, parsing and streaming, custom rendering and optional input controllers. An application can then be easily constructed by combining general purpose components, possibly even for multiple platforms.
The design of Kasten is done with a lot of requirements in mind. Some have been derived from existing programs like the Calligra apps, KDevelop, Kate, Konqueror and Okular, which one should be able to reconstruct with Kasten in future. Others were influenced by the authorĀ“s own demands, e.g. enabling realtime collaboration of different people both locally on the same device or with networked devices, suspend/restore of the state of working on a document and migrating to another process/machine, transaction based, attributed, versioned saving to persistent storage or a document server. Different UI styles may be implemented, such as MDI, SDI or any other type that matches the platform. Various I/O devices shall also be supported (e.g. from motion control to multi-touch, from small to big screen) through the use of small, reusable input and renderer components.
There are still many things left to do before it is complete, but in the current state Kasten is already becoming useful outside of Okteta, so it's time for others to look at and into it :)
Info
Day:
2013-07-14
Start time:
11:10
Duration:
00:30
Track:
Practices
Links
- API dox for Kasten (all classes in Kasten2 namespace)
- Sources of basic Kasten framework (currently inside Okteta repo)
- Sources of Game extension for Kasten
- Sources of port of KReversi to Kasten
- Sources of Kasten demo app with QTextDocument/QTextEdit
- Video
Files
Feedback
Click here to let us know how you liked this event.
Speakers
Friedrich W. H. Kossebau |