You're viewing all posts tagged with Applications

Loki - Cognethos’ Application Framework

For the past few years, Cognethos has been using an application framework we call Loki to build most of our desktop applications. Traditionally these applications would have been built using a source code framework such as MFC or ATL - which are fine - but we had a few additional requirements that we wanted to be able to use in all future applications. For this reason we developed Loki which is a binary application framework. In other words, Loki is not a source code library for building applications. Instead it’s a container application that can be extended using a set of plugins.

At present we have three main applications that have been built using the Loki framework - Mercury, Atlas Data Capture and our Scipt Editor. As the screen shots below show, although these are all functionally very different applications - however they all have a consistent look and feel thanks to Loki.


By itself, Loki appears as pretty much an empty application with little more than a main window. Its through its plugin extensibility that the power of this framework becomes apparent.

Features of the current version of Loki include:

  • An addin/service based extensibility model, where plugins can both proffer new services and use services provided by other plugins (or Loki itself).
  • Extensible XP style menu and tool bar system, including a merge system that merges custom commands with those built in to Loki.
  • Support for dockable panes
  • Extensbile Tools|Options dialog.
  • Shell integration including shell DDE and drag drop.
  • Document manager - installing custom documents and views.
  • Global keyboard and message hooks.
  • Status bar customization
  • Recent document management
  • Popup windows (modeless floating popup windows)
  • Rebranding capability (ability to rename entire product), including splash screen and start up progress.

As well as these built-in features, we also have a set of services that provide common functionality that can be re-used in all the applications built using Loki.

  • Explorer pane - an easily extensible browser/explorer tree.
  • Property browser window - VB/VBA style shared property list browser.
  • Message logging - the message log docked pane.
  • Toolbox service - standard toolbox container for holding ActiveX controls, plugin objects etc…
  • Scripted addins - the ability to write application wide addin scripts (ie: user addins)
  • Integrated Web Browser
  • VBSA - VBScript for Applications. VBSA is Cognethos’ integrated script editing environment.
  • Standard Docs - helper classes for build tabbed multi-sheet documents.


Using Loki framework lets us concentrate on building the main functionality of an application, leaving Loki to provide the many other details that a high end desktop application should have.

Introduction to CogChart

For the past 12 months or so I have been involved in creating yet another charting product aimed at the finance market. This will have brought the total number of financial charts that I have worked on to 5.

I hear you ask, “Why?”. The answer is simple. The finance charts that I have worked on in the past have been part of a complete package (either for Reuters Kobra, Telerate Active8 and the like). These charts, albeit very powerful and have stood up to the tests of time, are not very portable and easy to maintain. Before blindly embarking on such a large project however, we decided that we would test out what was in the market place. We tested many popular charting products that are available on the internet, including Dundas, ChartFx and more. I recall that we tested around a dozen or so.

Unfortunately, every single one had something missing from it’s architecture that made it obvious that we would need the source code in order to remedy it’s shortcomings. We even ended up purchasing one. After spending a few short minutes looking at the source code, we quickly realised that we would be spending as much or more time shoe-horning a proper solution from the amatuer code base we have just aquired, vs designing and creating our own.

Enter CogChart. Yes, it’s not the most flamboyant of names, unlike ‘Aspen Graphics’, ‘Athena’, ‘Metastock’, or ‘Tradestation’, but it’s ours.

The difference with CogChart’s architecture compared with other charting solutions is that it is a Library of features, rather than a solution itself. This is in line with Cognethos’ idea of creating all of these different pluggable elements and then combining them later to actually create a tailor-made solution that ideally suits our customer’s needs.

So CogChart, being a library, is also designed to be completely extensible with the minimum of fuss. In fact, the architecture of the chart is that we can pull out any piece of functionality and replace it with something that better suits a particular need. For example, one client wanted to have a little notification in the bottom right when the chart’s data was updated. A few short lines of code later, we have a little flashing icon that appears temporarily in the chart when new data arrives.