Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


Sharepoint TechCon

Reader rating:
Click here to read 7 comments about this article.
Article source: CoDe (2009 May/Jun)


Article Pages:  1  2 3 - Next >


Meet the Monkey: A .NET Programmer’s Introduction to Mono

Are you curious about cross-platform .NET applications? Do you have a need or an interest in how to write .NET applications that will run on OS X? Do you need to deploy your application to a *nix box? If you’ve answered “Yes” to one of these last two questions or are curious about running .NET code on *nix, then read on.

With this article, I’ll introduce Mono along with some advice and tips on how to write cross-compatible code.

What Is Mono?

Mono is an open-source *nix version of the .NET development platform. I’ve taken this description of Mono from the Mono Web site:

“The goal of Mono is to allow .NET developers to create and deploy cross-platform versions of their applications.”

As you start off with Mono, one thing that might confuse you is the version numbers. Don’t make the mistake of assuming that the current Mono version number maps to or matches any particular .NET Framework version number. For example, Mono 2.2 (the current version at the time of writing), is somewhere between .NET 2.0 and .NET 3.5. Odds are that you won’t have too much trouble running .NET 3.5 code. However, if you are using some of the .NET 3.0 features (WPF, Windows Workflow, WCF) then you will begin to experience discomfort because these .NET 3.0 features either do not exist or are only partially implemented. On the other hand sometimes Mono comes out with .NET features before .NET: Mono 1.2.6 had support for some .NET 3.5 features such as lambdas before .NET 3.5 was released. Or, if you need to use the C# compiler as a service, that is available now from Mono.

What is currently implemented and what is going to be implemented is constantly changing. For specific details, consult the Mono roadmap at http://www.mono-project.com/Roadmap.

Mono has been allowing developers to write and deploy cross-platform .NET applications since June of 2004. One of the handy things about Mono is that it is binary compatible with .NET. This means that in many cases you can compile your applications with the .NET Framework, and then deploy them to any Mono-supported operating system and hardware combination. Likewise, you could compile your application using Mono, and then deploy to the .NET runtime.

Places You Can Use Mono

What exactly is meant by cross platform? Mono supports both 32-bit and 64-bit systems and a wide variety of operating systems. Mono currently supports the following operating systems:

Linux

Mac OS X (and the iPhone)

Sun Solaris

OpenBSD, FreeBSD, NetBSD

Microsoft Windows

Nintendo Wii

Google Android

Mono will run on the following hardware:

x86

x86-64

IA64

ARM

Alpha

MIPS

HPPA

Sun SPARC (32 bit)

s390, s390x (32 bit and 64 bit)

In addition to the architectures listed above, it is possible to make your own smaller Mono install for embedded systems, if you find it necessary. It is beyond the scope of this article to go into this topic in detail, but you can find more about this by visiting the Mono Web site at http://www.mono-project.com/Small_footprint.

"
Of these four classes of issues that MoMA will find for you, System.MissingMethodException is the most oppressive. These exceptions will actually prevent your application from loading and running.
"

Getting Started with Mono

How do you get started with Mono? To begin with, you need to install it.

First, point your Web browser to the download page for the Mono project (http://www.mono-project.com/Downloads). From there you will be presented with several choices detailed below:

  • Use the LiveCD. The LiveCD is a good choice if you just want to test the waters. At the time of this writing, the Mono LiveCD is running openSUSE 11.1 with Mono 2.2 and sample applications. The LiveCD will give you the best performance as it is running on your hardware. The drawback is that you will have to take some extra steps to persist your data-saving to a USB drive for example.
  • Use the VMware Image. This technique is arguably just as simple (or simpler) than using the LiveCD. Download the VMware virtual machine and open it up using VMware’s free VMware Player. Once the virtual machine boots up, you are basically running the same environment that you would have if you would have gone with the LiveCD approach.
  • Use the Installer for your Operating System. This is probably the simplest option. Just download the appropriate installer for your OS and make use of that.
  • Build from Source. Being that Mono is open source, it is possible to get the source code for Mono and build it yourself. I won’t go into this option in this article, as building Mono from source and installing isn’t necessarily for the faint of heart, particularly on Windows. However, if you have specialized needs or want to hack the Mono source, this is yet another option for you.

For the purpose of this article, and for most users, any of the first three options mentioned above is more than sufficient.

If you are unsure how to get a copy of Mono to experiment with, ask yourself this question first:

How familiar am I with UNIX?

If you are comfortable working in UNIX (specifically Linux), then you might just want to use the VMware image or the LiveCD. This will give you a completely isolated sandbox and you won’t have to worry about “cluttering” up your workstation with something that you are only experimenting with anyway.

If you prefer Windows or are not comfortable with UNIX, then you might just want to use the Mono MSI download to install Mono on your PC.

With the details of how to install Mono on your computer out of the way, let’s move on to a bit about some of the tools you can use to craft your Mono applications.

&

By: Tom Opgenorth

Tom Opgenorth is an independent consultant residing near Edmonton, Alberta, an MVP in C# for 2008, and an all-around good guy (just ask him) with a taste for single malt Scotch and cigars. Tom has been developing software in various languages and on a variety of platforms for the last fourteen years, focusing primarily on .NET for the past six of those years.

Tom discovered the Mono project back in 2003 when trying to figure out how to leverage his .NET skills on Linux, and has been hooked on Mono ever since.

codemagazine@opgenorth.net

Fast Facts

Why the monkey? You may have notice that the mascot for Mono is a monkey. The name Mono is in fact derived from the Spanish word for monkey. There really isn’t a significant reason for this, it just is.



Article Pages:  1  2 3 - Next Page: 'The Tools' >>

Page 1: Meet the Monkey: A .NET Programmer’s Introduction to Mono
Page 2: The Tools
Page 3: Deploying Your Application

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
4.0 out of 5

35 people have rated this article.

Instantly Search Terabytes Of Text
“Lightning Fast”
– Redmond Mag
“Covers all data
sources” – eWeek
25+ fielded & full-text search options
dtSearch’s own document filters highlight hits in popular file types
Web Spider supports static & dynamic data
APIs for .NET, Java, C++, SQL, etc.
Win / Linux (64-bit & 32-bit)
www.dtSearch.com
 

      LearnNow

 

Sharepoint TechCon