Implement log file support.
[mono.git] / doc / faq
1 <a href="#basics">Basics</a><br>
2 <a href="#ximian">The Ximian 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="#pnpproject">Mono and the Portable.NET Project</a><br>
7 <a href="#webservices">Web Services</a><br>
8 <a href="#devel">Development Tools and Issues</a><br>
9 <a href="#java">Mono and Java</a><br>
10 <a href="#extending">Extending Mono</a><br>
11 <a href="#portability">Portability</a><br>
12 <a href="#reuse">Reusing Existing Code</a><br>
13 <a href="#gcc">Mono and GCC</a><br>
14 <a href="#performance">Performance</a><br>
15 <a href="#licensing">Licensing</a><br>
16 <a href="#patents">Patents</a><br>
17 <a href="#etc">Miscellaneous Questions</a><br>
18
19
20 <a name="basics"></a>
21 ** Basics
22
23 Q: What is Mono exactly?
24
25 A: The Mono Project is an open development initiative sponsored by
26    Ximian that is working to develop an open source, Linux-based
27    version of the Microsoft .NET development platform.  Its objective
28    is to enable Linux developers to build and
29    deploy cross-platform .NET Applications.  The project will
30    implement various technologies developed by Microsoft that have now
31    been submitted to the ECMA for standardization.
32
33 Q: What is the difference between Mono and the .NET Initiative?
34
35 A: The ".NET Initiative" is a somewhat nebulous company-wide effort by
36    Microsoft, one part of which is a cross-platform development
37    framework.  Mono is an implementation of the development framework,
38    but not an implementation of anything else related to the .NET
39    Initiative, such as Passport, software-as-a-service, or
40    corporate rebranding.
41
42 Q: What technologies are included in Mono?
43
44 A: Mono contains a number of components useful for building new
45    software:
46
47         <ul>
48                 * A Common Language Infrastructure (CLI) virtual
49                   machine that contains a class loader, Just-in-time
50                   compiler, and a garbage collecting runtime.
51
52                 * A class library that can work with any language
53                   which works on the CLR.
54
55                 * A compiler for the C# language.  In the future we
56                   might work on other compilers that target the Common
57                   Language Runtime.
58         </ul>
59
60
61    Windows has compilers that target the virtual machine from <a
62    href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
63    number of languages:</a> Managed C++, Java Script, Eiffel,
64    Component Pascal, APL, Cobol, Oberon, Perl, Python, Scheme,
65    Smalltalk, Standard ML, Haskell, Mercury and Oberon.
66
67    The CLR and the Common Type System (CTS) enables applications and
68    libraries to be written in a collection of different languages that
69    target the byte code
70
71    This means for example that if you define a class to do algebraic
72    manipulation in C#, that class can be reused from any other
73    language that supports the CLI.  You could create a class in C#,
74    subclass it in C++ and instantiate it in an Eiffel program. 
75
76    A single object system, threading system, class libraries, and
77    garbage collection system can be shared across all these languages.
78    
79 Q: Where can I find the specification for these technologies?
80
81 A: You can find the work-in-progress documentation from the T3G ECMA
82    group here:
83  
84    <a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
85
86 Q: Will you implement the .NET Framework SDK class libraries?
87
88 A: Yes, we will be implementing the APIs of the .NET Framework SDK
89    class libraries. 
90
91 Q: Will you offer an ECMA-compliant set of class libraries?
92
93 A: Eventually we will.  Our current focus is on interoperating
94    with the Microsoft SDK, but we will also offer an ECMA compliant
95    set of libraries. 
96
97 Q: What does the name "Mono" mean?
98
99 A: Mono is the word for `monkey' in Spanish. We like monkeys.
100
101 Q: Is Mono usable?
102
103 A: The JIT engine is usable on Intel x86 machines.  An interpreter
104    can be used on other non-Intel x86 machines.  
105
106    The class libraries are not yet mature enough to run real applications,
107    but if you are interested in trying out Mono, you can definetly start
108    testing things out as many programs run.
109
110    The C# compiler has made significant progress, it can even compile
111    itself now, but it can not yet be ran with our class libraries as
112    they are missing some features. 
113
114 Q: When will you ship it?
115
116 A: It is premature to target a shipdate for the code, but we
117    anticipate that it will be available some time in the middle of
118    2002.
119
120 Q: How can I contribute?
121
122 A: Check the <a href="contributing.html">contributing</a> section. 
123
124 Q: Aren't you just copying someone else's work?
125
126 A: We are interested in providing the best tools for programmers to
127    develop applications for Free Operating Systems.  We also want to help
128    provide the interoperability that will allow those systems to fit in
129    with other standards.
130
131    For more background, read the <a href="http://www.go-mono.com/rationale.html">Mono
132    Project white paper</a>.
133    the project.
134
135
136 <a name="ximian"></a> 
137
138 ** The Ximian Role in the Mono Project
139
140 Q: Why is Ximian working on .NET?
141
142 A: Ximian is interested in providing the best tools for programmers to
143    develop applications for Free Operating Systems.  
144
145    For more information, read the project <a
146    href="rationale.html">rationale</a> page.
147
148 Q: Will Ximian be able to take on a project of this size?  
149
150 A: Of course not. Ximian a supporter of the Mono project, but the only way
151    to implement something of this size is for the entire free software
152    community to get involved. Visit the <a href="contributing.html">contributing</a> 
153    page if you'd like to help out.
154
155 Q: What pieces will Ximian be working on?
156
157 A: We will devote most of our resources to work on the pieces which are
158    on the critical path to release a development and execution
159    environment. Once the project is at a stage where it is useful in
160    the real world, it will achieve a critical mass of developers to
161    improve it further.
162
163 Q: Will Ximian offer Mono commercially?
164
165 A: When Mono is ready to be shipped Ximian will offer a commercial
166    support and services for Mono. 
167
168 Q: Will you wait until Mono is finished?
169
170 A: Mono will ship on various stages as they mature.  Some people
171    require only a subset of the technologies, those will ship first.
172
173    More advanced features will take more time to develop.  A support
174    timeline will be available in June 2002.
175
176 <a name="gnome"></a> 
177 ** Mono and GNOME
178
179 Q: How is Mono related to GNOME?
180
181 A: In a number of ways.  This project was born out of the need of
182    providing improved tools for the GNOME community, and will use
183    existing components that have been developed for GNOME when they
184    are available.  For example, we plan to use Gtk+ and Libart to
185    implement Winforms and the Drawing2D API and are considering
186    GObject support.
187
188 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
189
190 A: Mono is too new to be adopted by those groups. We hope that the
191    tools that we will provide will be adopted by free software
192    programmers including the GNOME Foundation members and the GNOME
193    project generally.
194
195 Q: Should GNOME programmers switch over to Mono now?
196
197 A: It is still far to early for discussions of "switching over."  No
198    pieces of Mono will be ready within the next six months, and a
199    complete implementation is roughly one year away.
200
201    We encourage GNOME developers to continue using the existing tools,
202    libraries and components.  Improvements made to GNOME will have an
203    impact on Mono, as they would be the "backend" for various classes.
204
205 Q: Will Mono include compatibility with Bonobo components? What is the
206    relationship between Mono and Bonobo?
207
208 A: Yes, we will provide a set of classes for implementing and using
209    Bonobo components from within Mono.  Mono should allow you to write
210    Bonobo components more easily, just like .NET on Windows allows you
211    to export .NET components to COM.
212
213 Q: Does Mono depend on GNOME?
214
215 A: No, Mono does not depend on GNOME.  We use a few packages produced by
216    the GNOME team like the `glib' library.  
217
218 Q: But will I be able to build GNOME applications?
219
220 A: Yes, we will enable people to write GNOME applications using Mono.
221
222 <a name="gui"></a>
223 ** GUI applications
224
225 Q: Will Mono enable GUI applications to be authored?
226
227 A: Yes, you will be able to build GUI applications.  Indeed, that is our
228    main focus.  We will provide both the Windows.Forms API and the Gtk# AP(I.
229
230 Q: What is the difference between Gtk# and System.Windows.Forms?
231
232 A: Gtk# is a set of bindings for the Gtk+ toolkit for C# (and other
233    CIL-enabled languages).  System.Windows.Forms is an API defined
234    by Microsoft to build GUI applications.
235
236 Q: Will I be able to run my smart clients on systems powered by Mono?
237
238 A: As long as your applications are 100% .NET and do not make use
239    of P/Invoke to call Win32 functions, your smart client applications
240    will run on Mono platforms.
241
242 <a name="msft"></a>
243 ** Mono and Microsoft
244
245 Q: Is Microsoft helping Ximian with this project?
246
247 A: No. Ximian CTO Miguel de Icaza had a friendly conversation with
248    Microsoft software architect David Stutz, but that's about the
249    extent of the contact. Microsoft is interested in other
250    implementations of .NET and are willing to help make the ECMA spec
251    more accurate for this purpose.
252
253    Ximian representatives have also spoken with Sam Ruby at the ECMA
254    TG3 committee to discuss the same issues.
255
256 Q: Is Microsoft or Corel paying Ximian to do this?
257
258 A: No.
259
260 Q: Do you fear that Microsoft will change the spec and render Mono
261    useless?
262
263 A: No.  Microsoft proved with the CLI and the C# language that it was
264    possible to create a powerful foundation for many languages to
265    interoperate.  We will always have that.  
266
267    Even if changes happened in the platform which were undocumented,
268    the existing platform would a value on its own.
269
270 Q: Are you writing Mono from the ECMA specs?
271
272 A: Yes, we are writing them from the ECMA specs and the published
273    materials in print about .NET.
274
275 Q: If my applications use Mono, will I have to pay a service fee?
276
277 A: No.  Mono is not related to Microsoft's initiative of
278    software-as-a-service.
279
280 Q: Is the Mono Project is related to the Microsoft Hailstorm effort?  Is
281    Ximian endorsing Hailstorm?  
282
283 A: No.  The Mono Project is focused on providing a compatible set of
284    tools for the Microsoft .NET development platform.  It does not
285    address, require, or otherwise endorse the MS Passport-based
286    Hailstorm single sign-on system that is part of Windows XP and
287    other services.
288
289 Q: Will Mono or .NET applications depend on Microsoft Passport?
290
291 A: No. MS Passport is unrelated to running .NET compatible applications
292    produced with the Mono tools.  The only thing you will need is a
293    just-in-time compiler (JIT).
294
295 Q: What is a 100% .NET application?
296
297 A: A `100% .NET application' is one that only uses the APIs defined
298    under the System namespace and does not use PInvoke.  These
299    applications would in theory run unmodified on Windows, Linux,
300    HP-UX, Solaris, MacOS X and others. 
301
302 Q: If Microsoft will release a port of their .NET platform under the
303    `Shared Source' license, why should I bother with anything else?
304
305 A: The Shared Source implementation will be expensive and its uses
306    will be tightly restricted, especially for commercial use. We are
307    working towards an implementation that will grant a number of
308    important rights to recipients: use for any purpose,
309    redistribution, modification, and redistribution of modifications.
310
311    This is what we call <a
312    href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
313
314 Q: Is Mono a free implementation of Passport?
315
316 A: No. Mono is just a runtime, a compiler and a set of class
317    libraries.
318
319 Q: Will the System.Web.Security.PassportIdentity class mean
320    that my software will depend on Passport?
321    
322 A: No.  Applications may use that API to contact a Passport site, but
323    are not required to do so.
324
325    As long as your application does not use Passport, you will not
326    need Passport.  
327
328 Q: Will Mono running on Linux make Passport available for Linux?
329
330 A: No.  However, the Passport toolkit for Linux-based web servers is
331    available from Microsoft.
332
333 Q: Will Mono allow me to run Microsoft Office on Linux?
334
335 A: No, it will not.  Microsoft Office is a Windows application.  To
336    learn more about running Windows applications on Intel Unix systems
337    refer to <a href="http://www.winehq.com">the Wine Project</a>.
338
339 <a name="pnpproject"></a>
340 ** Mono and Portable.NET
341
342 Q: What are the differences between Mono and Portable.NET?
343
344 A: Most of Mono is being written using C#, with only
345    a few parts written in C (The JIT engine, the runtime, the
346    interfaces to the garbage collection system).  The Portable.NET
347    Project is using C for development.
348
349 <a name="webservices"></a>
350 ** Web Services
351
352 Q: How is Mono related to Web Services?
353
354 A: Mono is only related to Web Services in that it will implement the
355    same set of classes that have been authored in the .NET Framework
356    to simplify and streamline the process of building Web Services.
357
358    But most importantly, Mono is an Open Source implementation of the
359    .NET Framework.
360
361 Q: Can I author Web Services with Mono?
362
363 A: You will be able to write Web Services on .NET that run on Mono and
364    viceversa. 
365
366 Q: If Mono implements the SDK classes, will I be able to write and
367    execute .NET Web Services with it?
368    
369 A: Yes.  When the project is finished, you will be able to use the
370    same technologies that are available through the .NET Framework SDK
371    on Windows to write Web Services.
372
373 Q: What about Soup?  Can I use Soup without Mono?
374
375 A: Soup is a library for GNOME applications to create SOAP servers and
376    SOAP clients, and can be used without Mono.  You can browse the
377    source code for soup using <a
378    href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>.
379
380 Q: Can I use CORBA?
381
382 A: Yes. The CLI contains enough information about a class that
383    exposing it to other RPC systems (like CORBA) is really simple, and
384    does not even require support from an object.  
385
386    We will be implementing CORBA interoperation as an extension to the
387    Mono classes so that we can integrate with Bonobo, just like
388    Microsoft provides COM interoperation classes and support
389    mechanisms. 
390
391 Q: Can I serialize my objects to other things other than XML?
392
393 A: Yes, although the serializing tools have not yet been planned, and
394 you would probably have to implement them yourself.
395
396 <a name="devel"></a>
397 ** Development Tools and Issues
398
399 Q: Will it be possible to use the CLI features without using bytecodes
400    or the JIT?
401
402 A: Yes. The CLI engine will be made available as a shared library.
403    The garbage collection engine, the threading abstraction, the
404    object system, the dynamic type code system and the JIT will be
405    available for C developers to integreate with their applications if
406    they wish to do so. 
407
408 Q: Will you have new development tools?
409
410 A: With any luck, Free Software enthusiasts will contribute tools to
411    improve the developer environment.  These tools could be developed
412    initially using the Microsoft implementation of the CLI and then
413    executed later with Mono.
414
415 Q: What kind of rules make the Common Intermediate Language useful for
416    JITers?
417
418 A: The main rule is that the stack in the CLI is not a general purpose
419    stack.   You are not allowed to use it for other purposes than
420    computing values and passing arguments to functions or return
421    values.  
422
423    At any given call or return instruction, the types on the stack
424    have to be the same independently of the flow of execution of your
425    code. 
426
427 Q: Is it true that the CIL is ideal for JITing and not efficient for
428    interpreters?
429
430 A: The CIL is better suited to be JITed than JVM byte codes, but you
431    can interpret them as trivially as you can interpret JVM byte
432    codes. 
433
434 <a name="java">
435 ** Mono and Java
436    
437 Q: Why don't you use Java?  After all, there are many languages that
438    target the Java VM.
439
440 A: You can get very good tools for doing Java development on free
441    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
442    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
443    href="http://gcc.gnu.org/java">frontend for Java</a> that can take
444    Java sources or Java byte codes and generate native executables; <a
445    href="http://www.transvirtual.com">Transvirtual</a> has implemented
446    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
447    Intel also has a Java VM called <a
448    href="http://www.intel.com/research/mrl/orp">ORP</a>.
449
450    The JVM is not designed to be a general purpose virtual machine.
451    The Common Intermediate Language (CIL), on the other hand, is
452    designed to be a target for a
453    wide variety of programming languages, and has a set of rules
454    designed to be optimal for JITers.
455
456 Q: Could Java target the CLI?
457
458 A: Yes, Java could target the CLI.  We have details on a <a
459    href="ideas.html#guavac">project</a> that someone could take on to
460    make this happen.  
461
462    Microsoft has an implemenation of the Java language called J# that
463    can target the CIL execution engine. 
464
465 Q: Is it possible to write a JVM byte code to CIL convertor?
466
467 A: Yes, it is possible.  Here are a few starting point:
468
469         <ul>
470                 * A byte code representation is really a flattened forest of
471                   trees.  Look at the Mono JIT engine to see how we compute
472                   the basic blocks (this is used to figure out the "trees").
473
474                   The forest is just an array of trees.
475
476                   Indeed, run the JIT engine with -d (mono -d prog.exe) and
477                   you will see how these trees look like.
478
479                   You will have to do something similar for Java.
480
481                 * Each "forest of trees" has a meaning.  This meaning can now
482                   be translated into the equivalent "meaning" in CLR-land.
483         </ul>
484
485 <a name="extending"></a>
486 ** Extending Mono
487
488 Q: Would you allow other classes other than those in the
489    specification?
490
491 A: Yes.  The Microsoft class collection is very big, but it is by no
492    means complete.  It would be nice to have a port of `Camel' (the
493    Mail API used by Evolution inspired by Java Mail) for Mono
494    applications.  
495
496    You might also want to look into implementing CORBA for Mono.  Not
497    only because it would be useful, but because it sounds like a fun
498    thing to do, given the fact that the CLI is such a type rich
499    system. 
500
501    For more information on extending Mono, see our <a
502    href="ideas.html">ideas</a> page.
503
504 Q: Do you plan to Embrace and Extend .NET?
505
506 A: Embracing a good technology is good.  Extending technologies in
507    incompatible ways is bad for the users, so we do not plan on 
508    extending the technologies.
509
510    If you have innovative ideas, and want to create new classes, we 
511    encourage you to make those classes operate correctly well in both
512    Mono and .NET
513
514 <a name="portability"></a>
515 ** Portability
516
517 Q: Will Mono only work on Linux?
518
519 A: Currently, we are doing our work on Linux-based systems and
520    Windows.  We do not expect many Linux-isms in the code, so it
521    should be easy to port Mono to other UNIX variants.   
522
523 Q: What about Mono on non X-based systems?
524
525 A: Our main intention at Ximian is to be able to develop GNOME
526    applications with Mono, but if you are interested in providing a
527    port of the Winform classes to other platforms (frame buffer or
528    MacOS X for example), we would gladly integrate them, as long
529    they are under an open source license.  
530
531 Q: Will Mono run on Windows?
532
533 A: We hope so.  Currently some parts of Mono only run on Windows
534    (the C# compiler is a .NET executable) and other parts have only
535    been compiled on Linux, but work on Windows with Cygwin.
536
537 Q: Will Mono depend on GNOME?
538
539 A: It will depend only if you are using a particular assembly (for
540    example, for doing GUI applications).  If you are just interested
541    in Mono for implementing a `Hello World Enterprise P2P Web
542    Service', you will not need any GNOME components.
543
544 <a name="reuse"></a>
545 ** Reusing Existing Code
546
547 Q: What projects will you reuse or build upon?
548
549 A: We want to get Mono in the hands of programmers soon.  We are
550    interested in reusing existing open source software.
551
552 Q: What about Intel's research JIT framework, ORP?
553
554 A: At this time, we are investigating whether we can use elements of
555    ORP for Mono.   ORP is a research JIT engine that has a clearly
556    defined API that splits the JIT from the GC system and the actual
557    byte code implementation.
558
559 Q: What about using GNU Lightning?
560
561 A: We are also researching <a
562    href="http://www.gnu.org/software/lightning/lightning.html">GNU
563    Lightning</a>.
564
565 <a name="gcc"></a>
566 ** Mono and GCC
567
568 Q: Are you working on a GCC front-end to C#? A GCC backend that will
569    generate CIL images? What about making a front-end to GCC that
570    takes CIL images and generates native code?
571
572 A: We are currently seeking volunteers for those projects.
573    Visit the <a href="contributing.html">contributing</a> section if
574    you are interested.
575
576 Q: But would this work around the GPL in the GCC compiler and allow
577    people to work on non-free front-ends?
578
579 A: People can already do this by targeting the JVM byte codes (there
580    are about 130 compilers for various languages that target the JVM).
581
582 Q: Why are you writing a JIT engine instead of a front-end to GCC?
583
584 A: We want the JIT engine and runtime engine because they will be able
585    to execute CIL executables generated on Windows, and so no recompilation 
586    will be necessary.
587
588 <a name="performance"></a>
589 ** Performance
590
591 Q: How fast will Mono be?
592
593 A: We can not predict the future, but a conservative estimate is that
594    it would be at least `as fast as other JIT engines'.
595
596    We would like to ship various JIT engines with Mono, just like
597    Microsoft has done with their .NET development platform. We could
598    provide a faster, JIT for fast load times but lower performance,
599    and an and an optimizing JIT that would be slower at generating
600    code but produce more optimal output.
601
602    The CIL has some advantages over the Java byte code:  it is really
603    an intermediate representation and there are a number of
604    restrictions on how you can emit CIL code that simplify creating
605    better JIT engines.
606
607    For example, on the CIL, the stack is not really an abstraction
608    available for the code generator to use at will.  Rather, it is a
609    way of creating a postfix representation of the parsed tree.  At
610    any given call point or return point, the contents of the stack are
611    expected to contain the same object types independently of how the
612    instruction was reached.
613
614 <a name="licensing"></a>
615 ** Licensing
616
617 Q: Will I be able to write proprietary applications that run with
618    Mono?
619
620 A: Yes.  The licensing scheme is planned to allow proprietary
621    developers to write applications with Mono.
622    
623 Q: What license or licenses are you using for the Mono Project?
624
625 A: The C# Compiler is released under the terms of the <a 
626    href="http://www.opensource.org/licenses/gpl-license.html">GNU GPL</a>.  The runtime
627    libraries are under the <a
628    href="http://www.opensource.org/licenses/lgpl-license.html">GNU
629    Library GPL</a>.  And the class libraries are released
630    under the terms of the <a
631    href="http://www.opensource.org/licenses/mit-license.html">MIT X11</a>
632    license.
633
634 Q: I would like to contribute code to Mono under a particular
635    license. What licenses will you accept?
636
637 A: We will have to evaluate the licenses for compatibility first,
638    but as a general rule, we will accept the code under the same
639    terms of the "container" module. 
640
641 <a name="patents></a>
642 ** Patents
643
644 Q: Could patents be used to completely disable Mono (either submarine
645    patents filed now, or changes made by Microsoft specifically to
646    create patent problems)?
647
648 A: No.  First, its basic functional capabilities have pre-existed too
649    long to be held up by patents.  The basic components of Mono are
650    technologically equivalent to Sun's Java technology, which has been
651    around for years.  Mono will also implement multi-language and
652    multi-architecture support, but there are previous technologies
653    such as UCSD p-code and ANDF that also support multiple languages
654    using a common intermediate language.  The libraries are similar
655    to other language's libraries, so again, they're too similar to
656    be patentable in large measure.
657
658    However, if Microsoft does patent some technology, then our plan is
659    to either (1) work around it, (2) chop out patented pieces, (3) 
660    find prior art that would render the patent useless.
661  
662    Not providing a patented capability would weaken the
663    interoperability, but it would still provide the free software /
664    open source software community with good development tools, which
665    is the primary reason for developing Mono.  
666
667 <a name="etc"></a> **
668 Miscellaneous Questions
669
670 Q: You say that the CLI allows multiple languages to execute on the
671    same environment.  Isn't this the purpose of CORBA?
672
673 A: The key difference between CORBA (and COM) and the CLI is that the
674    CLI allows "data-level interoperability" because every
675    language/component uses the same data layout and memory management.
676
677    This means you can operate directly upon the datatypes that someone
678    else provides, without having to go via their interfaces.  It also
679    means you don't have to "marshall" (convert) parameters (data
680    layouts are the same, so you can just pass components directly) and
681    you don't have to worry about memory managment, because all
682    languages/components share the same garbage collector and address
683    space.  This means much less copying and no need for reference
684    counting.
685
686 Q: Will you support COM?
687
688 A: The runtime will support XPCOM on Unix systems and COM on Windows.
689    Most of the code for dynamic trampolines exists already.
690