Creating an expandable, cross-platform compatible program “core”

development-processprogramming-languages

Basically the brief is relatively simple. We need to create a program core. An engine that will power all sorts of programs with a large number of distinct potential applications and deployments.

The core will be an analytics and algorithmic processor which will essentially take user-specific input and output scenarios based on the information it gets, whilst recording this information for reporting.

It needs to be cross platform compatible. Something that can have platform specific layers put on top which can interface with the core.

It also needs to be able to be expandable, for instance, modular with developers being able to write "add-ons" or "extensions" which can alter the function of the end program and can use the core to its full extent.

(For instance, a good example of what I'm looking to create is a browser. It has its main core, the web-kit engine, for instance, and then on top of this is has a platform-specific GUI and can also have add-ons and extensions which can change the behavior of the program.)

Our problem is that the extensions need to interface directly with the main core and expand/alter that functionality rather than the platform specific "layer".

So, given that I have no experience in this whatsoever (I have a PHP background and recently objective-c), where should I start, and is there any knowledge/wisdom you can impart on me please?

Thanks for all the help and advice you can give me. 🙂 If you need any more explanation just ask. At the moment its in the very early stages of development, so we're just researching all possible routes of development.

Thanks a lot

Best Answer

What you are talking about is building a rather capable framework. At a 10,000ft view, the concept is simple, but as you get closer to implementing it you will find that it will be fraught with difficulty. There's been a few different technologies that have been designed to allow cross-platform/programming language support. A couple are listed below:

  1. Custom language binding -- gets you the most speed, and a library like SWIG can translate between a few low level and high level languages for you. Problem is that it can get rather complicated as you try to work out compiler specific name-mangling issues and other serious gotchas (such as interfacing a non-garbage collected language with a garbage collected language).
  2. CORBA -- Let all who have messed with CORBA commence with the cursing. The concept of CORBA is the use of an Interface Definition Language (IDL) to generate the client/server bindings. The CORBA platform encodes the messages as strings and sends them through the CORBA engine from client to server and back. The advantage of CORBA is that you can split your clients and servers (users and implementations) across machines. The disadvantage is everything else--and performance.
  3. Web Services -- It's an extension of the same basic concepts of CORBA, but with a lot less work. Essentially you have a request/response structure, and two major styles of interaction. SOAP based web services are almost exactly like CORBA except you use XML for your transport. REST style web services are almost exactly like serving up web pages except you send back JSON or XML (depending on the request). This of course gives you the least performance, although you gain a reasonably predictable life-cycle (unlike CORBA).

The other major complexity you are working with is the concept of an extensible UI. Essentially your framework needs to be able to map UI features dynamically based on the properties of the request and algorithm. I don't know enough about your problem domain to suggest exactly how to break that down. And if I did, I'd charge for the work (I'm not cheap). In general, you want to look at what hints you need from the algorithm itself, the input, and the type of query posed to your framework. Your UI components will also need to provide hints about what they can be bound to, and the type of object that can be visualized. From there you can draw up some rules about how to match UI bindings to the data from the algorithm.

This at least will get you thinking in the right direction. Please don't forget about security, denial of service protection, and other issues that most people forget.

Related Topic