Novell Home

Novell Connection Magazine Home

Some of the ASP.NET applications we have made available include:

  • ASP.NET's Blog Starter Kit
  • ASP.NET's Classifieds Starter Kit
  • ASP.NET's Club Web Site
  • ASP.NET's IBuySpyPortal

Some open source packages that support Mono out of the box are:

  • MonoBlog
  • MonoForums
  • dekiwiki
  • MojoPortal

Installing our Packages

If you want to take our various Web sites for a test drive, you can use our repositories and the SUSE built-in installation tools to do this.

On OpenSUSE 10.3

1. Add Mono:Community to Zypper:
zypper ar http://download.opensuse.org/repositories/Mono:
/Community/openSUSE_10.3 monocom

2. Search for a package (for example, ?ibuyspy?) to get the full name of the package to install; it's listed in the Name column:
zypper se ibuyspy

3. Install ibuyspy using the full name of the package:
zypper -r in Mono_ASP.NET_IBuySpyPortal

On SUSE Linux Enterprise

1. Add Mono:Community to ZMD
rug sa -t yum http://download.opensuse.org/repositories/Mono:
/Community/SLE_10 monocom

2. Search for ibuyspy to get the full name of the package to install; it's listed in the Name column:
rug se ibuyspy

3. Install ibuyspy using the full name of the package:
rug in Mono_ASP.NET_IBuySpyPortal

Learning from our Ports

Let's explore a well-known ASP.NET application, the ?Classifieds Starter Kit?, originally available from http://www.asp.net/downloads/starter-kits/classifieds/.

You can download our source rpm from: http://download.opensuse.org/repositories/Mono:
/Community/openSUSE_10.3/src.

To explore the port, you will need to install this .src.rpm package. Type the following command as root: rpm -i Mono_ASP.NET_ClassifiedsStarterKit-1.0.0-20.1.src.rpm

Once you do this, RPM will leave the source files in /usr/src/packages/SOURCES. You'll find two files there: a tar file with the original contents, and a patch file that is used to alter the original tar package to port it.

Most of the changes in the patch file are used to port the application from SQL server to PostgreSQL using the Npgsql database provider, which is included with Mono. But it also deals with a few differences between deploying on Linux and deploying on Windows. You can read more about the differences on the Mono Project Web site, http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications.

You will find the file that drives the packaging of the Classifieds Starter Kit in the /usr/src/packages/SPECS directory. The spec file creates a few configuration files. For example, it creates an Apache configuration file that publishes the starter kit on the /ClassifiedsStarterKit directory on the current server, and it provides a few configuration options to Mono to run the application.

One important feature in the Apache launch script is the use of the MONO_IOMAP environment variable. It instructs Mono to emulate the Windows file system semantics on Linux. Windows files are case insensitive and applications tend to depend on the case insensitivity for file names, but Linux files are case sensitive.

If you want to build the software from the spec files, just type this command: rpmbuild -ba Mono-ASP.NET-ClassifiedsStarterKit.spec Wait for a few minutes, and you should have a shiny package built on your very own system that is ready to be modified and deployed.

The Opportunity

The major chunk of code in our port is the database conversion; it has to change the way the database is created and the syntax of the stored procedures. But if you don't need to do this, porting an ASP.NET server application from Windows to Linux only takes a few days for someone with ASP.NET background.

If you ever wanted to consolidate some Windows workloads into your Linux systems and depended on ASP.NET or .NET to be available on Linux, it is!

In future articles, we will examine some of the technical issues involved in porting applications and some of the tools that we use to port. We'll also show more of our roadmap for various technologies that Web developers use.

  • Figure 1

    The two stacks (ASP.NET and J2EE) have competed for a long time and roughly command equal shares of the market; only about 10 percent of the market is driven by other stacks, which are mostly open source application servers.

  • Figure 2

    Multiple vendors provide J2EE stacks, but only two vendors are behind ASP.NET: Microsoft and Novell. Microsoft offers its platform on Windows, while Novell offers ASP.NET on SUSE Linux and other Unix systems.

  • Figure 3

    Traditionally, the ASP.NET stack has been bound to the Windows platform, while the J2EE stacks have been cross platform stacks. We now have an opportunity to grow our presence on the ASP.NET space by helping customers move their applications from Windows servers to Linux servers.

  • Figure 4

    A Web application is typically made up of two tiers: 1. a presentation tier (the actual ASP.NET application), which typically is merely a Web front end to the contents of a database, and 2. the back-end tier, which is typically the database.

  • Figure 5

    Miguel de Icaza talks about the power and functionality of Mono during one of the keynotes at BrainShare 2008 in Salt Lake City.



© 2014 Novell