More links fixed
[mono.git] / web / faq
1 <a href="#basics">Basics</a><br>
2 <a href="#novell">The Novell Role in the Mono project</a><br>
3 <a href="#gnome">Mono and GNOME</a><br>
4 <a href="#gui">Building GUI applications with Mono</a><br>
5 <a href="#msft">Mono and Microsoft</a><br>
6 <a href="#platforms">Mono platforms</a><br>
7 <a href="#compatibility">Compatibility</a></br>
8 <a href="#pnpproject">Mono and the Portable.NET Project</a><br>
9 <a href="#webservices">Web Services</a><br>
10 <a href="#asp">Mono and ASP.NET</a><br>
11 <a href="#ado">Mono and ADO.NET</a><br>
12 <a href="#monodoc">MonoDoc</a><br>
13 <a href="#devel">Development Tools and Issues</a><br>
14 <a href="#java">Mono and Java</a><br>
15 <a href="#extending">Extending Mono</a><br>
16 <a href="#portability">Portability</a><br>
17 <a href="#reuse">Reusing Existing Code</a><br>
18 <a href="#gcc">Mono and GCC</a><br>
19 <a href="#performance">Performance</a><br>
20 <a href="#licensing">Licensing</a><br>
21 <a href="#patents">Patents</a><br>
22 <a href="#etc">Miscellaneous Questions</a><br>
23 <a href="#problems">Mono Common Problems</a><br>
24
25 A <a
26 href="http://www.monohispano.org/tutoriales/mono-puf//">Spanish
27 translation</a> is also available (it is outdated though)
28
29 <a name="basics"></a>
30 ** Basics
31
32 Q: What is Mono exactly?
33
34 A: The Mono Project is an open development initiative sponsored by
35    Ximian that is working to develop an open source, Unix
36    version of the Microsoft .NET development platform.  Its objective
37    is to enable Unix developers to build and
38    deploy cross-platform .NET Applications.  The project will
39    implement various technologies developed by Microsoft that have now
40    been submitted to the ECMA for standardization.
41
42    The Mono project has also sparked a lot of interest in developing
43    C#-based components, libraries and frameworks.  Today Mono is not
44    limited to implement the .NET Framework, but also contains other
45    components.  Some of the components of the Mono platform were
46    developed by the Mono team, and some others we have incorporated
47    from other open source efforts, the most important ones:
48
49    <ul>
50         <li><a
51         href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a>: A
52         CORBA implementation for Mono.
53
54         <li>Ginzu: An implementation on top of Remoting for the <a
55         href="http://www.zeroc.com">ICE</a> stack
56
57         <li><a href="http://gtk-sharp.sf.net">Gtk#</a>: Bindings for
58         the popular Gtk+ GUI toolkit for Unix and Windows systems.
59         Other bindings are available: Diacanvas-Sharp and MrProject.
60
61         <li><a
62         href="http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx">#ZipLib</a>:
63         A library to manipulate various kinds of compressed files and
64         archives (Zip and tar).
65
66         <li>GlGen (available from the Mono CVS): Bindings for OpenGL.
67
68         <li>Mono.LDAP: LDAP access for .NET apps.
69
70         <li>Mono.Data: We ship support for Postgress, MySql, Sybase,
71         DB2, SqlLite, Tds (SQL server protocol) and Oracle databases. 
72
73         <li>Mono.Cairo: Bindings for the <a
74         href="http://www.cairographics.org">Cairo</a> rendering
75         engine (Our System.Drawing is implemented on top of this).
76
77         <li>Mono.Posix: Bindings for building POSIX applications using
78         C#. 
79
80         <li>Mono.Http: Support for creating custom, embedded HTTP
81         servers and common HTTP handlers for your applications.
82    </ul>
83
84 Q: What is the difference between Mono and the .NET Initiative?
85
86 A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
87    Microsoft, one part of which is a cross-platform development
88    framework.  Mono is an implementation of the development framework,
89    but not an implementation of anything else related to the .NET
90    Initiative, such as Passport or software-as-a-service.
91
92 Q: What technologies are included in Mono?
93
94 A: Mono contains a number of components useful for building new
95    software:
96
97         <ul>
98                 * A Common Language Infrastructure (CLI) virtual
99                   machine that contains a class loader, Just-in-time
100                   compiler, and a garbage collecting runtime.
101
102                 * A class library that can work with any language
103                   which works on the CLR.  Both .NET compatible class
104                   libraries as well as Mono-provided class libraries
105                   are included.
106
107                 * A compiler for the C# language.  In the future we
108                   might work on other compilers that target the Common
109                   Language Runtime.
110         </ul>
111
112
113    Windows has compilers that target the virtual machine from <a
114    href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
115    number of languages:</a> Managed C++, Java Script, Eiffel,
116    Component Pascal, APL, Cobol, Perl, Python, Scheme,
117    Smalltalk, Standard ML, Haskell, Mercury and Oberon.
118
119    The CLR and the Common Type System (CTS) enables applications and
120    libraries to be written in a collection of different languages that
121    target the byte code
122
123    This means for example that if you define a class to do algebraic
124    manipulation in C#, that class can be reused from any other
125    language that supports the CLI.  You could create a class in C#,
126    subclass it in C++ and instantiate it in an Eiffel program. 
127
128    A single object system, threading system, class libraries, and
129    garbage collection system can be shared across all these languages.
130    
131 Q: Where can I find the specification for these technologies?
132
133 A: You can find the information here:
134  
135
136    C# <a href="http://www.ecma.ch/ecma1/STAND/ecma-334.htm">http://www.ecma.ch/ecma1/STAND/ecma-334.htm</a>
137
138    CLI <a href="http://www.ecma.ch/ecma1/STAND/ecma-335.htm">http://www.ecma.ch/ecma1/STAND/ecma-335.htm</a>
139
140 Q: Will you implement the .NET Framework SDK class libraries?
141
142 A: Yes, we will be implementing the APIs of the .NET Framework SDK
143    class libraries. 
144
145 Q: Will you offer an ECMA-compliant set of class libraries?
146
147 A: Eventually we will.  Our current focus is on inter-operating
148    with the Microsoft SDK, but we will also offer an ECMA compliant
149    subset of the libraries. 
150
151 Q: What does the name "Mono" mean?
152
153 A: Mono is the word for `monkey' in Spanish. We like monkeys.  
154
155 Q: Does Mono work today?
156
157 A: The execution engine works on various platforms, we support
158    Just-in-Time and Ahead-of-Time compilations on Intel x86 machines
159    (and soon PowerPC).
160
161    The class libraries are mature enough to run various real
162    applications: our C# compiler, ASP.NET, and Gtk#-based
163    applications.
164
165 Q: When will you ship Mono?
166
167 A: Please see the <a href="mono-roadmap.html">Mono Roadmap</a> for
168    more details on the release plans.  
169
170 Q: How can I contribute?
171
172 A: Check the <a href="contributing.html">contributing</a> section. 
173
174 Q: Aren't you just copying someone else's work?
175
176 A: We are interested in providing the best tools for programmers to
177    develop applications for Free Operating Systems.  We also want to help
178    provide the interoperability that will allow those systems to fit in
179    with other standards.
180
181    For more background, read the <a href="http://www.go-mono.com/rationale.html">Mono
182    Project white paper</a>.
183    the project.
184
185 Q: Miguel said once that Mono was being implemented in COBOL. Is that true?.
186
187 A: No. It was a joke.
188
189
190 <a name="novell"></a> 
191
192 ** The Novell Role in the Mono Project
193
194 Q: Why is Novell working on .NET?
195
196 A: Novell is interested in providing the best tools for programmers to
197    develop applications for Free Operating Systems.
198
199    For more information, read the project <a
200    href="rationale.html">rationale</a> page.
201
202 Q: Will Novell be able to take on a project of this size?  
203
204 A: Of course not.  Novell is a supporter of the Mono project, but the only way
205    to implement something of this size is for the entire free software
206    community to get involved. Visit the <a href="contributing.html">contributing</a> 
207    page if you'd like to help out.
208
209 Q: What pieces Novell be working on?
210
211 A: We will devote most of our resources to work on the pieces which are
212    on the critical path to release a development and execution
213    environment. Once the project is at a stage where it is useful in
214    the real world, it will achieve a critical mass of developers to
215    improve it further.
216
217 Q: Will Novell offer Mono commercially?
218
219 A: When Mono is ready to be shipped Ximian will offer a commercial
220    support and services for Mono. Mono components are also
221    available to be licensed commercially. For licensing details,
222    contact <a
223    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
224
225 Q: Does Novell provide consulting services around Mono?
226
227 A: Yes, Novell does provide consulting services around Mono to
228    make it suitable to your needs.  Porting the runtime engine,
229    customizing it, working on specific classes or tuning the code
230    for your particular needs. 
231
232    Please contact <a
233    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
234    for consulting services information.
235
236 Q: Will you wait until Mono is finished?
237
238 A: Mono will ship on various stages as they mature.  Some people
239    require only a subset of the technologies, those will ship first,
240    see the <a href="mono-roadmap.html">Mono Roadmap</a> for details
241
242 <a name="gnome"></a> 
243 ** Mono and GNOME
244
245 Q: How is Mono related to GNOME?
246
247 A: In a number of ways.  This project was born out of the need of
248    providing improved tools for the GNOME community, and will use
249    existing components that have been developed for GNOME when they
250    are available.  For example, we plan to use Gtk+ and Libart to
251    implement Winforms and the Drawing2D API and are considering
252    GObject support.
253
254    Mono team members work actively on the <a
255    href="http://gtk-sharp.sf.net">Gtk#</a> project: a binding of the
256    GNOME class libraries for .NET and Mono.
257
258 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
259
260 A: Mono is too new to be adopted by those groups. We hope that the
261    tools that we will provide will be adopted by free software
262    programmers including the GNOME Foundation members and the GNOME
263    project generally.
264
265 Q: Should GNOME programmers switch over to Mono now?
266
267 A: It is still far to early for discussions of "switching over."  No
268    pieces of Mono will be ready within the next six months, and a
269    complete implementation is roughly one year away.
270
271    We encourage GNOME developers to continue using the existing tools,
272    libraries and components.  Improvements made to GNOME will have an
273    impact on Mono, as they would be the "back-end" for various classes.
274
275 Q: Will Mono include compatibility with Bonobo components? What is the
276    relationship between Mono and Bonobo?
277
278 A: Yes, we will provide a set of classes for implementing and using
279    Bonobo components from within Mono.  Mono should allow you to write
280    Bonobo components more easily, just like .NET on Windows allows you
281    to export .NET components to COM.
282
283 Q: Does Mono depend on GNOME?
284
285 A: No, Mono does not depend on GNOME.  We use a few packages produced by
286    the GNOME team like the `glib' library, we also use other
287    third-party open source libraries like Cairo and ICU.
288
289 Q: But will I be able to build GNOME applications?
290
291 A: Yes, we will enable people to write GNOME applications using Mono.
292
293 Q: Do you have C# bindings for GNOME?.
294
295 A: Yes, the <a href="http://gtk-sharp.sf.net">Gtk# project</a>
296    provides bindings for Gtk+, Gdk, Atk, libgnome, libgnomecanvas, and
297    libgnomeui.  Other libraries under the GNOME framework will be
298    added on an as-needed (and as-requested) basis.
299
300 <a name="gui"></a>
301 ** GUI applications
302
303 Q: Will Mono enable GUI applications to be authored?
304
305 A: Yes, you will be able to build GUI applications.  Indeed, that is
306    our main focus.  Today you can use Gtk# or #WT to develop GUI
307    applications, and support for Windows.Forms is underway.
308
309 Q: What is the difference between Gtk# and System.Windows.Forms?
310
311 A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other
312    CIL-enabled languages), it integrates natively with the Gnome
313    desktop.  System.Windows.Forms is an API defined by Microsoft to
314    build GUI applications.
315
316    Windows.Forms is currently being implemented on top of a modified
317    version of Wine that can be used as a library: WineLib.
318
319 Q: Why not implement System.Windows.Forms on top of Gtk# or Qt#?
320
321 A: Compatibility.
322
323    Although it is possible to run simple Windows.Forms applications
324    with the Gtk#-based backend of Windows.Forms, it is very unlikely
325    that the implementation will ever implement everything needed for
326    full compatibility with Windows.Forms.
327
328    The reason is that Windows.Forms is not a complete toolkit, and to
329    work around this problem some of the underlying Win32 foundation is
330    exposed to the programmer in the form of exposing the Windows
331    message handler (WndProc).  Any control can override this method.
332    Also developers often P/Invoke into Win32 to get to functionality
333    that was not wrapped. 
334
335    To achieve full compatibility, we would have to emulate this, and
336    it would take too long.
337
338    For more details see the <a href="winforms.html">winforms page</a>
339
340 Q: Wine applications do not look like native applications, what are
341    you going to do about this?  
342
343 A: We have already a few patches into our version of Windows.Forms
344    that makes Wine use the colors and font settings from your desktop,
345    improving the integration a lot.   In the future, we will continue
346    to improve this interoperability scenario.
347
348 Q: Will I be able to run my smart clients on systems powered by Mono?
349
350 A: As long as your applications are 100% .NET and do not make use
351    of P/Invoke to call Win32 functions, your smart client applications
352    will run on Mono platforms.
353
354 Q: Where can I learn more about Gtk#?
355
356 A: The following <a href="http://gtk-sharp.sourceforge.net">link</a> sends you to the page of the project.
357
358 Q: What can I do with Gtk#?. 
359
360 A: Gtk# is becoming very usable and you can create applications and
361    applets like those you see in a GNOME desktop environment. It's 
362    easy to install so it's worth a try. 
363
364 Q: How can I compile my HelloWorld.cs which uses Gtk#?.
365
366 A: Try: mcs -r:gtk-sharp HelloWorld.cs
367
368 Q: Is there any way how to connect DataAdapter to some GTK# controls?
369
370 A: There is a sample file called `DbClient' in gtk-sharp/samples that you
371    might to look at.  It is a sample program in Gtk# that adds/updates/deletes 
372    information on a Postgress database. When we have the new table/tree widgets, 
373    I am sure someone would write an adapter for System.Data (in Gtk2 the 
374    tree/list widgets are written using a view/model, so you only need to write 
375    a model that maps to the database). You can have a look at 
376    gtk-sharp/sample/DbClient, where there is a GTK# application that uses 
377    System.Data. It does not use DataAdapter, but DataReader though.
378
379 Q: Do you have an estimate for when Windows.Forms will be released?
380
381 A: The plan currently is aimed at Q3/2004.
382
383
384 Q: Do you have a comparission chart about the various toolkit
385    offerings?
386
387 A: A document explaining this is available at: <a
388    href="http://primates.ximian.com/~miguel/toolkits.html">http://primates.ximian.com/~miguel/toolkits.html</a>.
389
390 <a name="msft"></a>
391 ** Mono and Microsoft
392
393 Q: Is Microsoft helping Ximian with this project?
394
395 A: There is no high level communication between Ximian and Microsoft
396    at this point, but engineers who work on .NET or the ECMA groups
397    have been very friendly, and very nice to answer our questions, or
398    clarify part of the specification for us. 
399
400    Microsoft is interested in other implementations of .NET and are
401    willing to help make the ECMA spec more accurate for this purpose.
402
403    Ximian was also invited to participate in the ECMA committee
404    meetings for C# and the CLI.
405
406 Q: Are Microsoft or Corel paying Ximian to do this?
407
408 A: No.
409
410 Q: Do you fear that Microsoft will change the spec and render Mono
411    useless?
412
413 A: No.  Microsoft proved with the CLI and the C# language that it was
414    possible to create a powerful foundation for many languages to
415    inter-operate.  We will always have that.  
416
417    Even if changes happened in the platform which were undocumented,
418    the existing platform would a value on its own.
419
420 Q: Are you writing Mono from the ECMA specs?
421
422 A: Yes, we are writing them from the ECMA specs and the published
423    materials in print about .NET.
424
425 Q: If my applications use Mono, will I have to pay a service fee?
426
427 A: No.  Mono is not related to Microsoft's initiative of
428    software-as-a-service.
429
430 Q: Is the Mono Project is related to the Microsoft Hailstorm effort?  Is
431    Ximian endorsing Hailstorm?  
432
433 A: No.  The Mono Project is focused on providing a compatible set of
434    tools for the Microsoft .NET development platform.  It does not
435    address, require, or otherwise endorse the MS Passport-based
436    Hailstorm single sign-on system that is part of Windows XP and
437    other services.
438
439 Q: Will Mono or .NET applications depend on Microsoft Passport?
440
441 A: No. MS Passport is unrelated to running .NET compatible applications
442    produced with the Mono tools.  The only thing you will need is a
443    just-in-time compiler (JIT).
444
445 Q: If Microsoft will release a port of their .NET platform under the
446    `Shared Source' license, why should I bother with anything else?
447
448 A: The Shared Source implementation will be expensive and its uses
449    will be tightly restricted, especially for commercial use. We are
450    working towards an implementation that will grant a number of
451    important rights to recipients: use for any purpose,
452    redistribution, modification, and redistribution of modifications.
453
454    This is what we call <a
455    href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
456
457 Q: Is Mono a free implementation of Passport?
458
459 A: No. Mono is just a runtime, a compiler and a set of class
460    libraries.
461
462 Q: Will the System.Web.Security.PassportIdentity class mean
463    that my software will depend on Passport?
464    
465 A: No.  Applications may use that API to contact a Passport site, but
466    are not required to do so.
467
468    As long as your application does not use Passport, you will not
469    need Passport.  
470
471 Q: Will Mono running on Linux make Passport available for Linux?
472
473 A: No.  However, the Passport toolkit for Linux-based web servers is
474    available from Microsoft.
475
476 Q: Will Mono allow me to run Microsoft Office on Linux?
477
478 A: No, it will not.  Microsoft Office is a Windows application.  To
479    learn more about running Windows applications on Intel Unix systems
480    refer to <a href="http://www.winehq.com">the Wine Project</a>.
481
482 Q: Can mono run the WebMatrix?
483
484 A: No. That requires System.Windows.Forms support which is not
485    currently implemented.
486
487 Q: Does mono have something like Passport? 
488    Will mono have a server side Passport/Similar framework for XSP as well as client classes?
489
490 A: Not yet, but the client side API for authentication is not the problem. 
491    We will likely have a lot of other authentication APIs, like the Liberty
492    Alliance APIs. The problem is people on the web provider end that might use 
493    this for authentication.
494
495 <a name="platforms"></a>
496 ** Mono Platforms 
497
498 Q: What operating systems does Mono run on?
499
500 A: Mono is known to run on Linux, Unix and Windows systems.   
501
502 Q: What architectures does Mono support?
503
504 A: Mono today ships with a Just-in-Time compiler for x86-based
505    systems.  It is tested regularly on Linux, FreeBSD and Windows
506    (with the XP/NT core).
507
508    There is also an interpreter, which is slower that runs on the
509    s390, SPARC and PowerPC architectures.
510
511 Q: Can Mono run on Windows 9x, or ME editions?
512
513 A: Mono requires Unicode versions of Win32 APIs to run,
514    and only a handful of *W functions is supported under Win9x.
515
516    There is Microsoft Layer for Unicode that provides implementation
517    of these APIs on 9x systems.
518
519    Unfortunately it uses linker trick for delayed load that is not
520    supported by ld, so some sort of adapter is necessary.
521    
522    You will need MSLU and one of the following libs to link Mono to
523    unicows.dll <a
524    href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
525    or alternatively search the net for "libunicows".
526
527    No changes to Mono source code required, the only thing is to make
528    sure that linker will resolve imports to adapter library instead of
529    Win32 libs. This is achieved by inserting -lunimono before
530    -lkerner32/user32 in the linker's specs file.
531
532 Q: Why support Windows, when you can run the real thing?
533
534 A: There are various reasons:
535
536    <ul>
537       <li> About half the contributors to Mono are Windows developers.
538            They have many different for contributing to the effort, and
539            we find it very important to let those developers run the runtime on Windows without forcing
540            them to use a new operating system. 
541           
542       <li> Supporting Windows helps us identify the portable portions
543            of Mono from the non-portable versions of it, helping Mono
544            become more portable in the future.
545
546       <li> Mono does not heavily modify the windows registry, update system DLLs,
547            install DLLs to the Windows/System32 path.  Another words, I knew Mono would
548            not cause any legacy enterprise applications to stop working - and it
549            hasn't.  However, our CIO er is againt it because of the changes that would
550            be made to Windows 2000, such as, affecting security.
551    </ul>
552
553 <a name="compatibility"></a>
554 ** Compatibility
555
556 Q: Can Mono run applications developed with the Microsoft.NET framework?
557
558 A: Yes, Mono can run applications developed with the Microsoft .NET Framework
559    on Unix.  There are a few caveats to keep in mind: Mono has not
560    been completed yet, so a few API calls might be missing; And in
561    some cases the Mono behavior *might* be incorrect.
562
563 Q: Will missing API entry points be implemented?
564
565 A: Yes, the goal of Mono is to implement precisely the .NET Framework
566    API (as well as compile-time selectable subsets, for those
567    interested in a lighter version of Mono).
568
569 Q: If the behavior of an API call is different, will you fix it?
570
571 A: Yes, we will.  But we will need your assistance for this.  If you find a bug
572    in the Mono implementation, please fill a bug report in <a
573    href="http://bugzilla.ximian.com">http://bugzilla.ximian.com</a>.
574    Do not assume we know about the problem, we might not, and using the bug tracking
575    system helps us organize the development process.
576
577 Q: Can I develop my applications on Windows, and deploy on a supported
578    Mono platform (like Linux)?
579
580 A: Yes, you can.  
581
582    As of today, Mono is not 100% finished, so it is sometimes useful
583    to compile the code with Mono, to find out if your application
584    depends on unimplemented functionality. 
585
586 Q: Will applications run out the box with Mono?
587
588 A: Sometimes they will.  But sometimes a .NET application might invoke
589    Win32 API calls, or assume certain patterns that are not correct
590    for cross-platform applications.
591
592 Q: What is a 100% .NET application?
593
594 A: A `100% .NET application' is one that only uses the APIs defined
595    under the System namespace and does not use P/Invoke.  These
596    applications would in theory run unmodified on Windows, Linux,
597    HP-UX, Solaris, MacOS X and others. 
598
599    Note that this requirement also holds for all assemblies used by the
600    application.  If one of them is Windows-specific, then the entire program
601    is not a 100% .NET application.
602
603    Furthermore, a 100% .NET application must not contain non-standard data
604    streams in the assembly.  For example, Visual Studio .NET will insert a 
605    <tt>#-</tt> stream into assemblies built under the "Debug" target.  
606    This stream contains debugging information for use by Visual Studio .NET; 
607    however, this stream can not be interpreted by Mono (unless you're willing 
608    to donate support).
609
610    Thus, it is recommended that all Visual Studio .NET-compiled code be
611    compiled under the Release target before it is executed under Mono.
612
613 Q: Can I execute my Visual Studio .NET program (Visual Basic .NET, Visual C#,
614    Managed Extensions for C++, etc.) under Mono?
615
616 A: Yes, with some reservations.
617
618    The .NET program must either be a 100% .NET application, or (somehow) have
619    all dependent assemblies available on all desired platforms.  (How to do so
620    is outside the bounds of this FAQ.)
621
622    Mono must also have an implementation for the .NET assemblies used.  For
623    example the System.EnterpriseServices namespace is part of .NET, but it
624    has not been implemented in Mono.  Thus, any applications using this
625    namespace will not run under Mono.
626
627    With regards to languages, C# applications tend to be most portable.
628
629    Visual Basic .NET applications are portable, but Mono's 
630    Microsoft.VisualBasic.dll implementation is incomplete.  It is recommended 
631    to either avoid using this assembly in your own code, only use the 
632    portions that Mono has implemented, or to help implement the missing
633    features.  Additionally, you can set 'Option Strict On', which
634    eliminates the implicit calls to the unimplemented
635    Microsoft.VisualBasic.CompilerServices.ObjectType class.  
636    (Thanks to Jörg Rosenkranz.)
637
638    Managed Extensions for C++ is least likely to operate under Mono.  Mono
639    does not support mixed mode assemblies (that is, assemblies containing both
640    managed and unmanaged code, which Managed C++ can produce).  You need a
641    fully-managed assembly to run under Mono, and getting the Visual C++ .NET
642    compiler to generate such an executable can be difficult.  You need to use
643    only the .NET-framework assemblies, not the C libraries (you can't use
644    <b>printf</b>(3) for example.), and you need to use
645    the linker options <tt>/nodefaultlib /entry:main mscoree.lib</tt> in
646    addition to the <tt>/clr</tt> compiler flag.  You can still use certain
647    compiler intrinsic functions (such as <b>memcpy</b>(3)) and the STL.
648    You should also see <a 
649    href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgrfconvertingmanagedextensionsforcprojectsfrommixed-modetopureil.asp"
650    >Converting Managed Extensions for C++ Projects from Mixed Mode to Pure
651    Intermediate Language</a> at MSDN.
652    Finally, you can use PEVERIFY.EXE from the .NET SDK to determine if the 
653    assembly is fully managed.
654
655    Thanks to Serge Chaban for the linker flags to use.
656
657 <a name="pnpproject"></a>
658 ** Mono and Portable.NET
659
660 Q: What are the differences between Mono and Portable.NET?
661
662 A: Most of Mono is being written using C#, with only
663    a few parts written in C (The JIT engine, the runtime, the
664    interfaces to the garbage collection system).  
665
666    It is easier to describe what is unique about Mono:
667    <ul>
668      <li> An advanced native-code compilation engine: Both
669           just-in-time compilation (JIT) and pre-compilation of CIL
670           bytecodes into native code are supported.
671
672      <li> A foundation for code optimization: The new code generator in
673           Mono builds on the experience of our first JIT engine, and enables
674           us to implement various advanced compiler optimization
675           tricks.  With an SSA-framework, plenty of new optimizations are possible. 
676
677           The current list of optimizations are: Peephole postpass,
678           Branch optimizations, Inline method calls, Constant folding, Constant
679           propagation, Copy propagation, Dead code elimination, Linear scan
680           global reg allocation, Conditional moves, Emit per-domain code,
681           Instruction scheduling, Intrinsic method implementations, Tail
682           recursion and tail calls, Loop related optimizations, Fast x86 FP
683           compares, Leaf procedures optimizations
684
685      <li> A self-hosting C# compiler written in C#, which is clean, easy
686           to maintain.
687
688      <li> Focus on the .NET Framework: we are tracking down the .NET
689           Framework API definition, as we believe it is the API people
690           will be most familiar with.
691
692      <li> A multi-platform runtime engine: both a JIT engine and an
693           interpreter exist.  The JIT engine runs currently on x86
694           systems, while the interpreter works on SPARC, StrongARM,
695           s390 and PowerPC systems.  
696
697           Our new compilation engine is being ported to the PowerPC.
698
699      <li> Supports Linux, BSD, Windows and Solaris at this point.
700
701      <li> The JIT engine is written using a portable instruction
702           selector which not only generates good code but
703           is also the foundation to re-target the JIT engine to other
704           systems.  
705
706      <li> Full support for remoting in the runtime.
707
708      <li> The C# compiler, the JIT engine and the class libraries are
709           mature enough that the whole system has been self-hosting
710           since April 2002.  This means that we develop Mono
711           completely with itself at this point.
712
713           By forcing ourselves to use our own code to develop our
714           tools, we bug fix problems rapidly, and the system is
715           overall more robust and tested than if we did not.
716
717      <li> We have a great community of developers, without which Mono
718           would not be possible.
719    </ul>
720
721    In general, Mono is more mature and complete since it has been used
722    to develop itself, which is a big motivator for stability and
723    correctness, while Portable.NET remains pretty much an untested
724    platform.
725
726 Q: I hear Mono keeps changing the P/Invoke API, why?
727
728 A: We are just fixing our implementation to be compatible with the
729    Microsoft implementation.  In other words, the Mono P/Invoke API is
730    more complete when compared to the Portable.NET version, hence
731    various pieces of software that depend on this extended
732    functionality fail to work properly with Portable.NET.
733
734 <a name="webservices"></a>
735 ** Web Services
736
737 Q: How is Mono related to Web Services?
738
739 A: Mono is only related to Web Services in that it will implement the
740    same set of classes that have been authored in the .NET Framework
741    to simplify and streamline the process of building Web Services.
742
743    But most importantly, Mono is an Open Source implementation of the
744    .NET Framework.
745
746 Q: Can I author Web Services with Mono?
747
748 A: You will be able to write Web Services on .NET that run on Mono and
749    vice-versa. 
750
751 Q: If Mono implements the SDK classes, will I be able to write and
752    execute .NET Web Services with it?
753    
754 A: Yes.  When the project is finished, you will be able to use the
755    same technologies that are available through the .NET Framework SDK
756    on Windows to write Web Services.
757
758 Q: What about Soup?  Can I use Soup without Mono?
759
760 A: Soup is a library for GNOME applications to create SOAP servers and
761    SOAP clients, and can be used without Mono.  You can browse the
762    source code for soup using <a
763    href="http://cvs.gnome.org/bonsai/">GNOME's Bonsai</a>.
764
765 Q: Can I use CORBA?
766
767 A: Yes. The CLI contains enough information about a class that
768    exposing it to other RPC systems (like CORBA) is really simple, and
769    does not even require support from an object.  
770
771    <a href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a> is
772    a CORBA implementation that is gaining momentum.
773
774    Building an implementation of the Bonobo interfaces once this is ready
775    should be relatively simple. 
776
777 Q: Can I serialize my objects to other things other than XML?
778
779 A: Yes, although the serializing tools have not yet been planned, and
780    you would probably have to implement them yourself.
781
782 Q: Will Mono use ORBit?
783
784 A: There are a few advantages in using ORBit, like reusing existing code
785    and leveraging all the work done on it.  Michael Meeks has posted
786    a few <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008592.html">reasons</a>,
787    as well as some <a href="http://lists.ximian.com/archives/public/mono-list/2002-September/008657.html">ideas</a>
788    that could be used to reuse ORBit.
789
790    Most users are likely to choose a native .NET solution, like <a href="http://cvs.gnome.org/bonsai">Remoting.CORBA</a>
791
792
793 <a name="monodoc"></a>
794 ** MonoDoc
795
796 Q: What is MonoDoc?
797
798 A: MonoDoc is a graphical documentation browser for the Mono class
799    libraries. Currently, monodoc consists of a Gtk# application and is
800    in heavy development.
801
802 <a name="devel"></a>
803 ** Development Tools and Issues
804
805 Q: I am having trouble compiling a new version of Mono from CVS, it 
806    complains about my runtime being out of sync.
807
808 A: To upgrade your class libraries and compiler, see the 
809    INSTALL.txt in the MCS directory.
810
811    The single biggest source of confusion seems to be the "Your
812    runtime is out of sync" messages.  Realize that this is *normal*
813    while BUILDING.  Think about it: you're building a new class
814    library with the old runtime.  If the new class library references
815    a function that the old runtime knows nothing about, the runtime
816    system issues this warning.
817
818    Basically what needs to happen is for a new mono runtime to be
819    compiled, then the corlib class library be compiled, and once this
820    is done, install the new runtime, followed by corlib.
821
822    Once this is done, you can continue building your entire
823    environment.
824
825    For instance you just need to:
826    1.- Upgrade your Mono runtime (you might better do it with the 
827    mono-build.sh script available in the <a 
828    href="http://www.go-mono.com">download</a> page.
829    2.- Get the latest mono-lite tarball from the daily snapshots 
830    <a href="http://www.go-mono.com/daily/">page</a>, unzip and 
831    untar and copy all the dll files to your install path lib 
832    directory (typically pointed by the $MONO_PATH variable).
833    Copy all the exe files to the install path bin directory.
834    3.- Then checkout or update your mcs CVS copy. Then follow 
835    the steps described in mcs/INSTALL.txt.
836
837 Q: Will it be possible to use the CLI features without using byte codes
838    or the JIT?
839
840 A: Yes. The CLI engine will be made available as a shared library.
841    The garbage collection engine, the threading abstraction, the
842    object system, the dynamic type code system and the JIT will be
843    available for C developers to integrate with their applications if
844    they wish to do so. 
845
846 Q: Will you have new development tools?
847
848 A: With any luck, Free Software enthusiasts will contribute tools to
849    improve the developer environment.  These tools could be developed
850    initially using the Microsoft implementation of the CLI and then
851    executed later with Mono.
852
853    We are recommending people to use and contribute to existing
854    projects like SharpDevelop, Anjuta and Eclipse.
855
856 Q: What kind of rules make the Common Intermediate Language useful for
857    JITers?
858
859 A: The main rule is that the stack in the CLI is not a general purpose
860    stack.   You are not allowed to use it for other purposes than
861    computing values and passing arguments to functions or return
862    values.  
863
864    At any given call or return instruction, the types on the stack
865    have to be the same independently of the flow of execution of your
866    code. 
867
868 Q: Is it true that the CIL is ideal for JITing and not efficient for
869    interpreters?
870
871 A: The CIL is better suited to be JITed than JVM byte codes, but you
872    can interpret them as trivially as you can interpret JVM byte
873    codes. 
874
875 Q: Isn't it a little bit confusing to have the name of "XSP" (the same 
876    as in the Apache Project) for the ASP.NET support in Mono?.
877
878 A: In Mono, xsp is just the name of the C# code generator for ASP.NET 
879    pages. In the Apache Project, it is a term for the "eXtensible Server 
880    Pages" technology so as they are very different things, they don't 
881    conflict.
882
883 Q: Is there any plan to develop an aspx server for Mono?.
884
885 A: The XSP reference server is available and you can also use mod_mono
886    with Apache.
887
888 Q: Is there any way I can develop the class libraries using Linux yet?
889
890 A: Yes.  Mono has been self hosting since May 2002.
891
892 Q: Is there any way I can install a known working copy of mono in /usr, 
893    and an experimental copy somewhere else, and have both copies use 
894    their own libraries? (I'm still not very good at library paths in 
895    Linux)
896
897 A: Yes. Just use two installation prefixes.
898
899 Q: How should I write tests or a tests suite?
900
901 A: If you do a test suite for C#, you might want to keep it 
902    independent of the Mono C# compiler, so that other compiler 
903    implementations can later use it.  
904
905 Q: Would it be too terrible to have another corlib signed as mscorlib? 
906
907 A: We rename corlib to mscorlib also when saving the PE files, in fact, 
908    the runtime can execute program created by mono just fine.  
909
910 Q: Is it possible to build a C# file to some sort of intermediate format which 
911    can linked into a final module, like the traditional .c -> .o -> .so path? 
912    
913 A: You can use: 
914
915         mcs /target:library file1.cs, mcs /target:library file2.cs, 
916         mcs /target:exe file1.dll file2.dll /out:mybin.exe
917
918 Q: Is there any plans for implementing remoting in the near future?
919
920 A: The remoting infrastructure is in place.  We have implementations
921    of the TcpChannel, HttpChannel and the Soap and Binary Formatters.
922    They are compatible with .NET.
923
924    However, some classes from the library may have a different binary
925    representation, because they may have a different internal data
926    structure, so for example you won't be able to exchange a Hastable
927    object between Mono and MS.NET. It should not be a problem if you
928    are using primitive types, arrays or your own classes. In any case,
929    could you post a test case?
930
931
932 Q: My C code uses the __stdcall which is not availble on Linux, how can I
933    make the code portable Windows/Unix across platforms?
934
935 A: Replace the __stdcall attribute with the STDCALL macro, and include this
936    in your C code for newer gcc versions:
937
938         #ifndef STDCALL
939         #define STDCALL __attribute__((stdcall))
940         #endif
941
942 Q: I want to be able to execute Mono binaries, without having to use the "mono"
943    command.  How can I do this?
944
945 A: From Carlos Perelló:
946
947    <i>I think that the best solution is the binfmt feature with the
948    wrapper that exists with Debian packages at:
949
950    <a href="http://www.debianplanet.org/mono/dists/unstable/main/source/admin/">http://www.debianplanet.org/mono/dists/unstable/main/source/admin/</a>
951
952    If you want use it with Big endian machines, you should apply a patch
953    (<a href="http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff">http://carlos.pemas.net/debian/mono/binfmt-detector-cli.c.diff</a>)
954
955    It works really good and lets you use wine also, it reads the .exe file
956    headers and check if it's a .net executable.
957
958    This way you just execute: ./my-cool-mono-application.exe and it works
959    without the need of any wrapper.</i>
960
961 Q: I see funny characters when I run programs, what is the problem?
962
963 A: (From Peter Williams and Gonzalo Paniagua):
964
965    This is Red Hat 9 (probably) using UTF8 on its console; the bytes are
966    the UTF8 endianness markers.   You can do:
967  
968          LC_ALL=C mono myexe.exe
969
970    And they wont show up.
971
972    Alternatively, you can do:
973
974         $ echo -e "\033%G"
975
976    to enable UTF-8 on the console.
977
978 <a name="asp">
979 ** Mono and ASP.NET
980
981 Q: Does Mono support ASP.NET?
982
983 A: Yes. 
984
985    Mono supports ASP.NET, we have shown an unmodified IBuySpy
986    installation running on Mono as well as various other programs.  You can
987    try it yourself downloading the XSP server. 
988
989 Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since 
990    it is self host right now.
991
992 A: Linux is enough.
993
994 Q: How can I run ASP.NET-based applications with Mono?
995
996 A: You need the Mono runtime and a hosting web server.  Currently we distribute a 
997    small web server called `xsp' which is used to debug applications, or you can choose
998    to use Daniel's Apache 2 module.
999
1000 Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
1001
1002 A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
1003    and is available here: <a
1004    href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
1005
1006 Q: Will you support Apache 1?
1007
1008 A: Modules developed for Apache 2 are not compatible with Apache 1.3
1009    Daniel plans to support Apache 1.3 in the future but the current focus is on
1010    Apache 2, because of the better support for threading and Windows.
1011
1012 Q: Can I run Apache 1 and Apache 2 on the same machine?
1013
1014    You can always keep a copy of Apache 2 running in parallel with your Apache
1015    1.3 (either different port or using a reverse proxy).
1016
1017    You can also bind the two servers to different IP addresses on the
1018    same physical machine.
1019
1020 <a name="ado">
1021 ** Mono and ADO.NET
1022
1023 Q: What is the status of ADO.NET support?. Could I start migrating 
1024    applications from MS.NET to Mono?.
1025
1026 A: You could start right now using the ADO.NET support in mono, of course,
1027    if you want to help filling the missing gaps while you develop your app
1028    :-) Well, what I mean is that we're not that far to having full ADO.NET
1029    support in Mono, and we've got a lot of working things, so if we could
1030    get more help, we'd finish it really soon :-)
1031
1032 Q: In developing the data architecture for the application are there and
1033    objects I should stay away from in order to insure the smoothest possible
1034    transition (minimum code rewrite) to Mono's ADO.NET implementation?  (For
1035    example, strongly typed datasets versus untyped datasets, etc...)
1036
1037 A: We are implementing all the classes in Microsoft .NET's System.Data, so
1038    you can be sure that things will work the same in Mono as with the Microsoft
1039    implementation. 
1040
1041 Q: Does Mono can to connect to Sybase by using Mono.Data.*?
1042
1043 A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
1044    SybaseConnection, and then, from it, use it as any other
1045    IDbConnection-based class.
1046
1047 <a name="java">
1048 ** Mono and Java
1049    
1050 Q: Why don't you use Java?  After all, there are many languages that
1051    target the Java VM.
1052
1053 A: You can get very good tools for doing Java development on free
1054    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
1055    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
1056    href="http://gcc.gnu.org/java/">front-end for Java</a> that can take
1057    Java sources or Java byte codes and generate native executables; <a
1058    href="http://www.google.com/search?q=transvirtual">Transvirtual</a>
1059    implemented
1060    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
1061    Intel also has a Java VM called <a
1062    href="http://www.intel.com/research/mrl/orp/">ORP</a>.
1063
1064    The JVM is not designed to be a general purpose virtual machine.
1065    The Common Intermediate Language (CIL), on the other hand, is
1066    designed to be a target for a
1067    wide variety of programming languages, and has a set of rules
1068    designed to be optimal for JITers.
1069
1070 Q: Could Java target the CLI?
1071
1072 A: Yes, Java could target the CLI, Microsoft's J# compiler does that.
1073
1074    The <a href="http://weblog.ikvm.net/">IKVM</a> project builds a
1075    Java runtime that works on top of .NET and on top of Mono.  IKVM is
1076    essentially a JIT compiler that translates from JVM bytecodes into
1077    CIL instructions, and then lets the native JIT engine take over. 
1078
1079 Q: Is it possible to write a JVM byte code to CIL converter?
1080
1081 A: Yes, this is what <a href="http://weblog.ikvm.net">IKVM</a> does.
1082
1083 Q: Could mono become a hybrid CIL/java platform?
1084
1085 A: This can be obtained easily with IKVM.
1086
1087 Q: Do you plan to implement a Javascript compiler?
1088
1089 A: Yes.  The beginnings of the JScript compiler can be found on CVS.
1090    Cesar coordinates this effort.
1091
1092 Q: Can Mono or .NET share system classes (loaded from mscore.dll and other 
1093    libs) or will it behave like Sun's Java VM?
1094
1095 A: What you can do with mono is to load different applications in their own
1096    application domain: this is a feature of the CLR that allows sandboxing
1097    applications inside a single process space. This is usualy exploited to
1098    compartmentalize different parts of the same app, but it can also be
1099    effectively used to reduce the startup and memory overhead.
1100    Using different appdomains the runtime representation of types and
1101    methods is shared across applications.
1102
1103 <a name="extending"></a>
1104 ** Extending Mono
1105
1106 Q: Would you allow other classes other than those in the
1107    specification?
1108
1109 A: Yes.  The Microsoft class collection is very big, but it is by no
1110    means complete.  It would be nice to have a port of `Camel' (the
1111    Mail API used by Evolution inspired by Java Mail) for Mono
1112    applications.  
1113
1114    You might also want to look into implementing CORBA for Mono.  Not
1115    only because it would be useful, but because it sounds like a fun
1116    thing to do, given the fact that the CLI is such a type rich
1117    system. 
1118
1119    For more information on extending Mono, see our <a
1120    href="ideas.html">ideas</a> page.
1121
1122 Q: Do you plan to Embrace and Extend .NET?
1123
1124 A: Embracing a good technology is good.  Extending technologies in
1125    incompatible ways is bad for the users, so we do not plan on 
1126    making incompatible changes to the technologies.
1127
1128    If you have innovative ideas, and want to create new classes, we 
1129    encourage you to make those classes operate correctly well in both
1130    Mono and .NET.
1131
1132    Today Mono ships with a number of extra libraries that were
1133    developed either by members of the Mono community, or other
1134    groups.  
1135
1136    In some cases, we have found the bits from Microsoft to be
1137    incomplete, but we avoid breaking the API, instead we expose the
1138    missing functionality in new assemblies (See Mono.Security and
1139    System.Security).
1140
1141 Q: Is there any way I can develop the class libraries using Linux yet?
1142
1143 A: Yes.  Mono has been selfhosting since March 2002. 
1144
1145 Q: Is there any way I can install a known working copy of mono in /usr, 
1146    and an experimental copy somewhere else, and have both copies use 
1147    their own libraries? (I'm still not very good at library paths in 
1148    Linux)
1149
1150 A: Yes. Just use two installation prefixes.
1151
1152
1153 <a name="portability"></a>
1154 ** Portability
1155
1156 Q: Will Mono only work on Linux?
1157
1158 A: Currently, we are doing our work on Linux-based systems and
1159    Windows.  We do not expect many Linux-isms in the code, so it
1160    should be easy to port Mono to other UNIX variants.   
1161
1162 Q: What about Mono on non Linux-based systems?
1163
1164 A: Our main intention at Ximian is to be able to develop GNOME
1165    applications with Mono, but if you are interested in providing a
1166    port of the Winforms classes to other platforms (frame buffer or
1167    MacOS X for example), we would gladly integrate them, as long
1168    they are under an open source license.  
1169
1170 Q: What operating systems/CPUs do you support
1171
1172 A: Mono currently runs on Linux, Windows, Solaris, FreeBSD, HP-UX and
1173    MacOS X.
1174
1175    There is a JIT engine available for x86 processors that can
1176    generate code and optimizations tailored for a particular CPU.
1177
1178    Interpreters exist for the SPARC v8, SPARC v9, Itanium, HP-PA,
1179    PowerPC and StrongARM CPUs.
1180
1181 Q: Does Mono run on Windows?
1182
1183 A: Yes.   You can get pre-compiled
1184    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1185
1186 Q: Does Mono run on Linux?
1187
1188 A: Yes.  You can get pre-compiled
1189    binaries from <a href="http://www.go-mono.com/download.html">http://www.go-mono.com/download.html</a>
1190
1191 Q: Will I require Cygwin to run mono?
1192
1193 A: No.  Cygwin is only required to build Mono.
1194
1195 Q: Will Mono depend on GNOME?
1196
1197 A: It will depend only if you are using a particular assembly (for
1198    example, for doing GUI applications).  If you are just interested
1199    in Mono for implementing a `Hello World Enterprise P2P Web
1200    Service', you will not need any GNOME components.
1201
1202 Q: Do you plan to port Rhino to C#?.
1203
1204 A: Eto Demerzal has started a Rhino port to C#.
1205
1206 Q: Has anyone succeeded in building a Mac version of the C# environment. 
1207    If so can you explain how?  
1208
1209 A: You could try to check with the Darwin people, or the Fink people.
1210    Mono/C# is self hosting on Linux/PPC which is the hard part, so it
1211    should be relatively simple to get it to work on MacOS
1212
1213 <a name="reuse"></a>
1214 ** Reusing Existing Code
1215
1216 Q: What projects will you reuse or build upon?
1217
1218 A: We want to get Mono in the hands of programmers soon.  We are
1219    interested in reusing existing open source software.
1220
1221 Q: Will I be able to use Microsoft SQL Server 2000 or will I need to switch
1222    to a specific Open Source Database. Will I need to recode?
1223
1224 A: There is no need to rewrite your code as long as you keep using
1225    Microsoft SQL Server.  If you want to use an open source database,
1226    you might need to make changes to your code.
1227
1228 Q: What do I need to watch out for when programming in VB.NET so that I'm
1229    sure to be able to run those apps on Linux?
1230
1231 A: Not making any P/Invoke or DLL calls should and not using anything in
1232    the Microsoft.* namespaces should suffice. Also do not use any 
1233    Methods/Classes marked as "This type/method supports the .NET Framework 
1234    infrastructure and is not intended to be used directly from your code." 
1235    even if you know what these classes/methods do.
1236
1237 Q: Will built-in reporting be supported for crystal reports? This is a
1238    heavily used part of our system.
1239
1240 A: . Crystal Reports are propriety. Someone may try to emulate
1241    the behavior, but no-one has yet volunteered.
1242
1243 Q: Who about writing to the registry? As I understand it, Linux does not have
1244    a counterpart to the registry. Should I avoid relying on that feature?
1245
1246 A: Try to avoid it. Although there would be a emulation for registry in
1247    Mono too. GNOME does have a registry like mechanism for configuration. But
1248    Even if gnome has a configuration system similar to the registry, the keys 
1249    will not be equal, so you will probably end up having to do some runtime 
1250    detection, and depending on this load an assembly that has your 
1251    platform-specific hacks.
1252
1253 Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and 
1254    use them?
1255
1256 A: This has been done.
1257
1258 <a name="gcc"></a>
1259 ** Mono and GCC
1260
1261 Q: Are you working on a GCC front-end to C#? A GCC back-end that will
1262    generate CIL images? 
1263
1264 A: We would love to see a GCC modification that would generate CIL
1265    images, but there is nothing at this point.
1266
1267 Q: What about making a front-end to GCC that takes CIL images and
1268    generates native code?
1269
1270 A: There is no active work on this area, but Mono already provides
1271    pre-compilation services (Ahead-of-Time compilation).
1272
1273 Q: But would this work around the GPL in the GCC compiler and allow
1274    people to work on non-free front-ends?
1275
1276 A: People can already do this by targeting the JVM byte codes (there
1277    are about 130 compilers for various languages that target the JVM).
1278
1279 <a name="performance"></a>
1280 ** Performance
1281
1282 Q: How fast will Mono be?
1283
1284 A: We can not predict the future, but a conservative estimate is that
1285    it would be at least `as fast as other JIT engines'.
1286
1287    Mono's JIT engine has been recently re-architected, and it provides
1288    many new features, and layers suitable for optimization.  It is
1289    relatively easy to add new optimizations to Mono. 
1290
1291    The CIL has some advantages over the Java byte code:  it is really
1292    an intermediate representation and there are a number of
1293    restrictions on how you can emit CIL code that simplify creating
1294    better JIT engines.
1295
1296    For example, on the CIL, the stack is not really an abstraction
1297    available for the code generator to use at will.  Rather, it is a
1298    way of creating a postfix representation of the parsed tree.  At
1299    any given call point or return point, the contents of the stack are
1300    expected to contain the same object types independently of how the
1301    instruction was reached.
1302
1303 <a name="licensing"></a>
1304 ** Licensing
1305
1306 Q: Will I be able to write proprietary applications that run with
1307    Mono?
1308
1309 A: Yes.  The licensing scheme is planned to allow proprietary
1310    developers to write applications with Mono.
1311    
1312 Q: What license or licenses are you using for the Mono Project?
1313
1314 A: The C# Compiler is released under the terms of the <a 
1315    href="http://www.opensource.org/licenses/gpl-license.html">GNU GPL</a>.  The runtime
1316    libraries are under the <a
1317    href="http://www.opensource.org/licenses/lgpl-license.html">GNU
1318    Library GPL</a>.  And the class libraries are released
1319    under the terms of the <a
1320    href="http://www.opensource.org/licenses/mit-license.html">MIT X11</a>
1321    license.
1322
1323    The Mono runtime and the Mono C# Compiler are also available under
1324    a proprietary license for those who can not use the LGPL and the
1325    GPL in their code.  
1326
1327    For licensing details, contact <a
1328    href="mailto:mono-licensing@ximian.com">mono-licensing@ximian.com</a>
1329
1330
1331 Q: I would like to contribute code to Mono under a particular
1332    license. What licenses will you accept?
1333
1334 A: We will have to evaluate the licenses for compatibility first,
1335    but as a general rule, we will accept the code under the same
1336    terms of the "container" module. 
1337
1338 <a name="patents"></a>
1339 ** Patents
1340
1341 Q: Could patents be used to completely disable Mono (either submarine
1342    patents filed now, or changes made by Microsoft specifically to
1343    create patent problems)?
1344
1345 A: First some background information.
1346
1347    The .NET Framework is divided in two parts: the ECMA/ISO covered
1348    technologies and the other technologies developed on top of it like
1349    ADO.NET, ASP.NET and Windows.Forms.
1350
1351    Mono implements the ECMA/ISO covered parts, as well as being a
1352    project that aims to implement the higher level blocks like
1353    ASP.NET, ADO.NET and Windows.Forms.  
1354
1355    The Mono project has gone beyond both of those components and has
1356    developed and integrated third party class libraries, the most
1357    important being: Debugging APIs, integration with the Gnome
1358    platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI),
1359    Mozilla, OpenGL, extensive database support (Microsoft only
1360    supports a couple of providers out of the box, while Mono has
1361    support for 11 different providers), our POSIX integration
1362    libraries and finally the embedded API (used to add scripting to
1363    applications and host the CLI, or for example as an embedded
1364    runtime in Apache). 
1365
1366    The core of the .NET Framework, and what has been patented by
1367    Microsoft falls under the ECMA/ISO submission.  Jim Miller at
1368    Microsoft has made a statement on the patents covering ISO/ECMA,
1369    (he is one of the inventors listed in the patent): <a
1370    href="https://mailserver.di.unipi.it/pipermail/dotnet-sscli/msg00218.html">here</a>.
1371
1372    Basically a grant is given to anyone who want to implement those
1373    components for free and for any purpose.
1374
1375    The controversial elements are the ASP.NET, ADO.NET and
1376    Windows.Forms subsets.  Those are convenient for people who need
1377    full compatibility with the Windows platform, but are not required
1378    for the open source Mono platform, nor integration with today's
1379    Mono's rich support of Linux. 
1380
1381    The Mono strategy for dealing with these technologies is as
1382    follows: (1) work around the patent by using a different
1383    implementation technique that retains the API, but changes the
1384    mechanism; if that is not possible, we would (2) remove the pieces
1385    of code that were covered by those patents, and also (3) find prior
1386    art that would render the patent useless.
1387  
1388    Not providing a patented capability would weaken the
1389    interoperability, but it would still provide the free software /
1390    open source software community with good development tools, which
1391    is the primary reason for developing Mono.  
1392
1393    The patents do not apply in countries where software patents are
1394    not allowed.
1395
1396    For Linux server and desktop development, we only need the ECMA
1397    components, and things that we have developed (like Gtk#) or Apache
1398    integration.  
1399
1400 Q: Is Mono only an implementation of the .NET Framework?
1401
1402 A: Mono implements both the .NET Framework, as well as plenty of class
1403    libraries that are either Unix specific, <a
1404    href="http://www.gnome.org">Gnome</a> specific, or that are not
1405    part of the .NET Framework but people find useful. 
1406
1407    The following map shows the relationship between the components:
1408
1409    <img src="http://primates.ximian.com/~miguel/tmp/map.png">
1410
1411 <a name="etc"></a> 
1412 ** Miscellaneous Questions
1413
1414 Q: You say that the CLI allows multiple languages to execute on the
1415    same environment.  Isn't this the purpose of CORBA?
1416
1417 A: The key difference between CORBA (and COM) and the CLI is that the
1418    CLI allows "data-level interoperability" because every
1419    language/component uses the same data layout and memory management.
1420
1421    This means you can operate directly upon the data types that someone
1422    else provides, without having to go via their interfaces.  It also
1423    means you don't have to "marshal" (convert) parameters (data
1424    layouts are the same, so you can just pass components directly) and
1425    you don't have to worry about memory management, because all
1426    languages/components share the same garbage collector and address
1427    space.  This means much less copying and no need for reference
1428    counting.
1429
1430 Q: Will you support COM?
1431
1432 A: The runtime will support XPCOM on Unix systems and COM on Windows.
1433    Most of the code for dynamic trampolines exists already.
1434
1435 Q: Will Ximian offer certifications on Mono or related technologies?. 
1436
1437 A: It's possible. But there is no plan about this. So the short answer is no.
1438
1439 Q: How can I report a bug?
1440
1441 A: The best thing is to track down the bug and provide a simple test
1442    to reproduce the bug.  You can then add the bug to our bug tracking
1443    system.  You can use our <a href="bugs.html">Bug Form</a> to enter
1444    bugs for the appropriate component.
1445
1446    Please provide information about what version of mono you're using
1447    and any relevant details to be able to reproduce the bug. Note that
1448    bugs reported on the mailing-list may be easily forgotten, so it's
1449    better to file them in the <a href="http://bugzilla.ximian.com/enter_bug.cgi">bug tracking system</a>.
1450
1451 Q: Does mcs support the same command line options as the MS C# 
1452    compiler?
1453
1454 A: The Mono C# compiler now supports the same command line
1455    arguments as the Microsoft C# compiler does.
1456
1457 Q: How about getting searchable archives on lists.ximian.com? 
1458
1459 A: You can perform a search on the mono-related mailing lists 
1460    <a href="http://www.go-mono.com/mailing-lists.html">here</a>.
1461
1462 Q: When using mono from cvs or from a snapshot, I get an error messaage
1463    saying that Mono and the runtime are out of sync. How do I fix that?
1464
1465 A: If you use mono from cvs, you need to be prepared for changes in the
1466    runtime internals. This means that you should keep a working setup 
1467    before blindling updating (a working setup may just be the last released
1468    tarball or a recent binary snapshot).
1469    Usually, compiling corlib with mcs before recompiling the C runtime does
1470    the right thing (but occasionally you may need to do it the other 
1471    way around).
1472
1473 Q: Why are you going for a GtkHtml implementation?
1474
1475 A: GtkHTML is just a lightweight HTML rendering engine that does not
1476    support CSS, so we need it to look decent for those of us that will 
1477    be using the documentation in our day-to-day work on Linux. The 
1478    Web-based interfaces lack the agility that you get from a native GUI
1479    tool to browse your documentation. Probably later on, we will write 
1480    scripts and generate a full documentation set that is web-browsable, 
1481    but we need a command-line and GUI tools that we can use natively on 
1482    Linux when disconnected from the Web (and that has better 
1483    interactions than a web page).
1484
1485 Q: Is there a command-line tool that allows me to access .NET interactively?
1486
1487 A: There are several but one that is free software and uses MCS is the one
1488    Dennis Lu from Rice University is working on; a REPL C# interpreter.
1489
1490 Q: Is it possible to use Visual C++ with Mono?.
1491
1492 A: It's possible to run VC++ generated apps under Mono, but we do not
1493    provide a Manager C++ compiler ourselves.
1494
1495 Q: Does Mono support generics?.
1496
1497 A: Mono doesn't support generics currently but a lot of work is being 
1498    done towards it.
1499
1500 <a name="problems"></a>
1501 ** Mono Common Problems
1502
1503    If you are having problems compiling or running Mono software
1504    or if you think that you found a bug, etc. Please visit the
1505    <a href="http://monoevo.sf.net/mono-common-problems.html">Mono Common Problems</a> document and try there. 
1506
1507 ** Credits
1508
1509    The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez.