Flush
[mono.git] / doc / faq
diff --git a/doc/faq b/doc/faq
index c7673152340fb8f69d837f0215de40f35dc592b8..f7854b850ab7af3b67b495b012e4d5e979cf064a 100644 (file)
--- a/doc/faq
+++ b/doc/faq
@@ -39,6 +39,48 @@ A: The Mono Project is an open development initiative sponsored by
    implement various technologies developed by Microsoft that have now
    been submitted to the ECMA for standardization.
 
+   The Mono project has also sparked a lot of interest in developing
+   C#-based components, libraries and frameworks.  Today Mono is not
+   limited to implement the .NET Framework, but also contains other
+   components.  Some of the components of the Mono platform were
+   developed by the Mono team, and some others we have incorporated
+   from other open source efforts, the most important ones:
+
+   <ul>
+       <li><a
+       href="http://remoting-corba.sourceforge.net/">Remoting.CORBA</a>: A
+       CORBA implementation for Mono.
+
+       <li>Ginzu: An implementation on top of Remoting for the <a
+       href="http://www.zeroc.com">ICE</a> stack
+
+       <li><a href="http://gtk-sharp.sf.net">Gtk#</a>: Bindings for
+       the popular Gtk+ GUI toolkit for Unix and Windows systems.
+       Other bindings are available: Diacanvas-Sharp and MrProject.
+
+       <li><a
+       href="http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx">#ZipLib</a>:
+       A library to manipulate various kinds of compressed files and
+       archives (Zip and tar).
+
+       <li>GlGen (available from the Mono CVS): Bindings for OpenGL.
+
+       <li>Mono.LDAP: LDAP access for .NET apps.
+
+       <li>Mono.Data: We ship support for Postgress, MySql, Sybase,
+       DB2, SqlLite, Tds (SQL server protocol) and Oracle databases. 
+
+       <li>Mono.Cairo: Bindings for the <a
+       href="http://www.cairographics.org">Cairo</a> rendering
+       engine (Our System.Drawing is implemented on top of this).
+
+       <li>Mono.Posix: Bindings for building POSIX applications using
+       C#. 
+
+       <li>Mono.Http: Support for creating custom, embedded HTTP
+       servers and common HTTP handlers for your applications.
+   </ul>
+
 Q: What is the difference between Mono and the .NET Initiative?
 
 A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
@@ -59,7 +101,9 @@ A: Mono contains a number of components useful for building new
                  compiler, and a garbage collecting runtime.
 
                * A class library that can work with any language
-                 which works on the CLR.
+                 which works on the CLR.  Both .NET compatible class
+                 libraries as well as Mono-provided class libraries
+                 are included.
 
                * A compiler for the C# language.  In the future we
                  might work on other compilers that target the Common
@@ -130,6 +174,17 @@ A: Different parts of Mono will achieve usability at different stages,
    Other higher level class libraries (ASP.NET, ADO.NET, WinForms) will
    be released when they become stable. 
 
+Q: When will Mono 1.0 ship?
+
+A: We are planning on releasing Mono 1.0 (Mono Core) which will ship all the
+   components of Mono that are known to be stable in Q4 2003/Q1 2004.
+
+   This release will lack System.Windows.Forms  and
+   Enterprise.Services, as they will not be production ready on this timeframe.
+
+   Mono 1.2 should come in Q2 2004 and include the missing components
+   libraries that will make Mono feature-compatible with .NET 1.0
+
 Q: What major components will you include in Mono?
 
 A: Hopefully everything that Microsoft ships on their Framework
@@ -292,9 +347,14 @@ A: There are several reasons for this.
    Win32 message loop.  In order to maintain compatibility, Wine must be used, 
    and this is being done; see the 
    <a href="/winforms.html">System.Windows.Forms effort page</a>.
-  
-   Additionally, Wine apps don't currently fit in -- visually -- with 
-   Gtk+ or Qt apps.
+
+Q: Wine applications do not look like native applications, what are
+   you going to do about this?  
+
+A: We have already a few patches into our version of Windows.Forms
+   that makes Wine use the colors and font settings from your desktop,
+   improving the integration a lot.   In the future, we will continue
+   to improve this interoperability scenario.
 
 Q: Will I be able to run my smart clients on systems powered by Mono?
 
@@ -335,6 +395,12 @@ A: We do not know, volunteers are working on this, but there is no set
    date yet.  The current approach is using the Wine Library to implement
    it.
 
+Q: Do you have a comparission chart about the various toolkit
+   offerings?
+
+A: A document explaining this is available at: <a
+   href="http://primates.ximian.com/~miguel/toolkits.html">http://primates.ximian.com/~miguel/toolkits.html</a>.
+
 <a name="msft"></a>
 ** Mono and Microsoft
 
