I am getting .NET on my mac

Developing as a front-end developer now a days involves a lot of different technologies. Since I develop websites using CMS which use C# Razor template systems, I now cannot make serious websites without understanding and using something which was normally back-end developer stuff. I was lucky to discover a Microsoft Visual Studio clone — Xamarin Studio for Mac.

Frontend - HTML, CSS and Javascript

HTML is used to do the markup of the webpages, and since I started in 1995 a lot has happened. I have been happy to see table tab being introduced by Netscape, which at that time gave unimaginable number of possibilities! Of cause we started to use the table to format the page :-) Lets jump to HTML5, as the history of HTML is not the subject here. HTML5, together with CSS3 and Javascript forms not only a great environment for creating stunning web apps, but also calls for a lot of knowhow on the developers side. No one have the complete overview of all those front-end teconologies.

Backend is moving

Today however, knowing the front-end is not enough. A front-end developer needs to be able to handle some sort of “back-end” programming language, and the CMS systems I work with are written using C# in Microsoft .NET. Knowledge about back-end methods and programming languages has moved towards the front-end developer role.

But I am on Mac!

I have only had a mac for about two years, and is still learning and discovering a lot of things. One disadvantage in my situation was that I could not develop on my OS X based Mac using .NET C#.

The other day I ran into “Xamarin Studio”.

The free Xamarin Studio

With Xamarin I can develop using .NET on my mac, which means that for the CMS system I use: Dynamicweb CMS and Umbraco I suddenly get things like compiling, error checking and intellisense for my C# code!

Example of use — intellisense in Umbraco

After you have installed Xamarin Studio and started it, you should open a new solution for instance based on “Preprocessed Razor Template”. It will be a Razor based template like umbracoTest.cshtml.

Xamarin Studio gives you, like Microsoft Visual Studio, a range of templates to choose from

To get intellisense you need to reference the DLL which contains the namespaces you want to use. In my case I simply downloaded the bin folder from the Umbraco solution and then in my project clicked the “Reference” icon, located the DLLs and choose some of them.

After I had downloaded the bin folder I could reference DLLs used in Umbraco CMS

Those namespaces are now known to Xamarin studio and you can start using them, with intellisense and everything.

A random template found using Google. NiceUrl method can be discovered using intellisense

This means that I can actually unfold the otherwise hidden code inside any DLL. I actually can compile my code, run it and be sure that I am doing nothing which cannot be executed because of type errors and so on.

I know that this is a quick walk through of something very specific to developers, but I am so happy now to be able to develop in C# on Mac that I simply needed to share it!