Updated
[mono.git] / web / faq
1 ** Basics
2
3 Q: Is Mono the same as Microsoft's .NET initiative?
4
5 A: It is not. 
6
7    .NET is a company-wide initiative at Microsoft that
8    encompasses many different areas. The .NET development framework,
9    Passport, Biztalk, new server products, and anything that is
10    remotely connected to .NET gets the ".NET-stamping" treatment.
11    Some components of Microsoft's .NET initiative have been announced
12    and some others are in the works.
13
14   Mono is a project to implement several technologies developed by
15    Microsoft that have now been submitted to the ECMA Standards Body.   
16
17 Q: What technologies are included in Mono?
18
19 A: Mono contains a number of components useful for building new
20    software:
21
22         <ul>
23                 * A Common Language Infrastructure (CLI) virtual
24                   machine that contains a class loader, Just-in-time
25                   compiler, and a garbage collecting runtime.
26
27                 * A class library that can work with any language
28                   which works on the CLR.
29
30                 * A compiler for the C# language.  In the future we
31                   might work on other compilers that target the Common
32                   Language Runtime.
33
34                   Windows has compilers that target the
35                   virtual machine from
36                   <a href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
37                   number of languages:</a> Managed C++, Java Script,
38                   Eiffel, Component Pascal, APL, Cobol, Oberon, Perl,
39                   Python, Scheme, Smalltalk, Standard ML, Haskell,
40                   Mercury and Oberon.
41         </ul>
42
43    The CLR and the Common Type System (CTS) enables applications and
44    libraries to be written in a number of languages.  Classes and
45    methods created in one language can be used from a different
46    language. 
47
48    This means for example that if you define a class to do algebraic
49    manipulation in C#, that class can be reused from any other
50    language that supports the CLI.  You could create a class in C#,
51    subclass it in C++ and instantiate it in an Eiffel program. 
52
53    A single object system, threading system, class libraries, and
54    garbage collection system can be shared across all these languages.
55    
56 Q: Where can I find the specification for these technologies?
57
58 A: You can find the work-in-progress documentation from the T3G ECMA
59    group here:
60  
61    <a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
62
63 Q: Will you implement the .NET Framework SDK class libraries?
64
65 A: Yes, we will be implementing the APIs of the .NET Framework SDK
66    class libraries. 
67
68 Q: What does Mono stand for?
69
70 A: Mono is the word for `Monkey' in Spanish. We like monkeys.
71
72    It only means a number of other things: monochromatic (hence the
73    gray theme used in the Web site).
74
75 Q: When will you ship it?
76
77 A: We do not know when the code will be shipped.  The more
78    contributions we get to the project, the sooner it will ship.
79
80    A rough estimate is that we might be able to run our C# compiler on
81    Linux by the end of the year.  That means running the Windows
82    Executable generated by a Microsoft .NET compiler on the Linux
83    platform.
84
85    We expect that doing GUI applications will require more work on the
86    class libraries. That could take another six months.
87
88 Q: How can I contribute?
89
90 A: Check the <a href="contributing.html">contributing</a> section. 
91
92 Q: You guys should innovate instead of copying.
93
94 A: In this particular case, we see a clear advantage in the platform
95    and we are interested in using the features of the CLI on open source systems.
96
97    We have decided that we should spend our limited resources towards
98    implementing an existing specification instead of designing and
99    implementing our own.
100
101    Designing and implementing our own would be possible, but it doesn't make
102    sense to do that just because the specification comes from a
103    proprietary vendor.  
104
105 ** Ximian
106
107 Q: Why is Ximian working on .NET?
108
109 A: We are interested in providing the best tools for programmers to
110    develop applications for Free Operating Systems.  
111
112    For more information, read the project <a
113    href="rationale.html">rationale</a> page.
114
115 Q: Will Ximian be able to take on a project of this size?  
116
117 A: Ximian will not be able to taken on the whole project on its own.
118    Mono will be a free software/open source community project, that is
119    the only way we can hope to implement something of this size.  You
120    can <a href="contributing.html">contribute</a> to this effort.
121
122 Q: What pieces will Ximian be working on?
123
124 A: We will focus on building a development and execution
125    environment.  
126
127    The idea is to get Mono to a state of that would allow
128    third parties to actually be able to use it real-world development.
129
130 Q: Why does Ximian even care?
131
132 A: We like the features that the CLI and its related technologies
133    bring to the table.  An exciting addition to the developer toolkit.
134    The goal of Mono is to bring this technology to non-Windows
135    platforms (although we hope Mono will also run on Windows, for
136    debugging and comparative purposes).
137
138
139 ** Licensing
140
141 Q: Will I be able to write proprietary applications that run with
142    Mono?
143
144 A: Yes.  The licensing scheme is planned to allow proprietary
145    developers to write applications with Mono.
146    
147 Q: What license is Mono on?
148
149 A: The C# Compiler is released under the terms of the GPL.  The class
150    libraries will be under the LGPL or the GPL with a special
151    exception.  The runtime libraries are under the LGPL.
152
153    Since the LGPL is not suitable for embedded systems development, we
154    are also licensing the libraries under the GPL with the following exception:
155
156    If you link this library against your own program, then you do not
157    need to release the source code for that program. However, any
158    changes that you make to the library itself, or to any native
159    methods upon which the library relies, must be re-distributed in
160    accordance with the terms of the GPL.
161
162    This is similar in spirit to <a
163    href="http://www.gnu.org/software/classpath/classpath.html">GNU
164    Classpath.</a>
165
166 Q: But in Object Oriented Programming I need to subclass your library
167    functions, does that mean that I am making modifications to your
168    library and hence I would have to distribute my sources under the
169    LGPL?
170
171 A: No.  Object Oriented Programming in the class library is a well
172    understood interface barrier, so you can actually develop
173    proprietary applications with the Mono libraries. 
174
175 Q: Will you accept code under the XXX License?
176
177 A: If the XXX License is compatible with the license we use in that
178    specific piece of code, then yes.  If you want to use the BSD license, make
179    sure you use the BSD license without the advertisement clause (The
180    `Ousterhout License').
181
182 ** Mono and .NET
183
184 Q: If applications use Mono, does that mean that I have to pay a service fee?
185
186 A: No.  Mono is not related to Microsoft's initiative of
187    software-as-a-service. 
188
189 Q: If you implement .NET, will I depend on Microsoft Passport to run my software?
190
191 A: No.  The .NET Framework is a runtime infrastructure and collection
192    of class libraries.  Passport may be required to access certain web
193    services written for that framework, but only if the programmer
194    chooses Passport as the authentication mechanism.
195
196 Q: Is .NET just a bunch of marketing slogans?
197
198 A: Although the `.NET initiative' is still quite nebulous, The .NET Framework
199    has been available for some time.  Mono is not an implementation of the .NET
200    initiative, just the development framework.
201
202 Q: What is a 100% .NET application?
203
204 A: A `100% .NET application' is one that only uses the APIs defined
205    under the System namespace and does not use PInvoke.  These
206    applications would in theory run unmodified on Windows, Linux,
207    HP-UX, Solaris, MacOS X and others. 
208
209 Q: But Microsoft will release a port of the real thing under the
210    `Shared Source' license, why bother with anything else?
211
212 A: The Shared Source implementation will not be usable for commercial
213    purposes.  We are working towards an implementation that will grant
214    a number of rights to recipients: use for any purpose,
215    redistribution, modification, and redistribution of modifications.
216
217    This is what we call <a
218    href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
219
220 ** Passport
221
222 Q: Is this a free implementation of Passport?
223
224 A: No.  Passport is part of Microsoft's Hailstorm initiative.  Mono
225    is just a runtime, a compiler and a set of class libraries. 
226
227 Q: Will the System.Web.Security.PassportIdentity class, mean
228    that my software will depend on Passport?
229    
230 A: No.  That just means that applications might use that API to
231    contact a Passport site.  
232
233    As long as your application does not use Passport, you will not
234    need Passport.  
235
236    It might even be possible to implement that class with
237    a set of dummy functions, or use an alternate Passport implementation.
238
239    We do not know at this time whether the Passport protocol is
240    documented and whether we will be able to talk to
241    passport.com 
242
243 Q: But that must mean that you are tied to Passport!
244
245 A: All the contrary.  The implementation could keep the interface (for
246    the sake of simplicity, lets say it implements the method `Login'
247    and `GetUserName').
248
249    We could implement `Login' and `GetUserName' by talking to XNS or
250    any other decentralized systems.  Or any other system that the
251    industry standarizes on.
252
253 Q: What is your opinion?
254
255 A: You can read my personal <a href="passport.html">opinion on
256    passport</a>.
257
258 Q: Will Mono running on Linux make Passport available for Linux?
259
260 A: The Passport toolkit for Linux-based web servers is available from
261    Microsoft.  
262
263    Again, Mono has nothing to do with Passport. 
264
265 ** Mono and Windows
266
267 Q: Will Mono allow me to run Microsoft Office on Linux?
268
269 A: No, it will not.  Microsoft Office is a Windows application.  To
270    run Windows applications on Intel Unix systems refer to <a
271    href="http://www.winehq.com">the Wine Project</a>
272
273 ** GNOME
274
275 Q: How is this related to GNOME?
276
277 A: In a number of ways:
278
279         * Mono will use existing
280           components that have been developed for GNOME when it makes
281           sense.  For example on X systems, we will use Gtk+ and
282           Libart to implement Winforms and the Drawing2D API.  
283
284           For database access, we will use LibGDA (not really
285           depending on GNOME, but related to).
286
287         * This project was born out of the need of providing improved
288           tools for the GNOME community. 
289
290         * We would like to add support to our CLR implementation to
291           deal with GObjects (in GNOME 1.x, they are called
292           GtkObjects), and allow Mono developers to provide GObjects
293           or use and extend existing GObjects.
294
295 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
296
297 A: Mono is too new to be adopted by those groups. We hope that the
298    tools that we will provide will be adopted by free software
299    programmers including the GNOME Foundation members and the GNOME
300    project generally.
301
302 Q: Should GNOME programmers switch over to Mono?
303
304 A: Mono will not be ready even within the next six months, and a
305    complete implementation is probably one year away.  
306
307    We encourage GNOME developers to continue using the existing tools,
308    libraries and components.  Improvements made to GNOME will have an
309    impact on Mono, as they will provide the "backend" for various
310    classes. 
311
312 Q: Will Mono include compatibility with Bonobo components?
313
314 A: Yes, we will provide a set of classes for implementing and using
315    Bonobo components from within Mono. 
316
317 Q: Does Mono replace Bonobo?
318
319 A: Bonobo is very focused on cross-application component reuse.  Mono
320    will provide a Bonobo framework to allow you to develop Bonobo
321    components and use Bonobo components on Unix.  
322
323    Mono should allow you to write Bonobo components more easily, just
324    like .NET on Windows allows you to export .NET components to COM.
325
326 ** Mono and the Web
327
328 Q: Is Mono a way of running Java applets?
329
330 A: No.
331
332 ** Web Services
333
334 Q: Is Mono just a new way of writing Web Services?
335
336 A: No.
337
338 Q: If this implements the SDK classes, will I be able to write and
339    execute .NET Web Services with this?
340    
341 A: Yes, you will.
342
343    When the project is finished, you will be able to use the same
344    technologies that are available through the .NET Framework SDK on
345    Windows to write Web Services.
346
347 Q: What about Soup?
348
349 A: Soup is a library for GNOME applications to create SOAP server and
350    SOAP clients.   You can browse the source code for soup using <a
351    href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>
352
353 Q: Can I use CORBA?
354
355 A: Yes. The CLI contains enough information about a class that
356    exposing it to other RPC systems (like CORBA) is really simple, and
357    does not even require support from an object.  
358
359    We will be implementing CORBA interoperation as an extension to the
360    Mono classes so that we can integrate with Bonobo, just like
361    Microsoft provides COM interoperation classes and support
362    mechanisms. 
363
364 Q: Can I serialize my objects to other things other than XML?
365
366 A: Yes, although the serializing tools have not yet been planned, and
367 you would probably have to implement them yourself.
368
369 ** Development Tools 
370
371 Q: Will it be possible to use the CLI features without using bytecodes
372    or the JIT?
373
374 A: Yes. The CLI engine will be made available as a shared library.
375    The garbage collection engine, the threading abstraction, the
376    object system, the dynamic type code system and the JIT will be
377    available for C developers to integreate with their applications if
378    they wish to do so. 
379
380 Q: Will you have new development tools?
381
382 A: Hopefully Free Software enthusiasts will contribute tools to
383    improve the developer environment.  These tools could be developed
384    initially using Microsoft implementation of the CLI and then
385    executed later with Mono.
386
387 ** Mono and Java
388    
389 Q: What about using Java?  After all there are many languages that
390    target the Java VM.
391
392 A: You can get very good tools for doing Java development on free
393    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
394    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
395    href="http://gcc.gnu.org/java">frontend for Java</a> that can take
396    Java sources or Java byte codes and generate native executables; <a
397    href="http://www.transvirtual.com">Transvirtual</a> has implemented
398    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
399    Intel also has a Java VM called <a
400    href="http://www.intel.com/research/mrl/orp">ORP</a>.
401
402    The JVM is not designed to be a general purpose virtual machine.
403    The Common Intermediate Language (CIL), on the other hand, is
404    designed to be a target for a
405    wide variety of programming languages, and has a set of rules
406    designed to be optimal for JITers.
407
408
409 Q: What kind of rules make the Common Intermediate Language useful for
410    JITers?
411
412 A: The main rule is that the stack in the CLI is not a general purpose
413    stack.   You are not allowed to use it for other purposes than
414    computing values and passing arguments to functions or return
415    values.  
416
417    At any given call or return instruction, the types on the stack
418    have to be the same independently of the flow of execution of your
419    code. 
420
421 Q: I heard that the CIL is ideal for JITing and not efficient for
422    interpreters, is this the case?
423
424 A: The CIL is better suited to be JITed than JVM byte codes, but you
425    can interpret them as trivially as you can interpret JVM byte
426    codes. 
427
428 Q: Could Java target the CLI?
429
430 A: Yes, Java could target the CLI.  We have details on a <a
431    href="ideas.html#guavac">project</a> that someone could take on to
432    make this happen.
433
434 ** Extending Mono
435
436 Q: Would you allow other classes other than those in the
437    specification?
438
439 A: Yes.  The Microsoft class collection is very big, but it is by no
440    means complete.  It would be nice to have a port of `Camel' (the
441    Mail API used by Evolution inspired by Java Mail) for Mono
442    applications.  
443
444    You might also want to look into implementing CORBA for Mono.  Not
445    only because it would be useful, but because it sounds like a fun
446    thing to do, given the fact that the CLI is such a type rich
447    system. 
448
449    For more information on extending Mono, see our <a
450    href="ideas.html">ideas</a> page.
451
452 ** Mono and portability
453
454 Q: Will Mono only work on Linux?
455
456 A: Currently, we are doing our work on Linux-based systems and
457    Windows.  We do not expect many Linux-isms in the code, so it
458    should be easy to port Mono to other UNIX variants.   
459
460 Q: What about Mono on non X-based systems?
461
462 A: Our main intention at Ximian is to be able to develop GNOME
463    applications with Mono, but if you are interested in providing a
464    port of the Winform classes to other platforms (frame buffer or
465    MacOS X for example), we would gladly integrate them, as long
466    they are under a Free Software License. 
467
468 ** Reusing existing Code
469
470 Q: What projects will you reuse or build upon?
471
472 A: We want to get Mono in the hands of programmers soon.  We are
473    interested in reusing existing open source software.
474
475 Q: What about Intel's research JIT framework, ORP?
476
477 A: At this time, we are investigating whether we can use elements of
478    ORP for Mono.   ORP is a research JIT engine that has a clear
479    defined API that splits the JIT from the GC system and the actual
480    byte code implementation.   It is a research product.
481
482 Q: What about using GNU Lightning?
483
484 A: We are also researching <a
485    href="http://www.gnu.org/software/lightning/lightning.html">GNU
486    Lightning</a>.
487
488 <a name="ximian-and-microsoft">
489 ** Ximian and Microsoft
490
491 Q: I read that Microsoft is helping out Ximian, is this true?
492
493 A: Initial contact between David Stutz and Miguel de Icaza happened.
494    It was a friendly conversation.  Microsoft is interested in other
495    implementing .NET and are willing to help make the ECMA spec more
496    accurate for this purpose.
497
498    We were initially contacted by Sam Ruby at the ECMA TG3 committee
499    to discuss the same issue.  And we are glad to have good contacts
500    to ask questions about the specs. 
501
502 Q: Is Microsoft paying Ximian to do this?
503
504 A: No, we are doing this for purely selfish reasons.  We are upgrading
505    our development platform to build better applications on Unix and other
506    systems.
507
508 Q: Do you fear that Microsoft will change the spec and render Mono useless?
509
510 A: No.  Microsoft proved with the CLI and the C# language that it was
511    possible to create a powerful foundation for many languages to
512    interoperate.  We will always have that.  
513
514    Even if changes happened in the platform which were undocumented
515    (which is very unlikely), the existing platform has a value on its
516    own.
517
518    Miguel once explained its motivation for working on Mono to Dave
519    Winer, and his mail got posted <a
520    href="http://scriptingnews.userland.com/stories/storyReader$1275">here</a>
521
522 Q: Didn't Miguel de Icaza say that `Unix Sucks'?
523
524 A: Yes, he did, as a catch phrase in his opening remark on the Ottawa
525    Linux Symposium.  His talk focused on various ways to improve Unix.
526
527    There is a paper describing some ways to improve Unix at:
528
529         <a href="http://primates.ximian.com/~miguel/bongo-bong.html">
530         http://primates.ximian.com/~miguel/bongo-bong.html</a>
531
532 Q: Didn't Ximian's Miguel work for Microsoft?
533
534 A: Actually, Nat Friedman (Ximian's co-founder) did work as an
535    intern for Microsoft for one summer but Miguel did not.
536
537 Q: Did Nat and Miguel meet at Microsoft?
538
539 A: They met online on the Linux IRC network;  They met in person for
540    the first time in 1997.
541
542 ** Mono and Microsoft
543    
544 Q: How can you expect Mono to compete with Microsoft, wont this
545    require an effort too large?
546
547 A: You are right.  Mono will never become a reality without the help
548    of other contributors.  Ximian is a small company that can not
549    finish Mono alone.  We will be working with members of the
550    community to deliver the product.
551
552 Q: Is Microsoft and Corel involved in the Mono implementation?
553
554 A: No, they are not.
555
556 Q: Are you writing Mono from the ECMA specs?
557
558 A: yes, we are writing them from the ECMA specs and the published
559    materials in print about .NET
560
561 Q: What happens if Microsoft `Embraces and Extends' the CLI standard
562    and keeps Mono out of the play?
563
564 A: There are various explanations to this question.  The first one is
565    that the benefits that you can get from the CLI are going to be
566    there with or without `embracing and extending'.  We might not be
567    able to run every .NET Windows application on Mono.  But remember:
568    it was already easy for someone to just use PInvoke to tie their
569    application to Windows.
570
571    The bottom line is that the advantages of having a CLI runtime will
572    be with us, no matter if Microsoft forks their version to be
573    incompatible. 
574
575 Q: What if Microsoft changes the interface, and all of a sudden 
576    applications break?
577
578 A: If they change their released API, every application that was
579    developed against it will break.  
580
581    That being said, Microsoft have a pretty good record of keeping
582    backwards binary compatibility.
583
584 ** Acronyms
585
586 Q: What is the difference between CLR (Common Language Runtime) and
587    CLI (Common Language Infrastructure)?
588
589 A: CLI is the specification of an execution system.  The Microsoft
590    implementation of this specification is named CLR. 
591
592    Unless we come up with our own acronym, we could just call ours
593    also CLR, just because it would do exactly the same thing the
594    Microsoft implementation does.
595
596 <a name="gcc">
597 ** Mono and GCC
598
599 Q: Should someone work on a GCC front-end to C#?
600
601 A: I would love if someone does, and we would love to help anyone that
602    takes on that task, but we do not have the time or expertise to
603    build a C# compiler with the GCC engine.  I find it a lot more fun
604    personally to work on C# on a C# compiler, which has an intrinsic
605    beauty.
606
607    We can provide help and assistance to anyone who would like to work
608    on this task.
609
610 Q: Should someone make a GCC backend that will generate CIL images?
611
612 A: I would love to see a backend to GCC that generates CIL images.  It
613    would provide a ton of free compilers that would generate CIL
614    code.  This is something that people would want to look into
615    anyways for Windows interoperation in the future.
616
617    Again, we would love to provide help and assistance to anyone
618    interested in working in such a project.
619
620 Q: What about making a front-end to GCC that takes CIL images and
621    generates native code?
622
623 A: I would love to see this, specially since GCC supports this same
624    feature for Java Byte Codes.  You could use the metadata library
625    from Mono to read the byte codes (ie, this would be your
626    "front-end") and generate the trees that get passed to the
627    optimizer.
628
629    Ideally our implementation of the CLI will be available as a shared
630    library that could be linked with your application as its runtime
631    support. 
632
633    Again, we would love to provide help and assistance to anyone
634    interested in working in such a project.
635    
636 Q: But would this work around the GPL in the GCC compiler and allow
637    people to work on non-free front-ends?
638
639 A: People can already do this by targeting the JVM byte codes (there
640    are about 130 compilers for various languages that target the JVM).
641
642 Q: Why are you writing a JIT engine instead of a front-end to GCC?
643
644 A: The JIT engine and runtime engine will be able to execute CIL
645    executables generated on Windows.
646
647 ** Mono and Portability
648
649 Q: Will Mono work on other variants of Unix?
650
651 A: Yes.  We do not expect to add any gratuitous incompatibilities.
652
653 Q: Will Mono run on Windows?
654
655 A: Hopefully yes.  Currently some parts of Mono only run on Windows
656    (the C# compiler is a .NET executable) and other parts have only
657    been compiled on Linux, but work on Windows with Cygwin.
658
659 Q: Will Mono depend on GNOME?
660
661 A: It will depend only if you are using a particular assembly (for
662    example, for doing GUI applications).  If you are just interested
663    in Mono for implementing a `Hello World Enterprise P2P Web
664    Service', you will not need any GNOME component.
665
666 ** Performance
667
668 Q: How fast will be Mono?
669
670 A: We can not predict the future, but a conservative estimate is that
671    it would be at least `as fast as other JIT engines'.
672
673    Now, wishfully thinking I hope that we will ship various JITs with
674    Mono just like Microsoft has done.  A fast JITer when maximum
675    performance is not needed, but fast load times are important;  And
676    an optimizing JITer that would be slower at generating code but
677    produce more optimal output.
678
679    The CIL has some advantages over the Java byte code:  it is really
680    an intermediate representation and there are a number of
681    restrictions on how you can emit CIL code that simplify creating
682    better JIT engines.
683
684    For example, on the CIL the stack is not really an abstraction
685    available for the code generator to use at will: it is just a way
686    of creating a postfix representation of the parsed tree.  At any
687    given call point or return point, the contents of the stack are
688    expected to contain the same object types independently of how the
689    instructions was reached.
690
691
692 ** Mono and Portable.NET
693
694 Q: What are the differences between Mono and Portable.NET?
695
696 A: Most of Mono is being written using C#, the only pieces written in
697    C are those who have to absolutely be built using C (The JIT
698    engine, the runtime, the interfaces to the garbage collection
699    system).
700
701    The C# compiler and the tools will become reusable C# components.
702
703    Portable.NET is building its components out of C pieces.
704
705 ** Assorted questions
706
707 Q: You say that the CLI allows multiple languages to execute on the
708    same environment.  Isn't this the purpose of CORBA?
709
710 A: The key difference between CORBA (and COM) and the CLI is that the
711    CLI allows "data-level interoperability" because every
712    language/component uses the same data layout and memory management.
713
714    This means you can operate directly upon the datatypes that someone
715    else provides, without having to go via their interfaces.  It also
716    means you don't have to "marshall" (convert) parameters (data
717    layouts are the same, so you can just pass components directly) and
718    you don't have to worry about memory managment, because all
719    languages/components share the same garbage collector and address
720    space.  This means much less copying and no need for reference
721    counting.
722