|By Jonas Martinsson||
|May 22, 2008 07:30 AM EDT||
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.
|Jonas Martinsson 05/27/08 04:24:47 AM EDT|
Prasanna, you can download the project source code at http://dev.mainsoft.com/Portals/0/Downloads/RSSReader.zip
|Prasanna 05/22/08 09:22:37 AM EDT|
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
Mar. 29, 2017 03:15 PM EDT Reads: 2,207
Mar. 29, 2017 02:30 PM EDT Reads: 669
Mar. 29, 2017 02:30 PM EDT Reads: 2,272
Mar. 29, 2017 02:30 PM EDT Reads: 3,802
Mar. 29, 2017 02:15 PM EDT Reads: 3,251
Mar. 29, 2017 01:30 PM EDT Reads: 1,743
Mar. 29, 2017 12:15 PM EDT Reads: 7,898
Mar. 29, 2017 11:45 AM EDT Reads: 2,574
Mar. 29, 2017 11:00 AM EDT Reads: 3,437
Mar. 29, 2017 10:15 AM EDT Reads: 1,728
Mar. 29, 2017 10:00 AM EDT Reads: 2,342
Mar. 29, 2017 08:45 AM EDT Reads: 945
Mar. 29, 2017 08:00 AM EDT Reads: 7,553
Mar. 29, 2017 06:00 AM EDT Reads: 9,076
Mar. 29, 2017 04:00 AM EDT Reads: 15,127
Mar. 29, 2017 03:45 AM EDT Reads: 2,177
Mar. 29, 2017 03:30 AM EDT Reads: 3,265
Mar. 29, 2017 03:00 AM EDT Reads: 6,104
Mar. 29, 2017 01:15 AM EDT Reads: 2,541
Mar. 29, 2017 01:00 AM EDT Reads: 1,145