BANGALORE, INDIA: The single, popular solution to run ASP.NET applications, on Linux, is Mono (www.mono-project.com/). The reason being, Mono has come a long way to achieve near compatibility and cutting edge features of Microsoft .NET. Mono can be used to run .NET applications on Linux and Mac, besides Windows.
For developers, the exciting part about Mono is that it has started supporting the latest features in .NET like C# 4.0, ASP.NET MVC, LINQ and Moonlight. What's more, using Mono you can start writing .NET apps for Apple iPad, iPhone and iPod, today.
In this article, we write a simple ASP.NET application which uses ASP.NET MVC (Model View Controller) framework and LINQ. We will write this application, on Linux, using an IDE called MonoDevelop (monodevelop.com).
To keep the app simple, we will use a SQLite database which will be queried via LINQ (Language Integrated Query). And we w ill deploy the app on an Apache server, running on Linux.
Setup the prerequisitesThe application in this article is written and deployed on Fedora 13. We used version 2.6 of Mono and version 2.4 of MonoDevelop. Installing Apache and Mono packages on Fedora 13 is as simple as issuing the following commands as root:
yum install httpd mod_mono Fedora 13 ships with MonoDevelop 2.2. To install MonoDevelop 2.4, we compiled the MonoDevelop source RPMs found at http://elsupergomez.fedorapeople.org/SRPMS/. You can download the compiled RPMS from forums.pcquest.com and install them as 'rpm -Uvh '.
An ASP .Net MVC appAn ASP .Net MVC application breaks through the traditional Web Forms application, allowing full control and replaceable ways to design the UI and access a database. MonoDevelop makes it easier to write a MVC app. It generates the required skeleton and files - just like Visual Studio.Fire MonoDevelop (Applications>Programming>MonoDevelop in GNOME). Click on File>New>Solution. Under C#>ASP .Net, ?select ASP .Net MVC Project. Type in the name of the project and click Ok. This creates the skeleton code for an ASP .Net MVC application - see the Solution pane on the left.
You can see the MVC app working, already, by clicking on Run>Run With>Mono Soft Debugger for ASP .Net. You will be greeted by a Web page saying "Welcome to ASP.NET MVC on Mono!"
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.