views:

130

answers:

3

I have quite a lot of C++ legacy code modules from my colleagues, each doing different jobs. Unfortunately they are poorly written and yes, all GNU C++ code running under Linux.

I want to write a controller program to make singular C++ module a workflow for a very urgent demo. Also I need to write a front-end web-app allowing clients submitting jobs to controller.

Here is what I have:

  1. I know some Python(no experience in server side programming at all), experienced in C++ and Java. I have been developing Java EE apps last year.

  2. The controller program need to call C++ functions. So whatever language I use, it should have pretty good binding with C++.

  3. I will try refactoring C++ code, but definitely not rewriting.

Here is what I thought: I lean towards python for its perfect binding with C++, as writing JNI is too much work, and kind of obsolete nowadays. However, no one in my team is Python programmer, only one knows some Perl, others are pure C++ programmers. ah...Also, there will be some learning involved before I start hard-core Python programming.

Java on the other side, I have pretty good handle of that. While JNI is such a nightmare.

What programming language will you choose in this case? How do you introduce new programming language to team or I should never do that, considering I am only a junior member...

THANKS AHEAD!

+3  A: 

Noting the "very urgent demo" part, assuming that that would take about a month, depending on the complexity, I'd stick to the familiar. True, maintaining python would be easier in the end, and learning python should be a breeze, if you deem it viable.

I'd say, have the team learn python and do the basic stuff, as you learn the deeper parts, you could build classes for them to extend/implement. That way, you get things done as they learn.

partoa
A: 

I would use Python. You could write very basic wrappers using the Python C API and then call said functions from Python with relative ease.

Xorlev
+1  A: 

Given the urgency, I'd have to stick with C++.

Without that, I'd say keep what you got, but feel free to switch to a preferred language when refactoring. That would be the time to do it.

What you should not do, ever, is "port" anything to another language without rewriting or changing functionality in any way. It is a total waste of time, when the "best" outcome you can hope for is that it has no new bugs when you are done.

T.E.D.
In addition, since the other programmers know C++, you can pull them in as needed.
Joel