@@ -390,13 +456,6 @@ A: No. MS Passport is unrelated to running .NET compatible applications
    produced with the Mono tools.  The only thing you will need is a
    just-in-time compiler (JIT).
 
-Q: What is a 100% .NET application?
-
-A: A `100% .NET application' is one that only uses the APIs defined
-   under the System namespace and does not use PInvoke.  These
-   applications would in theory run unmodified on Windows, Linux,
-   HP-UX, Solaris, MacOS X and others. 
-
 Q: If Microsoft will release a port of their .NET platform under the
    `Shared Source' license, why should I bother with anything else?
 
@@ -434,12 +493,6 @@ A: No, it will not.  Microsoft Office is a Windows application.  To
    learn more about running Windows applications on Intel Unix systems
    refer to <a href="http://www.winehq.com">the Wine Project</a>.
 
-Q: Will I be able to compile a Microsoft VB.NET application and execute 
-   the resultant MSIL file under MONO on Linux without converting to C# 
-   and recompiling?
-
-A: Once we have a complete VisualBasic runtime, yes.
-
 Q: Can mono run the WebMatrix?
 
 A: No. That requires System.Windows.Forms support which is not
@@ -490,12 +543,33 @@ A: Mono requires Unicode versions of Win32 APIs to run,
    Win32 libs. This is achieved by inserting -lunimono before
    -lkerner32/user32 in the linker's specs file.
 
+Q: Why support Windows, when you can run the real thing?
+
+A: There are various reasons:
+
+   <ul>
+      <li> About half the contributors to Mono are Windows developers.
+           They have many different for contributing to the effort, and
+           we find it very important to let those developers run the runtime on Windows without forcing
+           them to use a new operating system. 
+          
+      <li> Supporting Windows helps us identify the portable portions
+           of Mono from the non-portable versions of it, helping Mono
+           become more portable in the future.
+
+      <li> Mono does not heavily modify the windows registry, update system DLLs,
+          install DLLs to the Windows/System32 path.  Another words, I knew Mono would
+          not cause any legacy enterprise applications to stop working - and it
+          hasn't.  However, our CIO er is againt it because of the changes that would
+          be made to Windows 2000, such as, affecting security.
+   </ul>
+
 <a name="compatibility"></a>
 ** Compatibility
 
-Q: Can Mono run applications developed with the Microsoft.NET fraemwork?
+Q: Can Mono run applications developed with the Microsoft.NET framework?
 
-A: Yes, Mono can run applications developed with the Microsft .NET Framework
+A: Yes, Mono can run applications developed with the Microsoft .NET Framework
    on Unix.  There are a few caveats to keep in mind: Mono has not
    been completed yet, so a few API calls might be missing; And in
    some cases the Mono behavior *might* be incorrect.
@@ -529,6 +603,77 @@ A: Sometimes they will.  But sometimes a .NET application might invoke
    Win32 API calls, or assume certain patterns that are not correct
    for cross-platform applications.
 
