Sunday, September 18 2011

Monobjc Continuous Integration

18 09 2011

The upcoming version of Monobjc 4.0, will be able to run on Mac OS X 10.5, 10.6 and 10.7 operating systems under both i386 and x86_64 architectures. For a complete coverage of this platforms and architectures, the goal is to have these three platforms readily available so non-regression and deployment testing occurs almost seamlessly.

Thanks to Parallels Desktop, I was able to quickly setup two virtual machines running respectively Mac OS X 10.5 and 10.6, on top of a Mac OS X 10.7 system. Then I setp up a Jenkins based continuous integration system driving all the platforms; non-regression testing can now be run on the three platforms easily.

Monobjc CI Infrastructure

Thursday, July 21 2011

Monobjc under Mac OS X 10.7 (Lion)

21 07 2011

As some of you may have noticed, Monobjc is under heavy development to support the newly released version of Mac OS X 10.7, also known as Lion. Thanks to the architecture redesign performed under the version 3.0 (the native runtime), the transition is smooth and easy. A preview release of Monobjc for Lion should be out by the end of the month.

Thursday, May 19 2011

Monobjc and OpenGL

19 05 2011

Some people have noticied that the new major release of Monobjc was lacking of OpenGL support. I am currently working on it and have finalized the new bindings. There will be more complete and flexible, and I expect to provide several sample applications (NSTimer based or Display-Link based) to demonstrate the bindings. I have also started to port the NeHe lessons.

Monobjc now offers CorePlot support

19 05 2011

Starting with the release 3.0.1405.0, the Monobjc bridge offers a complete CorePlot support. You can now use this framework for your graphs. Two sample applications have been added for demonstration purpose.

Thursday, November 11 2010

State of the Union for Monobjc

11 11 2010

It is been a while since I blogged about Monobjc. Some people may have thought that the project was in sleep (or worst dead), but it is not.

I work on Monobjc on my spare time, which means that the project does not go as fast as I would. And as the last six months have been quite harsh for me on the business side, I spent very few hours on the Monobjc project. But, now that the situation is back to normal, I can dedicate more resources to the project.

In this post, I will try to summarize the current state and the future of the project.

I am working on the next iteration of the Monobjc project now for eight months. It can be considered a very long time, but the current design has proven to reach its limits when I was working on two new main features: categories and 64 bits support.

As for now, the Monobjc project is lacking on the following points:

  • The support for PowerPC architectures is broken since Mono 2.6. I spent a lot of time to figure why Monobjc crashes on Mono 2.6 when it was working perfectly on Mono 2.4. Note that this issue is bound to PowerPC only.
  • The support for 64 bits systems. Now that experimental build of Mono can be built, it would be great to have access to the power of 64 bits architecture in Monobjc applications.
  • The support for categories is missing. Even so it does not seem important, I think it is a really handy feature to add to subclassing and composition. It works the same way as extension methods in .NET.
  • The support for blocks. This addition from Mac OS X 10.6 is used extensivly in the new APIs.
  • A proper set of tools, including a decent MonoDevelop plugin set.

A New Design

The PowerPC issue and the 64bits support are part of the same approach. The current design, mostly managed code, is too hard to debug or to alter in order to support a new architecture properly. So I sat down and though about the most efficient architecture that would allow a transparent support of 32/64 bits architectures and maybe solve the PowerPC support issue. I came to the conclusion that the managed side of the bridge was too clumsy.

The design I came to will be based on a custom Mono runtime, containing the Monobjc extensions (messaging, bridging, class registration, etc). It is close to what you can find in others Cocoa/XXX bridges like RubyCocoa or PyObjc. With that design, the managed code of the bridge is greatly reduces as well as the manipulation of the native structures. The diagram below summarized the idea:

New Runtime

What does it means for every developpers ? Well, almost nothing. The tooling part of Monobjc will take care of the custom runtime and the changes are minor. This leads to a painless migration when transitionning to the new design.

More Unit Tests

While working on the categories, I realized that the Monobjc project was not tooled enough for regression and unit testing. The current state of the unit tests is pretty awful, so the next iteration of the project will focused on a better support for unit and regression testings.

Flexible Wrapper Generation

For almost three years, I used several tools to generate the Cocoa wrappers, which involves scapping sources, fixing it by hand to have a decent result. But when dealing with new classes, it is not sustainable anymore. That why I decide to rethink entirely the wrapper generation. This is an ongoing work, but the result can be seen by cloning and building the monobjc-generator project on GitHub.

MonoDevelop Integration

The current state of MonoDevelop integration is pretty light. The plugin set was created by Eric Butler but its maintenance requires a lot of work, and the project is now considered D.O.A. Speaking of proper tools, the MonoDevelop plugin set will be of course part of it.

What about MonoMac ?

As stated in this post, the choices will favor developers. The Monobjc project remains dedicated into providing the best .NET/Objective-C bridge, along with a proper tooling. What is important to me is to provide a complete toolchain that enable developers to focus on their application instead of the development process.

Conclusion

That is all for now. I hope that my fellow readers will find this information useful. I am eager to get some feedback on that and on the Monobjc project in general.

Sunday, September 14 2008

Future of Monobjc

14 09 2008

Monobjc is more than one year old, and the time has come to go beyond the Monobjc bridge. In order to develop the .NET programming on Mac OS X, a bridge is not enough. A whole development ecosystem is needed, so any new developer will have all the necessary tools to leverage the power of .NET on Mac OS X. I have identified several tools needed when developing applications:

  • IDE: An IDE is great as it speeds up the edition on multiple document and centralized the application development (code writing, compilation and packaging). Unfortunatly, an IDE is a very complex machinery. Identified solutions: fork SharpDevelop or MonoDevelop.
  • Reflector: A tool like Red Gate Reflector is useful when dealing with assemblies. The though part is to write the IL reverse-engineering engine. Identified solution: a Reflector clone based on Mono Cecil.
  • Obfuscator: When distributing applications, obfuscation is an additional mesaure to protect your investment. Identified solution: an obfuscation tool based on Mono Cecil.

The ecosystem can also be completed by libraries either based on Mac OS X framework (Sparkle, Growl, ...) or existing .NET libraries. Stay tuned as now, the goals for Monobjc are clear.

Wednesday, September 10 2008

Migrating from CocoaSharp to Monobjc

10 09 2008

If you are using CocoaSharp and you want to migrate to Monobjc, read this tutorial. It contains tip and tricks to ease the migration.

Monday, August 25 2008

How to put a clickable hyperlink into a static NSTextField ?

25 08 2008

The title is pretty clear, and the answer to the question is pretty simple: Technical Q&A QA1487. Et voilĂ  !!!

Thursday, January 17 2008

Monobjc is alive (hourray)

17 01 2008

After six month of casual development, I am pleased to announce the Monobjc project. The Monobjc project provides a .NET/Objective-C bridge that can be used to add the power of the Mac OS X API (Cocoa, CoreGraphics, WebKit, QuickTime, etc) to .NET application (thanks to Mono).