Reputation:
The situation is following:
We (students) have to write cross-platform software project for our university, designed for processing statistical data, probably astronomical. It is expected, that students (with different skills) will be able to continue maintaining/improving the project from year to year.
The main idea is to divide the program into main part and number of different modules, which can be written and connected independently, probably as shared libraries. These modules will each contain methods for analyzing and processing specific data, and giving the output (numbers, strings, images etc.).
So we have a small group of relatively proficient students, who can do the main job. The decision was to choose C++ as main programming language and Qt for cross-platform GUI.
The main problem is about those, who will develop modules in future. The education here is heavily Pascal/Delphi-based (it's Ukraine, all said :)), C++ course is poor, and the vast majority of students are too lazy to learn something themselves, so let's assume, that Pascal is the only thing they know.
Here comes the main question:
What is the adequate way to design the module system with following requirements:
Any ideas will be appeciated.
Upvotes: 1
Views: 371
Reputation: 8323
Based on Wiktor Zychla answer, i would advise to use OSGI if you choose to use Java and a component based architecture (i might not give my opinion about the choice cause i'am not very objective as using only java). With OSGI, contracts definition for data providers and data consumers is perfectly managed, the system will plug automatically the modules together according to contract they define. Scanned folder for deployment is already here, it support hot deploy, multiple version of same component running together, etc...
http://en.wikipedia.org/wiki/OSGi
According to functional requirement, using a language providing rich libraries for complex mathematics operations is also advised but i don't know pascal capabilities.
Upvotes: 0
Reputation: 48230
I would start by designing contracts for data providers and data consumers. Because of the technical constraints, contracts should be expressed as functions and implemented as native libraries.
Your core module should then accepts any plugins implementing data provider and data consumer contracts. Plugin architecture should be easy to implement, you just scan a folder to see if there are any shared libraries with functions of expected signatures (your contracts). If yes, a plugin also introduces itself so that it could be attached to main menu.
Having data providers and data consumers allows you to design new features almost forever. New data providers could use files, web services, anything to create data. New consumers could analyze data, export, create charts or whatever you want.
What concerns me is the requirement of Delphi together with the requirement of cross-platform development. My advice is to forget Delphi and switch to Java. It is cross platform, there are great free developer tools and in 2, 5 or 10 years it is more likely to be recognized by project members.
Upvotes: 1