Is it a good idea to embed a Python resiliency layer into a C ++ application?
Let's say I'm going to write an application with a thin GUI layer, a really thick calculation layer (doing calculations with a high degree of calibration and other long term stuff), and a fairly simple level of toughness. I am looking at creating a GUI + computation layer in C ++ (using Qt for the gui parts).
Now - it would be a crazy idea to build a persistance layer in Python using sqlalchemy and embed it in a C ++ application, allowing the layer interfaces to interact with each other via Lightweigth data transfer objects (written in C ++ but accessible from python)
(another alternative that I lean towards would probably be to write the application in Python from the beginning using the PyQt wrapper and then call in C ++ for computational tasks)
Thanks, Rickard
a source to share
I would take an alternative approach:
Write as much as possible in Python (you can use the PyQt or PySide GUI bindings) and then only write computationally intensive parts (when proven to be performance critical) in C ++ (check out Boost.Python ).
Developing in Python should be faster, easier, and less error prone, then C ++ (unless you are a very experienced C ++ developer, then another). Revealing C ++ via Boost.Python should be easier than the other way around.
a source to share