Introduction
There are three excuses ever present in software development:
- We don't have time to automate the build.
- We'll do the documentation later.
- We don't have time to write tests.
NOTE
ASpell.NET is not a good candidate for cross-platform support because PInvoke is not very well supported on CLIs other than Microsoft's .NET.Thorsten Maerz has created a Win32 port of ASpell, which I will wrap in a C# component. I believe this to be a good example because it includes PInvoke calls into unmanaged code. Realistically, this process of wrapping existing functionality and making it available to managed code will probably be done for quite a while by most corporations.TIP
For a good book on .NET Interop, see:Adam has also created a wiki (Chapter 4. The iso file will then be uploaded to a server for distribution to a testing department or, depending on the extent of your testing, to customers. All this will happen automatically upon checking in code using Continuous Integration if the build succeeds (which also implies that the tests succeed).I created ASpell.NET as a proof-of-concept to see how easy it would be to get ASpell working for .NET. ASpell.NET would make a great Web service. To eliminate the need to use pointers and the unsafe compiler option, I wrapped the ASpell dll in another C++ dll (AspellDll.dll). This allows ASpell.NET to use methods that have parameters that require pointers. So the base functionality for ASpell.NET is already there, but with no documentation or tests and without support for dictionaries other than the English dictionary. The source is available from the SourceForge project site, and you will be able to see that Log4Net also plays a part in ASpell.NET. We will use .NET's CuturalInfo to automatically detect which language dictionary to use. Finally, we will demonstrate the use in a somewhat real-world application similar to the WordPad app using #develop to create it as Windows form.
.NET and COM: The Complete Interoperability Guide by Adam Nathan from Sams Publishing