[Mono-list] Language Clarification

A Rafael D Teixeira rafael.teixeirabr@terra.com.br
Tue, 12 Oct 2004 15:50:23 -0200


Hi David,

There is two things you should know that affect your case:

1) as mentioned, Microsoft.VisualBasic is referenced for basically ANY
VB.NET solution, because without it you would not be able to use
language features like VB Modules or late-binding (Option Strict Off),
also useful things like Mid(), IsNumeric(), all reside in that
assemblies, whose implementation is halfway in Mono (we cover 100% of
the API, but throw many NotImplementedExceptions currently). 

****
Generally speaking C# is the only .NET language whose the whole runtime
support it needs is just what the .NET base class library offers. VB.NET
needs Microsoft.VisualBasic.dll, JScript.NET needs
Microsoft.JScript.dll, VisualC.NET needs Microsoft.VisualC.dll, Boo
needs Boo.dll, Nemerle needs Nemerle.dll, and so on.
****

2) ASP.NET pages are compiled on the fly (codebehind is compiled and
copied by VS.NET, but pages are left to be compiled by the ASP.NET
infrastructure). This demands that *CodeProvider/*CodeCompiler families
of classes, one pair for each supported language, be available. Well our
VBCodeProvider implementation is not currently as much tested as our
CSCodeProvider. Also VBCodeCompiler delegates to mbas (our VB.NET
Compiler) the hard work of compiling and our compiler is at alpha stage,
and currently is so slow that it times out inside the ASP.NET
infrastructure. 

Just as a comment: Delegation to the command line compilers is the
approach taken by Microsoft and Mono, for each *CodeCompiler class
implementation currently distributed. A process is spawn to compile the
temporary source-file created with the *CodeProvider, and it's output is
captured and parsed to expose found errors in the ASP.NET way.

I hope this bring some light, on why we still recommend to currently use
only C# ASP.NET pages with Mono/mod_mono/xsp.

If all your code can be placed in code-behind dlls, that you compile
with vbc on windows (by using VS.NET), you may try run then on Mono, but
our Microsoft.VisualBasic.dll implementation may not be complete enough
for you to have a smooth ride.

Regards,

On Tue, 2004-10-12 at 14:54, David P. Donahue wrote:
> Likely.  I recall that coming up before in my quest.  When you say "by
> default" are you implying that there's a way to use other libraries
> instead?
> 
> 
> Regards,
> David P. Donahue
> ddonahue@ccs.neu.edu
> 
> 
> 
> > -----Original Message-----
> > From: mono-list-admin@lists.ximian.com 
> > [mailto:mono-list-admin@lists.ximian.com] On Behalf Of Dan Maltes
> > Sent: Tuesday, October 12, 2004 12:18 PM
> > To: 'David P. Donahue'; mono-list@lists.ximian.com
> > Subject: RE: [Mono-list] Language Clarification
> > 
> > 
> > Is your Grid sample referencing anything in 
> > Microsoft.VisualBasic.dll?  I
> > believe VS.NET references this library by default when 
> > compiling VB.NET
> > projects.
> > 
> > -Dan 
> > 
> > -----Original Message-----
> > From: mono-list-admin@lists.ximian.com
> > [mailto:mono-list-admin@lists.ximian.com] On Behalf Of David 
> > P. Donahue
> > Sent: Tuesday, October 12, 2004 11:21 AM
> > To: mono-list@lists.ximian.com
> > Subject: [Mono-list] Language Clarification
> > 
> > I realize that Mono focuses its development on C# as a whole, but I'm
> > wondering something about other languages in general.  I'm no 
> > expert on the
> > core of .NET, but I was under the impression that one of its 
> > features is
> > that code from any .NET language, when compiled, becomes a 
> > single common
> > language for any .NET interpreter (such as Mono) to use.
> > That is, if I write something in VB and compile it in Visual 
> > Studio, the end
> > result is no different (not critically different, anyway) from the end
> > result that would be achieved had I used C# or any other .NET 
> > language.  Is
> > this the case?
> > 
> > If so, then I'm unclear on a problem that I've been having 
> > (and have been
> > receiving very help assistance on, thanks to this mailing 
> > list) in trying to
> > get an ASP .NET web application written in VB to work on Mono.
> > 
> > I was told of a work-around to get my first test page to 
> > work, which was to
> > set the page language to C# even though my code-behind was all in VB.
> > This worked... for that small test page (which consisted of a 
> > button which,
> > when pressed, changed a property on a label).  My next test 
> > was to use a
> > DataGrid and grab a table from a database.  This page is slightly more
> > complex as a test, since it has more functions in the 
> > code-behind and has
> > some VB code in the design of the .aspx file itself.
> > The aforementioned work-around doesn't seem to extend this 
> > far, as setting
> > my page language to C# now results in a vague "object 
> > reference not set to
> > an instance of an object" error (with no obvious mention of 
> > the object in
> > question).  And, of course, setting it back to VB results in 
> > a "thread was
> > being aborted" error that caused the need for the aforementioned
> > work-around.
> > 
> > If my originally mentioned impression of how .NET works is 
> > correct, why is
> > there a difference between the two at all?  When I compile my 
> > "solution" in
> > Visual Studio, isn't the resulting .dll in the bin folder 
> > contain all that
> > Mono needs?  If so, is my method of compilation not accomplishing this
> > properly?
> > 
> > For reference, I am using the following setup:
> > Development:
> >   Windows XP, .NET Framework 1.1.4322, Visual Studio .NET 2003
> > (7.1.3088)
> > Production:
> >   Slackware 10.0, Linux 2.4.26, Mono 1.1.1 (mod_mono with 
> > Apache 1.3.31)
> > 
> > 
> > 
> > Regards,
> > David P. Donahue
> > ddonahue@ccs.neu.edu
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> > 
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> > 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: VirusScan / Atualizado em 06/10/2004 / Verso: 1.5.2
> Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
> 
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u=rafael.teixeirabr&_l=1097603312.860222.31027.corinto.terra.com.br
-- 
Rafael "Monoman" Teixeira 
Mono Hacker since 16 Jul 2001 - http://www.go-mono.org/
Mono Brasil Founding Member - http://monobrasil.redesolbrasil.org/
English Blog: http://monoblog.blogspot.com/
Brazilian Portuguese Blog: http://monoblog.weblogger.terra.com.br/