YOUR FEEDBACK
Immo Huneke wrote: A well written article, an ingenious solution to a real problem often encountere...

SYS-CON.TV
TOP MICROSOFT .NET LINKS


Deploying an ASP.NET AJAX RSS Reader on Linux
Unleash your creativity

Have you ever wished you could run ASP.NET applications on Linux, without having to rewrite your code or leave the Visual Studio development environment? In this article, I show you how to port Steve Clements’ AJAX ASP.NET RSS Reader to native Java and deploy it to Apache Tomcat on Linux. I also show you how to add an AnimationExtender and a HoverMenu from the AJAX Control Toolkit in Visual Studio, while targeting Java.

How is this possible? The answer is to use Grasshopper, a free Visual Studio-based SDK built by Mainsoft in collaboration with the Mono open source community. Grasshopper 2.2 introduces full support for AJAX and seamlessly integrates with ASP.NET 2.0 AJAX Extensions and AJAX Control Toolkit, so you can add popular features such as partial-page rendering, Accordion navigation, and rounded corners by simply adding a few server controls.

In this article, I’ll show you how to:

  • Analyze the source code to identify possible porting issues.
  • Convert the RSS Reader and RSS Toolkit to Grasshopper project types.
  • Build the ASP.NET solution for Java.
  • Use the AJAX Control Toolkit to add rich client-side functionality.
  • Deploy the ASP.NET application on Linux.

Analyzing the Source Code
First, identify the third-party dependencies in the source code. The RSS Reader has two: the AJAX Control Toolkit and ASP.NET RSS Toolkit, both of which are open source projects hosted on CodePlex. Since these are .NET libraries, they won’t run on Java until you cross-compile them to the Java platform.

There are various strategies for porting third-party dependencies to Java. You can:

  • Check Mainsoft’s samples and code blocks to see if the component has already been ported.
  • Port the component to Java EE yourself, if the source code has a permissive license.
  • Check if the vendor has a Java EE alternative. Many third-party components are available for both the .NET and Java platforms, including Crystal Reports, Corda OptiMap, and Software FX.

The AJAX Control Toolkit belongs to the first category; port the RSS Toolkit, licensed under the permissive Microsoft Public License (Ms-PL), next.

Converting the Web Application
Let the porting process begin! First install Grasshopper, a free Visual Studio add-on from Mainsoft that allows all the magic between .NET and Java to happen. Grasshopper is in essence a cross-compiler that turns .NET bytecode (MSIL) into Java bytecode. The build output is a binary .jar file, not Java source code, although you could run the bytecode through a Java disassembler if you wanted to. Grasshopper integrates seamlessly with Visual Studio’s build system and triggers its own code validation, code generation, and deployment build steps after Microsoft’s regular build to MSIL is finished. On top of that, Grasshopper comes bundled with the Apache Tomcat Web application server, so there is no need to deploy test builds on a remote Web server during development.

About Jonas Martinsson
Jonas Martinsson is an entrepreneur and a member of Mainsoft's development team. He helped to integrate Mainsoft's .NET-Java EE interoperability products with the Visual Studio IDE.

YOUR FEEDBACK
Jonas Martinsson wrote: Prasanna, you can download the project source code at http://dev.mainsoft.com/Portals/0/Downloads/RSSReader.zip
Prasanna wrote: Liked the article "Deploying an ASP.NET AJAX RSS Reader on Linux", if you could provide the document a little more detailed with sample examples, that might have been a great value add
MICROSOFT .NET LATEST STORIES
Midnight Coders has launched WebORB PDF Generator, a solution consisting of a SDK and runtime PDF generation engine that enables Flex, Flash, AJAX and Silverlight clients to create PDF documents from application data. The product is designed for organizations that need to support compl...
At the opening keynote of the Consumer Electronics Show (CES) Wednesday night, Microsoft CEO Steve Ballmer, making his first appearance at the show in a slot that used to be reserved for Bill Gates, announced the widely anticipated, feature-complete beta of the company’s new Windows ...
MYNAH Technologies has announced the release of its MiMiC v3.1.0 Simulation Software for operator training and automation system testing. This release includes enhancements to simulation dynamics, performance and ease-of-use. The new MiMiC Server release provides multi-user support to...
Micro Focus has announced the availability of Micro Focus COBOL for Eclipse, encompassing versions of Micro Focus' Net Express and Server Express solutions designed specifically for the Eclipse open source ecosystem. Micro Focus COBOL for Eclipse provides an integrated development en...
NewerTech has announced the new Voyager Q Hard Drive Docking Solution. The Voyager Q turns any 2.5" or 3.5" Serial ATA (SATA) I/II up to 2.0TB hard drive into a fully bootable and hot-swappable external drive solution and features four interfaces: FireWire® 800, FireWire 400, USB 2.0...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

Click Here

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING NEWS FROM THE WIRES
Microsoft Dynamics solutions, which serve as essential technology for manufacturers and distributors...