Mike Riley is a Dr. Dobb's contributing editor. Follow Mike on Twitter @mriley.
Wolfram Research is a company on a computational construction mission. Its flagship title, Mathematica, has been a staple program in academia and industry for over 20 years and with 2008's release of Mathematica 7, it will continue to hold this pole position for some time to come. Follow this with Wolfram's freely accessible computational web front-end at wolframalpha.com, and the technology at the heart of Mathematica continues to get further entrenched into the foundation of the company's activities.
One of the most powerful aspects of Mathematica is a kernel that can be manipulated by Mathematica's own functional programming language. While code can certainly be written and embedded into Mathematica's Notebook (.nb) files, this approach works most effectively when such code functions should be self-contained within that file. Sharing and managing that code can be problematic, especially as more individuals work on the target solution simultaneously.
To resolve this common coding conundrum, Wolfram could have assembled its own interactive development environment (IDE) within the Mathematica application. Fortunately, the company instead opted to leverage and customize the open source Eclipse IDE and instantly garnered the benefits that Eclipse's IDE framework has to offer. Using Wolfram Workbench is an effortless transition for any developer already comfortable with Eclipse.
Developing a Mathematica Application
Anyone who has had experience writing Java applications within the Eclipse IDE will feel right at home within Wolfram Workbench 2. The interface provides a Workbench perspective optimized for writing, testing, and debugging Mathematica code and documentation.
All the editor features you would expect are there, such as syntax highlighting and function lookups along with new features. These include time-saving tweaks like function reference lookups, symbol/package find dialog, expand/contract sections, tighter integration with Mathematica (ex: developers no longer have to launch Mathematica separately if Workbench is hosting a notebook), a new documentation tools palette and more.
For the webMathematica 3 crowd, Workbench 2 features built-in tools for interacting with this web-enabled version of Wolfram's flagship product. Overall, the new features are nicely implemented and help further mature the IDE for more efficient Mathematica coding projects.
Wolfram has posted video demonstrations of Workbench in action. These give interested potential customers a fairly accurate portrayal of how the product feels and behaves. Writing Mathematica applications remains rooted within Mathematica itself, obviously executing the output of the code written in Workbench. As such, the integration of a typical IDE isn't as naturally tight as it would be in other coding products. Still, once acclimated to this minor orientation issue, app development flows much smoother compared to banging out functions directly in Mathematica. Once initiated, reverting to a non-Workbench-assisted coding scenario is just primitive.
Beyond these new enhancements, the most advantageous reason why Wolfram Workbench is ideal for Mathematica development is because of the debugging, refactoring, source version control and integrated unit testing that it brings to the Mathematica app creation experience.
While Wolfram Workbench unquestionably makes constructing, managing, testing and debugging Mathematica programs vastly easier compared to using the rudimentary notebook editing tools, there remain a number of features I would like to see in future iterations of the product. First and foremost, the addition of a direct, interactive front-end to WolframAlpha would be most welcome. In addition to a developer account creation wizard, such a WolframAlpha add-on could expose all the properties and methods available on that service. Additionally, this hopeful future feature would have the same testing and debugging conveniences as local Mathematica programs. To top off this dream tool, the ability for such a project wizard to tool the application to a final target as a Java-based runtime client that could be shared or marketed to non-Mathematica users would be a home run.
Another for more easier helpful addition would be the hosting and certified retrieval/installation of top Eclipse plug-ins that have been vetted by the Wolfram Workbench team. For example, one of the first additional plug-ins I installed was the EGit feature so that I could manage source files via Git instead of Workbench's built-in Subversion capability. However, I am always a bit leery of introducing foreign plug-ins into custom Eclipse environments for fear that some dependency might break or unpredictable problems might occur should the Eclipse host receive an update that some plug-ins choke on. If Wolfram could provide a repository of certified plug-ins, that not only would alleviate such concerns but also provide a dedicated facility for other Workbench developers to submit and share their own custom-created Workbench additions.
Regardless of the Windows, Mac, or Linux version, Wolfram Workbench 2 sells for $145 US, though developers will also need a licensed copy of Mathematica that sells for $2,495 US making the prospect of writing Mathematica applications a bit pricey. Yet for those fortunate corporations and universities already endowed with Mathematica licenses, the addition of Workbench for application development is reasonable, considering the rudimentary notebook code editing alternative. The Workbench team has considerable potential behind the product's possibilities. As it matures, perhaps it might even be folded into the Mathematica licensed distribution itself. Until then, serious Mathematica developers owe it to themselves to make their coding lives easier by living within the development ecosystem that Wolfram Workbench 2 has to offer.