The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

enabling scripting support

I would like to know if anyone has any tips on how to design software (or refactor existing software) to allow an application to be controlled by an external scipting language.  It is my feeling that the application needs to be structured in a certain way to allow this to happen.  Perhaps (if it's an app that was built with an OO language), all objects that you want to instantiate from the scripting language needs to inherit from a common baseclass that will provide some methods for making this possible?

Are there any books or URLs that address this issue?

Background:  We have a 3D vis package that does not have scripting support, and I'm trying to determine just how much work (3 months, 6 months, 2 years?) it would be to make this happen.  The app is written in C++ (we have the source) and we'd probably want to use python to script it.

wondering about scripting
Wednesday, October 22, 2008
Have you considered Lua? Its 100% pure platform independent ANSI C. A lot of games have used it for scripting, and it was designed to be embedded in C/C++ programs.
Thursday, October 23, 2008
I used Lua in a 3D CAD-type product and the integration went really well.  I used tolua++ to generate the c++ bindings I needed.  The only problem is a lack of unicode support if this matters to you.

Do a search for Adobe Lightroom Lua to see how Adobe used it in a really big application.
Thursday, October 23, 2008
Based on my experience from adding scripting support to the Zeus editor, the Lua, Python and TCL languages are all very easy to embed.

On Windows the WSH also makes it very easy to embed the VbScript and JavaScript languages.

There are plenty of details on the home pages of these languages and for WSH information refer to the MSDN.
Jussi Jumppanen Send private email
Thursday, October 23, 2008

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz