advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Cross-platform .NET applications--do you need them, particularly for Web applications that already run code in multiple browsers running on almost any platform? What do you think about this article? Was the test application sufficiently robust? Do you regard it as proof of future near-total platform compatibility or just a proof of concept? Will the Mono project be able to keep up with Microsoft's relentless versioning and the increasing capabilities of ASP.NET, or will they inevitably remain at tleast one version behind? Let us know in the .NET discussion forum on DevX.
Partners & Affiliates
advertisement
advertisement
Average Rating: 4.3/5 | Rate this item | 8 users have rated this item.
 Print Print
 
Almost Too Easy! Creating Cross-Platform ASP.NET Applications Using Mono
Running basic ASP.NET applications on other platforms using Novell's open-source Mono project is as easy as copying the files to the new system. For ASP.NET 1.x authors, cross-platform code is fast becoming a reality. 

advertisement
he dream of cross-platform applications has been a holy grail of development since the dawn of the computer age. Most recently, the Java platform with its "Write once, run anywhere" is the promised end result of adopting the Sun philosophy. Java does deliver on those promises for the most part, but does so only at the cost of changing development platforms—a cost far too high for many developers steeped in the Microsoft way.


Microsoft's Visual Studio makes it easy to develop Web-based applications using their ASP.NET environment. Until recently that meant you would have to host those applications on a system running Microsoft's Internet Information Server (IIS). Now, however, thanks to the release of Mono 1.0 that restriction has been lifted.

Mono is an open-source cross-platform implementation of Microsoft's .NET environment with support for the Common Language Runtime (CLR), a C# compiler, and ASP.NET using the XSP standalone server or an Apache add-in module (mod_mono). Mono currently runs on a large number of platforms including:

  • Microsoft Windows (2000 and above)
  • MacOS X (10.3—Panther only)
  • Sun Solaris
  • Red Hat 9.0/x86
  • Fedora Core 1/x86 and 2/x86
  • Slackware 10
  • SUSE Linux 9.0, 9.1, and Enterprise Server 8 for x86 Linux distributions
You can find instructions to get up and running with Mono on the downloads page of the Mono Web site.

The Test
To test the Mono cross-platform claims, I decided to build a simple family calendar application. The overall goal behind this project was to evaluate exactly how portable a reasonably complex application could be. Therefore, I developed the application in C# and ASP.NET on a Windows XP machine using Microsoft's Visual Studio 2003, working from the following assumptions.

  • The project would best be written in C#. The current preferred language for developing to the Mono .NET implementation is C#. While you could use VB.NET you're far more likely to run into a feature that hasn't been implemented on Mono yet.
  • XML is a natural choice for storing the data for this application. Although Mono supports ADO.NET for accessing data in relational databases, it doesn't support reading Microsoft Access (.mdb) files on any platform other than Windows. Using a full-featured relational database such as SQL Server, Oracle, MySQL, or PostgreSQL is overkill for this project. As Mono does provide full support for reading and writing data to XML files, that's what I used for this demonstration. XML is a good format for storing and retrieving data in a cross-platform way but isn't truly relational and probably wouldn't work well for a large amount of data.
  • The same code would run on both Windows (IIS) and Mono (XSP). I tested the completed code using the standalone Mono ASP.NET server, XSP, on a machine running SUSE Linux 9.1, as well as on my development machine running Windows XP and IIS. XSP works great as a developmental server to test code and to run low-volume applications, but it's definitely not suited for any high-hit-rate production Web server usage. For full-scale production usage you should target Apache using the mod_mono module (not tested).
Page 1 of 3


advertisement
  Next Page: Designing the Sample Application
Page 1: IntroductionPage 3: Testing on Linux, Windows
Page 2: Designing the Sample Application  
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES