[Mono-devel-list] VS.NET, Mono, Opera, and Mac
Rafael Teixeira
monoman at gmail.com
Tue Feb 1 11:04:17 EST 2005
First: When you install .NET an activeX control is installed and
registered in IE to allow for that. AFAIK it doens't work with any
other browser, even in windows.
Second: That activeX control intercepts the browser's processing for
an specific mime-type (windows executables), downloads part of it to
verify that it is a .NET/CLI executable, creates a visual container
for it in IE, downloads the rest of it, appends security evidences
based in the url and digital signatures so that CAS (Code Access
Security) support in the runtime to correctly sandbox it as configured
in the security policies. WITHOUT PROPER CAS SUPPORT THIS 'FEATURE'
WOULD BE A SECURITY HOLE THE SIZE OF TEXAS!!!
The bad news:
1 - AFAIK, no one has developed an equivalent control (or extension)
to support that in other browsers and OSes.
2 - Mono is still implementing CAS support, but before it can be
trusted, a fulll security auditing of the base class libraries has to
be done, what will take quite some time to happen.
3 - Mono is still implementing System.Windows.Forms, so not all your
VS.NET developed code will properly work.
The currently available ways to have "extended"-controls in web pages
-- Server-side ASP.NET controls (mono supports and works with recent browsers)
-- Java Applets (depends if Java VM is installed and it's use is
enabled in browsers)
-- Pure javascript/DHTML "controls" (works with recent browsers)
My recomendation: ASP.NET with mono and mod_mono/xsp.
Other way:
-- Make a downloadable installer for a non-html version of the
application, maybe using web services to talk with the back end
server.
Hope it helps,
On Mon, 31 Jan 2005 10:32:18 -0500, John S. Brumbelow
<JBrumbelow at optidoc.com> wrote:
> Please help,
>
> I've been through VS.NET, and its documentation says that when it builds .NET "Windows User Controls", they are derrived from System.Windows.Forms which I am to believe is what Mono support for the Mac currently. Oddly, the documentation says that the output from VS.NET is a "MSIL", but named as "DLL" or "EXE" depending on build options, but that it is a MSIL? So, if all that is true, then all I need is to get my app to run on Mac. I really want to make it run from an HTML script under say the Mac browser Opera, which is VERY much like IE. I wanted to get a simple sample to work as such:
>
> ================== My C# code from VS.NET ===========================
> using System;
> using System.Collections;
> using System.ComponentModel;
> using System.Drawing;
> using System.Data;
> using System.Windows.Forms;
>
> namespace WebCON
> {
> /// <summary>
> /// Summary description for HelloWorld.
> /// </summary>
> public class HelloWorld : System.Windows.Forms.UserControl
> {
> public System.Windows.Forms.Label Label_HelloWorld;
> /// <summary>
> /// Required designer variable.
> /// </summary>
> public System.ComponentModel.Container components = null;
> public String csURL;
>
> public HelloWorld()
> {
> // This call is required by the Windows.Forms Form Designer.
> InitializeComponent();
>
> // TODO: Add any initialization after the InitComponent call
>
> }
>
> /// <summary>
> /// Clean up any resources being used.
> /// </summary>
> protected override void Dispose( bool disposing )
> {
> if( disposing )
> {
> if( components != null )
> components.Dispose();
> }
> base.Dispose( disposing );
> }
>
> #region Component Designer generated code
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> public void InitializeComponent()
> {
> this.Label_HelloWorld = new System.Windows.Forms.Label();
> this.SuspendLayout();
> //
> // Label_HelloWorld
> //
> this.Label_HelloWorld.Location = new System.Drawing.Point(8, 8);
> this.Label_HelloWorld.Name = "Label_HelloWorld";
> this.Label_HelloWorld.Size = new System.Drawing.Size(672, 232);
> this.Label_HelloWorld.TabIndex = 0;
> this.Label_HelloWorld.Text = "Hello World!!!";
> this.Label_HelloWorld.Click += new System.EventHandler(this.Label_HelloWorld_Click);
> //
> // HelloWorld
> //
> this.Controls.Add(this.Label_HelloWorld);
> this.Name = "HelloWorld";
> this.Size = new System.Drawing.Size(768, 296);
> this.ResumeLayout(false);
>
> }
> #endregion
>
> public void Label_HelloWorld_Click(object sender, System.EventArgs e)
> {
>
> }
>
> public void Run()
> {
> System.Windows.Forms.MessageBox.Show("Hello World", "Hello World");
> }
>
> public string URL
> {
> get
> {
> return csURL;
> }
> set
> {
> csURL = value.ToString();
> System.Windows.Forms.MessageBox.Show("Setting URL!!!");
> }
> }
> }
> }
> ===========================================================================
>
> ====================== My HTML page I want to run from Opera on Mac which works on IE in Windows.
> <html>
> Hello World!!!<br>
> <object
> id=objHelloWorld
> classid="WebCON.dll#WebCON.HelloWorld"
> VIEWASTEXT
> >
> <param name="URL" value="http://OptiDEV-02">
> </object>
> <script language=javascript>
> var objHelloWorld = document.getElementById("objHelloWorld");
> alert("CHK #001, objHelloWorld = '" + objHelloWorld.URL + "'...");
> objHelloWorld.Run();
> </script>
> </html>
> ==============================
>
> I tried the HTML from Opera and it says the object does not exist. Any ideas?
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.825 / Virus Database: 563 - Release Date: 12/30/2004
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
--
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes.
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
More information about the Mono-devel-list
mailing list