[Update: I have posted an Xcode 4.6 / Visual Studio 2010 project for Vectorworks 2013 here.]
Please download the Xcode 3.2.3 project including all the sources here – SimpleCabinet.zip. The folder SimpleCabinet should be dropped into Vectorworks 2011 SDK’s Sources folder, like this:
The project features two targets, a testing target named “CppUnitLite2″ and the plug-in module shared library target, which outputs to /Applications/Vectorworks2011/Plug-ins. You will notice that all classes plus tests are contained in ExtObject.cpp. I’m doing this for small spikes – in real life, I would put each class in a separate file, no code in the header file etc.
The code features additional tests, refactorings and more usage of VWFC in SimpleCabinetCreator.
I haven’t gotten around to preparing & cleaning up the Visual Studio project of the Simple Cabinet project. Make sure to bug me so I feel obliged to release it, too.
It’s possible to create VectorWorks plug-in objects via TDD. In fact, it’s desirable: Developing the code test-first gave us a very nice separation between the testable model and a very thin layer creating the actual Vectorworks geometry. The SDK stubs (which exist, at this point, for the sole purpose of satisfying the linker) allow us to have a separate testing target and to mix testing code and non-testing code freely.
I found that it’s also possible to develop Vectorworks Layoutmanager-based dialogs (either straight ISDK or VWUI-based) in a strict TDD fashion, but that’s another series of posts waiting to be written and code / project files waiting to be cleaned up.
Wether it’s possible to develop Vectorworks tools in a test-driven fashion remains to be seen (although I’m pretty optimistic that it can be done quite nicely). I do have some thoughts on this matter but they aren’t coherent yet.
If you have any feedback regarding this series, please do not hesitate to post comments on the episodes, or contact me at hm dot kern at extragroup dot de, on Twitter or Facebook. I look forward to hearing from you.
- Episode 0 – Introduction
- Episode 1 – How to start?
- Episode 2 – Spicing up our class
- Episode 3 – Not doing the same sketch twice
- Episode 4 – Creating Vectorworks geometry
- Episode 5 – A third class
- Episode 6 – Rolled-up newspaper
- Episode 7 – A few more additions
- Epilogue & Code
- Updated Epilogue & Code for Vectorworks 2013