+Q: What is a 100% .NET application?
+
+A: A `100% .NET application' is one that only uses the APIs defined
+   under the System namespace and does not use P/Invoke.  These
+   applications would in theory run unmodified on Windows, Linux,
+   HP-UX, Solaris, MacOS X and others. 
+
+   Note that this requirement also holds for all assemblies used by the
+   application.  If one of them is Windows-specific, then the entire program
+   is not a 100% .NET application.
+
+   Furthermore, a 100% .NET application must not contain non-standard data
+   streams in the assembly.  For example, Visual Studio .NET will insert a 
+   <tt>#-</tt> stream into assemblies built under the "Debug" target.  
+   This stream contains debugging information for use by Visual Studio .NET; 
+   however, this stream can not be interpreted by Mono (unless you're willing 
+   to donate support).
+
+   Thus, it is recommended that all Visual Studio .NET-compiled code be
+   compiled under the Release target before it is executed under Mono.
+
+Q: Can I execute my Visual Studio .NET program (Visual Basic .NET, Visual C#,
+   Managed Extensions for C++, etc.) under Mono?
+
+A: Yes, with some reservations.
+
+   The .NET program must either be a 100% .NET application, or (somehow) have
+   all dependent assemblies available on all desired platforms.  (How to do so
+   is outside the bounds of this FAQ.)
+
+   For example, since Mono's System.Windows.Forms implementation will use
+   Wine, System.Windows.Forms is only as portable as Wine is.  It's possible
+   that Mono may run on a platform, but Wine will not, in which case a
+   System.Windows.Forms app will not run on that platform.  This is similarly
+   true for all assemblies that are not 100% managed code.
+
+   Mono must also have an implementation for the .NET assemblies used.  For
+   example the System.EnterpriseServices namespace is part of .NET, but it
+   has not been implemented in Mono.  Thus, any applications using this
+   namespace will not run under Mono.
+
+   With regards to languages, C# applications tend to be most portable.
+
+   Visual Basic .NET applications are portable, but Mono's 
+   Microsoft.VisualBasic.dll implementation is incomplete.  It is recommended 
+   to either avoid using this assembly in your own code, only use the 
+   portions that Mono has implemented, or to help implement the missing
+   features.  Additionally, you can set 'Option Strict On', which
+   eliminates the implicit calls to the unimplemented
+   Microsoft.VisualBasic.CompilerServices.ObjectType class.  
+   (Thanks to Jörg Rosenkranz.)
+
+   Managed Extensions for C++ is least likely to operate under Mono.  Mono
+   does not support mixed mode assemblies (that is, assemblies containing both
+   managed and unmanaged code, which Managed C++ can produce).  You need a
+   fully-managed assembly to run under Mono, and getting the Visual C++ .NET
+   compiler to generate such an executable can be difficult.  You need to use
+   only the .NET-framework assemblies, not the C libraries (you can't use
+   <b>printf</b>(3) for example.), and you need to use
+   the linker options <tt>/nodefaultlib /entry:main mscoree.lib</tt> in
+   addition to the <tt>/clr</tt> compiler flag.  You can still use certain
+   compiler intrinsic functions (such as <b>memcpy</b>(3)) and the STL.
+   You should also see <a 
+   href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/vcgrfconvertingmanagedextensionsforcprojectsfrommixed-modetopureil.asp"
+   >Converting Managed Extensions for C++ Projects from Mixed Mode to Pure
+   Intermediate Language</a> at MSDN.
+   Finally, you can use PEVERIFY.EXE from the .NET SDK to determine if the 
+   assembly is fully managed.
+
+   Thanks to Serge Chaban for the linker flags to use.
+
 <a name="pnpproject"></a>
 ** Mono and Portable.NET
 
@@ -715,6 +860,9 @@ A: With any luck, Free Software enthusiasts will contribute tools to
    initially using the Microsoft implementation of the CLI and then
    executed later with Mono.
 
+   We are recommending people to use and contribute to existing
+   projects like SharpDevelop, Anjuta and Eclipse.
+
 Q: What kind of rules make the Common Intermediate Language useful for
    JITers?
 
@@ -742,32 +890,14 @@ A: In Mono, xsp is just the name of the C# code generator for ASP.NET
    Pages" technology so as they are very different things, they don't 
    conflict.
 
-Q: What about using something like Jabber instead of the System.Messaging 
-   namespace?.
-
-A: In short, MSMQ is not something like Jabber, but asynchronous messaging 
-   through queues. Useful queues do more than serialize messages, they are 
-   also platform bridges.
-
-Q: Are you supporting XMLDocument and relatives?.
-
-A: Currently, we aren't implementing them yet. It would require updates to 
-   most of the XmlNode derivatives so it's not a trivial task. We are 
-   currently focusing on getting XPath support working. 
-
 Q: Is there any plan to develop an aspx server for Mono?.
 
-A: The web server turned out to be very simple compared to the rest of the 
-   work. Gonzalo has got the page generator mostly done (a module called 
-   xsp, who has nothing to do with the XSP term used in the Apache Project).
-   Patrik has done a lot of the work to get the ProcessRequest to work.
-   You can try to help in the final touches to the System.Web classes and
-   writing regression tests for the widgets we have.
+A: The XSP reference server is available and you can also use mod_mono
+   with Apache.
 
 Q: Is there any way I can develop the class libraries using Linux yet?
 
-A: Yes. Some class libraries can be developed on Linux. Search for
-   Paolo's post (he lists which classes can be compiled fine now).
+A: Yes.  Mono has been self hosting since May 2002.
 
 Q: Is there any way I can install a known working copy of mono in /usr, 
    and an experimental copy somewhere else, and have both copies use 
@@ -787,26 +917,15 @@ Q: Would it be too terrible to have another corlib signed as mscorlib?
 A: We rename corlib to mscorlib also when saving the PE files, in fact, 
    the runtime can execute program created by mono just fine.  
 
-Q: Is there a relatively straightforward way to repeat the steps taken 
-   by Paolo to get Mono completely self-hosted on Linux?
-
-A: To build the compiler and class libraries in Linux, run:
-   <ul><li>make -f makefile.gnu. To install them, run: </li>
-       <li>make -f makefile.gnu install prefix=/opt/mono</li>
-   </ul>
-
-   If you want to produce and distribute a monocharge tarball, run:
-   make -f makefile.gnu dist
-   Of course you have to run these in the top level mcs directory.
-
 Q: Is it possible to build a C# file to some sort of intermediate format which 
    can linked into a final module, like the traditional .c -> .o -> .so path? 
    
-A: You could do: mcs /target:module file1.cs, mcs /target:module file2.cs, 
-   mcs /target:exe file1.dll file2.dll /out:mybin.exe
+A: You can use: 
 
-Q: Is there any plans for implementing remoting in the near future?, When will 
-   work in System.Runtime.Remoting.dll start?
+       mcs /target:library file1.cs, mcs /target:library file2.cs, 
+       mcs /target:exe file1.dll file2.dll /out:mybin.exe
+
+Q: Is there any plans for implementing remoting in the near future?
 
 A: The remoting infrastructure is in place.  We have implementations
    of the TcpChannel, HttpChannel and the Soap and Binary Formatters.
@@ -833,7 +952,7 @@ A: Replace the __stdcall attribute with the STDCALL macro, and include this
 Q: I want to be able to execute Mono binaries, without having to use the "mono"
    command.  How can I do this?
 
-A: From Carlos Perelló:
+A: From Carlos Perelló:
 
    <i>I think that the best solution is the binfmt feature with the
    wrapper that exists with Debian packages at:
@@ -849,6 +968,23 @@ A: From Carlos Perell
    This way you just execute: ./my-cool-mono-application.exe and it works
    without the need of any wrapper.</i>
 
+Q: I see funny characters when I run programs, what is the problem?
+
+A: (From Peter Williams and Gonzalo Paniagua):
+
+   This is Red Hat 9 (probably) using UTF8 on its console; the bytes are
+   the UTF8 endianness markers.   You can do:
+        LC_ALL=C mono myexe.exe
+
+   And they wont show up.
+
+   Alternatively, you can do:
+
+        $ echo -e "\033%G"
+
+   to enable UTF-8 on the console.
+
 <a name="asp">
 ** Mono and ASP.NET
 
@@ -885,7 +1021,7 @@ A: Modules developed for Apache 2 are not compatible with Apache 1.3
 
 Q: Can I run Apache 1 and Apache 2 on the same machine?
 
-   You can always keep a copy of Apache 2 running in paralell with your Apache
+   You can always keep a copy of Apache 2 running in parallel with your Apache
    1.3 (either different port or using a reverse proxy).
 
    You can also bind the two servers to different IP addresses on the
@@ -1147,7 +1283,7 @@ A: There should not be any need to recode.
 Q: What do I need to watch out for when programming in VB.NET so that I'm
    sure to be able to run those apps on Linux?
 
-A: Not making any PInvoke or DLL calls should and not using anything in
+A: Not making any P/Invoke or DLL calls should and not using anything in
    the Microsoft.* namespaces should suffice. Also do not use any 
    Methods/Classes marked as "This type/method supports the .NET Framework 
    infrastructure and is not intended to be used directly from your code." 
@@ -1304,7 +1440,7 @@ A: First some background information.
 
    The Mono strategy for dealing with these technologies is as
    follows: (1) work around the patent by using a different
-   implementation techinque that retains the API, but changes the
+   implementation technique that retains the API, but changes the
    mechanism; if that is not possible, we would (2) remove the pieces
    of code that were covered by those patents, and also (3) find prior
    art that would render the patent useless.
@@ -1321,6 +1457,17 @@ A: First some background information.
    components, and things that we have developed (like Gtk#) or Apache
    integration.  
 
+Q: Is Mono only an implementation of the .NET Framework?
+
+A: Mono implements both the .NET Framework, as well as plenty of class
+   libraries that are either Unix specific, <a
+   href="http://www.gnome.org">Gnome</a> specific, or that are not
+   part of the .NET Framework but people find useful. 
+
+   The following map shows the relationship between the components:
+
+   <img src="http://primates.ximian.com/~miguel/tmp/map.png">
+
 <a name="etc"></a> 
 ** Miscellaneous Questions
 
@@ -1417,3 +1564,6 @@ A: It's possible to run VC++ generated apps under Mono, but we do not
    or if you think that you found a bug, etc. Please visit the
    <a href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">Mono Common Problems</a> document and try there. 
 
+** Credits
+
+   The FAQ contains material contributed by Miguel de Icaza, Jaime Anguiano, Lluis Sánchez.