Update to demonstrate problem with static/instance methods.
[mono.git] / web / faq
1 ** Basics
2
3 Q: What is Mono exactly?
4
5 A: The Mono Project is a community initiative to develop an open
6    source, Linux-based version of the Microsoft.NET development
7    platform.  Its objective is to enable Linux developers to build and
8    deploy cross platform .NET Applications.  The project will
9    implement various technologies developed by Microsoft that have now
10    been submitted to the ECMA for standardization.
11
12 Q: Is Mono a .NET implementation?
13
14 A: No.  Microsoft.Net is a broad, company-wide effort that ranges from
15    development tools to end user applications.  Some components of
16    this initiative have been announced and some others are in the
17    works.
18
19
20 Q: What technologies are included in Mono?
21
22 A: Mono contains a number of components useful for building new
23    software:
24
25         <ul>
26                 * A Common Language Infrastructure (CLI) virtual
27                   machine that contains a class loader, Just-in-time
28                   compiler, and a garbage collecting runtime.
29
30                 * A class library that can work with any language
31                   which works on the CLR.
32
33                 * A compiler for the C# language.  In the future we
34                   might work on other compilers that target the Common
35                   Language Runtime.
36
37
38         </ul>
39
40
41    Windows has compilers that target the virtual machine from <a
42 href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
43    number of languages:</a> Managed C++, Java Script, Eiffel,
44    Component Pascal, APL, Cobol, Oberon, Perl, Python, Scheme,
45    Smalltalk, Standard ML, Haskell, Mercury and Oberon.
46
47    The CLR and the Common Type System (CTS) enables applications and
48    libraries to be written in a collection of different languages that
49    target the byte code
50
51    This means for example that if you define a class to do algebraic
52    manipulation in C#, that class can be reused from any other
53    language that supports the CLI.  You could create a class in C#,
54    subclass it in C++ and instantiate it in an Eiffel program. 
55
56    A single object system, threading system, class libraries, and
57    garbage collection system can be shared across all these languages.
58    
59 Q: Where can I find the specification for these technologies?
60
61 A: You can find the work-in-progress documentation from the T3G ECMA
62    group here:
63  
64    <a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
65
66 Q: Will you implement the .NET Framework SDK class libraries?
67
68 A: Yes, we will be implementing the APIs of the .NET Framework SDK
69    class libraries. 
70
71 Q: What does Mono stand for?
72
73 A: Mono is the word for `Monkey' in Spanish. We like monkeys.
74
75    It only means a number of other things: monochromatic (hence the
76    gray theme used in the Web site).
77
78 Q: When will you ship it?
79
80 A: It is premature to target a shipdate for the code. While we anticipate
81    availability in the middle of next year, the more contributions we
82    get to the project, the sooner it will ship.
83
84 Q: How can I contribute?
85
86 A: Check the <a href="contributing.html">contributing</a> section. 
87
88 Q: Aren't you just copying someone else's work?
89
90 A: We are interested in providing the best tools for programmers to
91    develop applications for Free Operating Systems.  We also want to help
92    provide the interoperability that will allow those systems to fit in
93    with other standards.
94
95    Please read the <a href="http://www.go-mono.com/rationale.html">Mono
96    Project white paper</a> on Ximian site] for more background and the
97    rationale for the project.
98
99 ** The Ximian role in the Mono Project
100
101 Q: Why is Ximian working on .NET?
102
103 A: We are interested in providing the best tools for programmers to
104    develop applications for Free Operating Systems.  
105
106    For more information, read the project <a
107    href="rationale.html">rationale</a> page.
108
109 Q: Will Ximian be able to take on a project of this size?  
110
111 A: Ximian cannot and will not be able to take on the whole project on
112    its own.  Ximian is spearheading the effort and providing a call to
113    action.  Mono will be a free software/open source community
114    project; that is the only way to implement something of this
115    size. Visit the <a href="contributing.html">contributing</a> page
116    on this site to learn more about what you can do.
117
118 Q: What pieces will Ximian be working on?
119
120 A: We will devote most of our resources to work on the pieces which are
121    on the critical path to release a development and execution environment.
122
123    The idea is to get Mono to a state of that would allow
124    third parties to actually be able to use it real-world development.
125
126
127 ** Relationship with GNOME
128
129 Q: How is this related to GNOME?
130
131 A: In a number of ways.  This project was born out of the need of
132    providing improved tools for the GNOME community, and will use
133    existing components that have been developed for GNOME when they
134    are available.  For example, we plan to use Gtk+ and Libart to
135    implement Winforms and the Drawing2D API and are considering
136    GObject support.
137
138 Q: Has the GNOME Foundation or the GNOME team adopted Mono?
139
140 A: Mono is too new to be adopted by those groups. We hope that the
141    tools that we will provide will be adopted by free software
142    programmers including the GNOME Foundation members and the GNOME
143    project generally.
144
145 Q: Should GNOME programmers switch over to Mono now?
146
147 A: It is still far to early for discussions of "switching over."  No
148    pieces of Mono will be ready within the next six months, and a
149    complete implementation is roughly one year away.
150
151    We encourage GNOME developers to continue using the existing tools,
152    libraries and components.  Improvements made to GNOME will have an
153    impact on Mono, as they would be the "backend" for various classes.
154
155 Q: Will Mono include compatibility with Bonobo components? What is the
156    relationship between Mono and Bonobo?
157
158 A: Yes, we will provide a set of classes for implementing and using
159    Bonobo components from within Mono.  Mono should allow you to write
160    Bonobo components more easily, just like .NET on Windows allows you
161    to export .NET components to COM.
162
163 ** Mono and Microsoft: .NET, Hailstorm, and Passport
164
165 Q: If applications use Mono, does that mean that I have to pay a service fee?
166
167 A: No.  Mono is not related to Microsoft's initiative of
168    software-as-a-service.  It is going to provide an open source,
169    Linux-based version of the Microsoft.NET development platform.  Its
170    objective is to enable Linux developers to build and deploy cross
171    platform .NET Applications.
172
173 Q: Is the Mono Project is related to the Microsoft Hailstorm effort?  Is
174    Ximian endorsing Hailstorm?  
175
176 A: No.  The Mono Project is focused on providing a compatible set of
177    tools for the Microsoft.NET development platform.  It does not
178    address, require, or otherwise endorse the MS Passport-based
179    Hailstorm single sign-on system that is part of Windows XP and
180    other services.
181
182 Q: If you implement .NET, will I depend on Microsoft Passport to run my software?
183
184 A: No. MS Passport is unrelated to running .NET compatible applications
185    produced with the Mono tools.  The only thing you will need is a
186    just-in-time compiler (JIT).
187
188 Q: Is .NET just a bunch of marketing slogans?
189
190 A: Although the `.NET initiative' is still quite nebulous, The .NET Framework
191    has been available for some time.  Mono is not an implementation of the .NET
192    initiative, just the development framework.
193
194 Q: What is a 100% .NET application?
195
196 A: A `100% .NET application' is one that only uses the APIs defined
197    under the System namespace and does not use PInvoke.  These
198    applications would in theory run unmodified on Windows, Linux,
199    HP-UX, Solaris, MacOS X and others. 
200
201 Q: If Microsoft will release a port of their .NET platform under the
202    `Shared Source' license, why should I bother with anything else?
203
204 A: The Shared Source implementation will be expensive and its uses
205    will be tightly restricted, especially for commercial use. We are
206    working towards an implementation that will grant a number of
207    important rights to recipients: use for any purpose,
208    redistribution, modification, and redistribution of modifications.
209
210    This is what we call <a
211    href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
212
213 Q: Is Mono a free implementation of Passport?
214
215 A: No.  Passport is part of Microsoft's Hailstorm initiative.  Mono
216    is just a runtime, a compiler and a set of class libraries. 
217
218 Q: Will the System.Web.Security.PassportIdentity class mean
219    that my software will depend on Passport?
220    
221 A: No.  Applications may use that API to contact a Passport site, but
222    are not required to do so.
223
224    As long as your application does not use Passport, you will not
225    need Passport.  
226
227    It might even be possible to implement that class with
228    a set of dummy functions, or use an alternate Passport implementation.
229
230    We do not know at this time whether the Passport protocol is
231    documented and whether we will be able to talk to
232    passport.com 
233
234 Q: Will Mono running on Linux make Passport available for Linux?
235
236 A: No.  However, the Passport toolkit for Linux-based web servers is available from
237    Microsoft.  
238
239
240 ** Mono and Portable.NET
241
242 Q: What are the differences between Mono and Portable.NET?
243
244 A: Most of Mono is being written using C#, the only pieces written in
245    C are those who have to absolutely be built using C (The JIT
246    engine, the runtime, the interfaces to the garbage collection
247    system).
248
249    The C# compiler and the tools will become reusable C# components.
250
251    Portable.NET is building its components out of C pieces.
252
253 ** Mono and Windows
254
255 Q: Will Mono allow me to run Microsoft Office on Linux?
256
257 A: No, it will not.  Microsoft Office is a Windows application.  To
258    learn more about running Windows applications on Intel Unix systems
259    refer to <a href="http://www.winehq.com">the Wine Project</a>.
260
261 ** Web Services
262
263 Q: Is Mono just a new way of writing Web Services?
264
265 A: No.
266
267 Q: If Mono implements the SDK classes, will I be able to write and
268    execute .NET Web Services with it?
269    
270 A: Yes.  When the project is finished, you will be able to use the
271    same technologies that are available through the .NET Framework SDK
272    on Windows to write Web Services.
273
274 Q: What about Soup?  Can I use Soup without Mono?
275
276 A: Soup is a library for GNOME applications to create SOAP servers and
277    SOAP clients, and can be used without Mono.  You can browse the
278    source code for soup using <a
279    href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>.
280
281 Q: Can I use CORBA?
282
283 A: Yes. The CLI contains enough information about a class that
284    exposing it to other RPC systems (like CORBA) is really simple, and
285    does not even require support from an object.  
286
287    We will be implementing CORBA interoperation as an extension to the
288    Mono classes so that we can integrate with Bonobo, just like
289    Microsoft provides COM interoperation classes and support
290    mechanisms. 
291
292 Q: Can I serialize my objects to other things other than XML?
293
294 A: Yes, although the serializing tools have not yet been planned, and
295 you would probably have to implement them yourself.
296
297 ** Development Tools and Issues
298
299 Q: Will it be possible to use the CLI features without using bytecodes
300    or the JIT?
301
302 A: Yes. The CLI engine will be made available as a shared library.
303    The garbage collection engine, the threading abstraction, the
304    object system, the dynamic type code system and the JIT will be
305    available for C developers to integreate with their applications if
306    they wish to do so. 
307
308 Q: Will you have new development tools?
309
310 A: With any luck, Free Software enthusiasts will contribute tools to
311    improve the developer environment.  These tools could be developed
312    initially using the Microsoft implementation of the CLI and then
313    executed later with Mono.
314
315 Q: What kind of rules make the Common Intermediate Language useful for
316    JITers?
317
318 A: The main rule is that the stack in the CLI is not a general purpose
319    stack.   You are not allowed to use it for other purposes than
320    computing values and passing arguments to functions or return
321    values.  
322
323    At any given call or return instruction, the types on the stack
324    have to be the same independently of the flow of execution of your
325    code. 
326
327 Q: Is it true that the CIL is ideal for JITing and not efficient for
328    interpreters?
329
330 A: The CIL is better suited to be JITed than JVM byte codes, but you
331    can interpret them as trivially as you can interpret JVM byte
332    codes. 
333
334
335 ** Mono and Java
336    
337 Q: Why don't you use Java?  After all, there are many languages that
338    target the Java VM.
339
340 A: You can get very good tools for doing Java development on free
341    systems right now.  <a href="http://www.redhat.com">Red Hat</a> has
342    contributed a <a href="http://gcc.gnu.org">GCC</a> <a
343    href="http://gcc.gnu.org/java">frontend for Java</a> that can take
344    Java sources or Java byte codes and generate native executables; <a
345    href="http://www.transvirtual.com">Transvirtual</a> has implemented
346    <a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
347    Intel also has a Java VM called <a
348    href="http://www.intel.com/research/mrl/orp">ORP</a>.
349
350    The JVM is not designed to be a general purpose virtual machine.
351    The Common Intermediate Language (CIL), on the other hand, is
352    designed to be a target for a
353    wide variety of programming languages, and has a set of rules
354    designed to be optimal for JITers.
355
356 Q: Could Java target the CLI?
357
358 A: Yes, Java could target the CLI.  We have details on a <a
359    href="ideas.html#guavac">project</a> that someone could take on to
360    make this happen.
361
362 ** Extending Mono
363
364 Q: Would you allow other classes other than those in the
365    specification?
366
367 A: Yes.  The Microsoft class collection is very big, but it is by no
368    means complete.  It would be nice to have a port of `Camel' (the
369    Mail API used by Evolution inspired by Java Mail) for Mono
370    applications.  
371
372    You might also want to look into implementing CORBA for Mono.  Not
373    only because it would be useful, but because it sounds like a fun
374    thing to do, given the fact that the CLI is such a type rich
375    system. 
376
377    For more information on extending Mono, see our <a
378    href="ideas.html">ideas</a> page.
379
380 ** Mono and portability
381
382 Q: Will Mono only work on Linux?
383
384 A: Currently, we are doing our work on Linux-based systems and
385    Windows.  We do not expect many Linux-isms in the code, so it
386    should be easy to port Mono to other UNIX variants.   
387
388 Q: What about Mono on non X-based systems?
389
390 A: Our main intention at Ximian is to be able to develop GNOME
391    applications with Mono, but if you are interested in providing a
392    port of the Winform classes to other platforms (frame buffer or
393    MacOS X for example), we would gladly integrate them, as long
394    they are under a Free Software License. 
395
396 Q: Will Mono run on Windows?
397
398 A: We hope so.  Currently some parts of Mono only run on Windows
399    (the C# compiler is a .NET executable) and other parts have only
400    been compiled on Linux, but work on Windows with Cygwin.
401
402 Q: Will Mono depend on GNOME?
403
404 A: It will depend only if you are using a particular assembly (for
405    example, for doing GUI applications).  If you are just interested
406    in Mono for implementing a `Hello World Enterprise P2P Web
407    Service', you will not need any GNOME components.
408
409 ** Reusing existing Code
410
411 Q: What projects will you reuse or build upon?
412
413 A: We want to get Mono in the hands of programmers soon.  We are
414    interested in reusing existing open source software.
415
416 Q: What about Intel's research JIT framework, ORP?
417
418 A: At this time, we are investigating whether we can use elements of
419    ORP for Mono.   ORP is a research JIT engine that has a clear
420    defined API that splits the JIT from the GC system and the actual
421    byte code implementation.   It is a research product.
422
423 Q: What about using GNU Lightning?
424
425 A: We are also researching <a
426    href="http://www.gnu.org/software/lightning/lightning.html">GNU
427    Lightning</a>.
428
429 ** Ximian and Microsoft
430
431 Q: Is Microsoft helping Ximian with this project?
432
433 A: Not exactly.  Ximian CTO Miguel de Icaza had a friendly
434    conversation with Microsoft software architect David Stutz, but
435    that's about the extent of the contact.
436    Microsoft is interested in other implementations of .NET and are
437    willing to help make the ECMA spec more accurate for this purpose.
438
439    Ximian representatives have also spoken with Sam Ruby at the ECMA
440    TG3 committee to discuss the same issues.
441
442 Q: Is Microsoft paying Ximian to do this?
443
444 A: No.
445
446 Q: Do you fear that Microsoft will change the spec and render Mono
447    useless?
448
449 A: No.  Microsoft proved with the CLI and the C# language that it was
450    possible to create a powerful foundation for many languages to
451    interoperate.  We will always have that.  
452
453    Even if changes happened in the platform which were undocumented,
454    the existing platform would a value on its own.
455
456    The benefits that you can get from the CLI are going to be
457    there with or without `embracing and extending'.  We might not be
458    able to run every .NET Windows application on Mono, but then again,
459    it was already easy for someone to just use PInvoke to tie their
460    application to Windows.
461
462 Q: Are Microsoft and Corel involved in the Mono implementation?
463
464 A: No, they are not.
465
466 Q: Are you writing Mono from the ECMA specs?
467
468 A: Yes, we are writing them from the ECMA specs and the published
469    materials in print about .NET.
470
471 ** Acronyms
472
473 Q: What is the difference between CLR (Common Language Runtime) and
474    CLI (Common Language Infrastructure)?
475
476 A: CLI is the specification of an execution system.  The Microsoft
477    implementation of this specification is named CLR. 
478
479    Unless we come up with our own acronym, we could just call ours
480    also CLR, just because it would do exactly the same thing the
481    Microsoft implementation does.
482
483 <a name="gcc">
484 ** Mono and GCC
485
486 Q: Are you working on a GCC front-end to C#?
487
488 A: We are seeking volunteers for this task. Visit the <a
489    href="contributing.html">contributing</a> section if
490    you'd like to work on this task.
491
492 Q: How about a GCC backend that will generate CIL images?
493
494 A: That would be great: it could provide a ton of free compilers that
495    would generate CIL code.  This is something that people would want
496    to look into anyway for Windows interoperation in the future.
497    
498    Visit the <a href="contributing.html">contributing</a> section if
499    you'd like to work on this task.
500
501 Q: What about making a front-end to GCC that takes CIL images and
502    generates native code?
503
504 A: I would love to see this, specially since GCC supports this same
505    feature for Java Byte Codes.  You could use the metadata library
506    from Mono to read the byte codes (ie, this would be your
507    "front-end") and generate the trees that get passed to the
508    optimizer.
509
510    Ideally our implementation of the CLI will be available as a shared
511    library that could be linked with your application as its runtime
512    support. 
513    
514    Visit the <a href="contributing.html">contributing</a> section if
515    you'd like to work on this task.
516
517 Q: But would this work around the GPL in the GCC compiler and allow
518    people to work on non-free front-ends?
519
520 A: People can already do this by targeting the JVM byte codes (there
521    are about 130 compilers for various languages that target the JVM).
522
523 Q: Why are you writing a JIT engine instead of a front-end to GCC?
524
525 A: The JIT engine and runtime engine will be able to execute CIL
526    executables generated on Windows.
527
528 ** Performance
529
530 Q: How fast will Mono be?
531
532 A: We can not predict the future, but a conservative estimate is that
533    it would be at least `as fast as other JIT engines'.
534
535    We would like to ship various JIT engines with Mono, just like
536    Microsoft has done with their .NET development platform. We could
537    provide a faster, JIT for fast load times but lower performance,
538    and an and an optimizing JIT that would be slower at generating
539    code but produce more optimal output.
540
541    The CIL has some advantages over the Java byte code:  it is really
542    an intermediate representation and there are a number of
543    restrictions on how you can emit CIL code that simplify creating
544    better JIT engines.
545
546    For example, on the CIL the stack is not really an abstraction
547    available for the code generator to use at will: it is just a way
548    of creating a postfix representation of the parsed tree.  At any
549    given call point or return point, the contents of the stack are
550    expected to contain the same object types independently of how the
551    instructions was reached.
552
553
554 ** Licensing
555
556 Q: Will I be able to write proprietary applications that run with
557    Mono?
558
559 A: Yes.  The licensing scheme is planned to allow proprietary
560    developers to write applications with Mono.
561    
562 Q: What license or licenses are you using for the Mono Project?
563
564 A: The C# Compiler is released under the terms of the GPL.  The class
565    libraries will be under the LGPL or the GPL with a special
566    exception.  The runtime libraries are under the LGPL.
567
568    Since the LGPL is not suitable for embedded systems development, we
569    are also licensing the libraries under the GPL with the following exception:
570
571    If you link this library against your own program, then you do not
572    need to release the source code for that program. However, any
573    changes that you make to the library itself, or to any native
574    methods upon which the library relies, must be re-distributed in
575    accordance with the terms of the GPL.
576
577    This is similar in spirit to <a
578    href="http://www.gnu.org/software/classpath/classpath.html">GNU
579    Classpath.</a>
580
581 Q: Can I subclass objects within the LGPL licensed Mono code and still release
582    the resulting software under a closed license?
583
584 A: Yes.  Object Oriented Programming in the class library is a well
585    understood interface barrier, and subclassing does not "count" as a
586    modification, so you may develop proprietary applications with the
587    Mono libraries.
588
589 Q: I would like to contribute code to Mono under a particular
590    license. What licenses will you accept?
591
592 A: We will have to evaluate the licenses for compatibility first,
593    but as a general rule, we will accept all GPL and LGPL-compatible
594    licenses. If you want to use the BSD
595    license, make sure you use the BSD license without the
596    advertisement clause (The `Ousterhout License').
597
598 ** Assorted questions
599
600 Q: You say that the CLI allows multiple languages to execute on the
601    same environment.  Isn't this the purpose of CORBA?
602
603 A: The key difference between CORBA (and COM) and the CLI is that the
604    CLI allows "data-level interoperability" because every
605    language/component uses the same data layout and memory management.
606
607    This means you can operate directly upon the datatypes that someone
608    else provides, without having to go via their interfaces.  It also
609    means you don't have to "marshall" (convert) parameters (data
610    layouts are the same, so you can just pass components directly) and
611    you don't have to worry about memory managment, because all
612    languages/components share the same garbage collector and address
613    space.  This means much less copying and no need for reference
614    counting.
615