Using .NET libraries with MonoTouch

I have been playing with MonoTouch only for a few days when I already started to miss all the .NET libraries I commonly use. The first one I needed to get working with MonoTouch was JSON.NET.

MonoDevelop does not support Nuget so you have to get your libaries the old way. I downloaded JSON.NET package from, but it does not contain a DLL built for Mono. Harldy any Nuget package does. You can reference a DLL built for .NET, MonoDevelop will recognize it and even offer you IntelliSense but your project will not get built.

The right way to get a .NET library working with MonoTouch is downloading its source code and building it yourself. You can use MonoDevelop to build the source codes. The only think you have to do (at least for JSON.NET) is to change the .NET profile to an equivalent Mono profile in the project settings.

[Read More]

MonoTouch: iOS development for .NET programmers

Beeing quite disappointed with the Windows Phone platform recently I started to look for other ways to use my .NET skills and to develop for a mobile platform at the same time. I found MonoTouch, a product from Xamarin that allows you to build iOS apps using C# with Mono.

What is MonoTouch?

MonoTouch is a product or a framework do develop iOS apps using Mono (an open-source .NET implementation). It allows you to use C# (hopefuly also F# although I have not been able to get it to work yet) and all the .NET features libraries you use and like and of course your existing codebase. No Objective-C knowledge is required, but you will have to learn about the iOS ecosystem an iOS SDK. The iOS SDK is also needed, so you cannot do the development in Windows, you have to use a Mac. There are ways to get MacOS X working on a PC as a native install or in VMWare / VirtualBox, if you just want to try it out, but it may not be legal.

[Read More]
Csharp  iOS  Mono 

Being a polyglot programmer

Many programmers learn one platform, one language and stay in their monoculture. Learning many different programming languages can definitely change your programming style and the way you think about problems. It was certainly beneficial for me, here is why.

After learning Pascal, C in the first semester at the University I started be commercial programming career as a PHP developer (part time in the second semester).  It was easy to start with and in demand so finding a part time job was easy. I never liked the language, it was not “pure”, I especially hated the function naming and parameters orders inconsistencies.

At the university I learned OOP principles and C++ and thought OOP was the answer to everything so I immediately changed my PHP programming style to incorporate it. My code became more readable and organized.  Later at the university I had to learn nonprocedural Prolog and functional Haskell. I found it very difficult because I had to think in another way and came out of my comfort zone. When I finished the course I really liked Haskell and functional programming because of its clarity, readability and the fact that I could write a very compact code. But I had no practical use for it. It did not change my Programming style but made me look for a more pure and “nicer” language to learn.

[Read More]