In my previous blog post, we took a quick first look at developing Mac a application using Chrome and Mono. Since that post was written, a lot of things have happened. We’ve shipped Chrome 2.0.3, which not only introduced a new project template for Cocoa#, but also provides advanced IDE integration to auto-generate code based on the UI defined in NIB files — making it easy to access the controls you have dropped, and implement the event handers you defined, without having to manually declare them in code. Post 2.0.3, we’ve made some further improvements to he build experience that will ship in our next release in October: we’ve created some custom MSBuild magic that will allow you to generate a finished .app right from within Visual Studio. Which is pretty cool.
That’s all fine and well, you say, but what about our other products? After all, Chrome is but a small part of our product portfolio, and we’re saying we’re focused on enabling cross-platform development across the board.
The result is what you see below, one of a handful of new (and related) sample applications that we are working on and will ship in a future release of DA. The common theme between all the the projects is that they use Data Abstract to access a database middle tier that we’re running on one of our servers. This database server provides info that many of our customers have been dying to get their hands on: namely, direct read-only access to (selected, public) parts of our internal bug databases.
So in addition to providing a useful and real-life sample project that illustrates some of the concepts of DA, you’re also getting useful application(s) you can use to browse for known issues in our products, see their status and what version they were or will be resolved in.
Getting back to the Mac: besides the obvious targets, WinForms, ASP.NET and Delphi clients, i’ve decided to also look into creating a Mac version of the BugDb client — not so much out of real need (i suspect the majority of our users are running Windows machines, for now), but more to put the new Cocoa# support in Chrome to use (and in the process streamline it some more) and to see how well Data Abstract and it’s supporting products, RO and IP, would fare on the Mac.
The answer is: surprisingly well. Of course, we’ve long been supporting and testing for Mono, so i suppose there should be no surprise at all that it “just worked”, but it was still amazing how easy it was to see live DA data show up in a native Mac OS X application.
I started with a plain MonoChrome Cocoa# project, designed the UI in Interface Builder to show one large NSTableView filling the main window. I then added a standard .NET “Component” class to my project and used the familiar WinForms design surface to build my DA client — drop the Remote Data Adapter and related components, right-click it to generate a Strongly Typed DataSet, add a call to Fill() to populate it, all standard stuff a DA user does in her sleep.
Finally, a mere two simple methods needed to be implemented on my ApplicationController, and the NSTableView showed populated with live data retrieved through Data Abstract:
Four of our .NET products working in unison, creating a true Mac OS X app!