Dissecting SemanticMerge, Part 1: how we develop for Mac using C# and MonoMac

Tuesday, March 18, 2014 15 Comments

Objective-C is the language of choice when you go for Mac (and iPhone) but thanks to Xamarin now more than half a million C# developers are able to code for Apple platforms in their language of choice. And this is something good if you’re a Windows developer who need to develop a new app on Mac.

I’m going to share the things we learned while developing SemanticMerge for Mac using C# and MonoMac, and I’d like these posts to be the sort of writing I wish we had when we started our journey :-). This is the part one of a series of posts dissecting SemanticMerge to explain how we develop with C# and Mac

To Objective-C or not to Objective-C

The obvious choice when going to develop a Mac app is going for Objective-C. It is the native language so there’s no better choice.

That being said, there are some situations when you might consider sticking to C#:

  • Your app will be based on an extensive codebase written in C#. When that’s the case, rewriting in Objective-C or making it interop somehow can be time consuming.
  • The deadlines are tight (aren’t they always? :P) and getting proficient with Objective-C is not an option.

While I think the first reason is pretty acceptable, I’m afraid the second one can be a dangerous excuse for a real world application. Let me elaborate a little bit further: you’ll need to learn the foundations of the Mac environment in order to develop a professional app (I mean, anything that is not just a demo).

  • You’ll have to read Objective-C code since it is the main source of documentation and unfortunately there’s not so much info in C#.
  • You’ll have to get familiar with the Cocoa objects to build your app anyway.

I hope we can help reducing the learning curve with these posts :-)

Native toolkits

Once you’ve decided C# is the right choice (otherwise you’d be reading Objective-C guides already :P) you’ll probably wonder if you should go for a native ‘window toolkit’ or not.

Let me explain it in detail: “wouldn’t it be awesome to have some sort of UI toolkit where you can write your app once and run it everywhere? I mean, this is the sort of thing Mono does for .NET programs, isn’t it?” – Someone would say.

Well, yes and no. We’ve developed WinForms apps (check the Mac and Linux screenshots in our gallery) for years and we have run them on Linux, Windows and Mac. You think you save time at the beginning because you have a “write once run everywhere” sort of thing. You don’t. The app looks great on Windows, but it looks alien on Mac and Linux. And users will notice immediately, specially the Mac ones.

So, no, don’t go for a “one size fits all” here. You’ll have to spend time writing a MonoMac app even if you already have a wonderful WPF or WinForms one.

“What about things like Qt then?” – I hear someone crying – Well, yes, Qt is cool if you’re a C++ developer, but the C# wrappers, while they’ve been around for ages, seem to lack solid documentation and evolution.


We decided to go with C# and MonoMac because we were very familiar with the language (we love C#, we’d love C# for system programming even more :P) and we had to reuse most of our codebase.

We also used the development of Semantic in C# and MonoMac as an experiment (or pilot project if you prefer) before porting the entire Plastic SCM GUI to Mac.

We develop Plastic SCM, a version control that excels in branching and merging, can deal with huge projects and big binary assets natively, and it comes with GUIs and tools to make everything simpler.

If you want to give it a try, download it from here.

We are also the developers of SemanticMerge, and the gmaster Git client.


Unknown said...

This one is a best post to learn how we create for Mac through C# and MonoMac. App Development Company

Unknown said...

What about the mobile app development I can recommend you at the beginning of its developing look for some consultation from mobile app development company like http://www.nixsolutions.com/services/web-development-services/ecommenrce/ this is proven mobile app development company which helps you to define the aims and find the way how to go for it faster. Good luck.

Unknown said...

All your statements are good. I think that apps testing is as important as its developing And I'm using this guys http://qatestlab.com/services/we-are-professionals-in/user-interface-testing/ for it. Thank you so much for posting your article, it is gonna be very useful for me.

Unknown said...

Don't know what is web design? Visit https://youteam.io/

Nataly said...

Software development with a high standard
SteelKiwi Inc

Unknown said...

The Unusual Secret of Crypto Currency Exchange When an exchange has limited payment options then it might not be convenient that you utilize it. Today the best bitcoin exchange
of contemporary cryptocurrency appears to need to take into consideration the mistakes of their predecessors. Cryptocurrency exchange and trade is a comparatively modern venture and you need ton't settle for anything less than the very best.

This is the first time I am visiting your website. I would like to tell you that I am genuinely engaged by reading your blogs. Keep up the good work!

best web development company in australia

Ivan Irwin said...

It’s both aesthetically pleasing and a useful tool UX agencies for current and prospective students and families alike.
ux consulting firms

This comment has been removed by the author.

Top design agencies are transparent about expectations and maintain great communication.
user experience firm

Charles Null said...

The complete blogs are really inconceivable and definitely everyone will share this information.
free url opener for mozilla

sahilsharma said...

Nice thread and very informative also but I have been searching for some help regarding choosing a good developer service for me. I need to make a new website and for that, I have been searching an online developer who must be experienced in custom Magento development. But, I did not find anyone yet who can help me with this. I visited this blog because I wanted to do some research about this and my friend suggested to me about your blog but I don't think here I will get any help too. I know that this development service is not that famous but I hope I can get regarding this from your website. People always do ideas with that and I need a good idea but the person must be experienced in the field. Otherwise, it will be so much tough for him to do. Do you have any suggestions about this?

Unknown said...

Nice Blog. Thanks for sharing with us. Such amazing information.

Only Blog

Guest Blogger

Guest Blogging Site

Guest Blogging Website

Guest Posting Site

Nice Blog. Thanks for sharing with us. Such amazing information.

MyBlogger Club

Guest Posting Site

Best Guest Blogging Site

Guest Blogger

Guest Blogging Site

https://www.soorban.com/business/1593-best-xiaomi-phones Xiaomi Mi Mix Fold: The first Xiaomi clamshell phone that can undoubtedly be considered the flagship of this brand and one of the