3 The Class Library should be compatible with Microsoft's .NET
6 Please see the <a href="class-status.html">Class Status</a>
7 page for a status of who is working on which classes.
9 We will write as much code as possible in C#. We may need to
10 interface with code written in C to gain access to the
11 functionality of libraries like libart, Gtk+, and libc.
15 We welcome contributions to the the Class Library. To get
16 started, check the status page for information about which
17 APIs are being worked on, and how to get in touch with
18 individual maintainers.
20 If you want to work on a class, first check the <a
21 href="class-status.html"> to see if someone is already working
22 on it, and maybe contact them.
24 If nobody is working on it, mail <a
25 href="mailto:mono-list@ximian.com">mono-list@ximian.com</a>
26 with the class you want to implement and CC <a
27 href="mailto:miguel@ximian.com">miguel@ximian.com</a>
32 The Class Library resides in the `mcs' module in the directoy
35 Each directory in the directory represents the assembly where
36 the code belongs to, and inside each directory we divide the
37 code based on the namespace they implement.
39 There are two cases when we should consider portability: when
40 we are dealing with a couple of classes only that differ from
41 system to system (Consider System.Net and System.IO for Win32
42 and Unix). In those cases we will just place the files for
43 example on <t>corlib/System/System.IO/Unix-Console.cs</t> and
44 <t>corlib/System/System.IO/Win32-Console.cs</t>.
46 For classes that might differ more (for example, the
47 implementation of Windows.Forms), we might have different
48 directories altogether: <t>System.Windows.Forms/Win32</t>,
49 <t>System.Windows.Forms/Gtk+</t> and
50 <t>System.Windows.Forms/Cocoa</t>.
52 ** Using existing components from GNOME.
54 Our current plan is to implement the GUI tools on top of
55 Gtk+. The only obstacle here is that applications from Windows
56 might expect to be able to pull the HWND property from the
57 widgets and use PInvoke to call Windows functions.
59 ** Class Library and Win32 dependencies.
61 There are a few spots where the Win32 foundation is exposed to
62 the class library (for example, the HDC and HWND properties in
63 the GDI+). Casual inspection suggests that these can be
64 safely mapped to Gdk's GC and GdkWindow pointers without
67 The only drawback is that support for PInvoke of Win32 code
68 won't be available. An alternate solution would be to use
69 portions of Wine, or even to use Wine as our toolkit.
71 *** Initial GDI+ and WinForms implementation
73 The initial implementation will use Gtk+ as the underlying
74 toolkit. Since GTK+ has already been ported to many windowing
75 systems other than X (including frame buffer, Win32, and BeOS)
76 its use should cover most applications for most users.
80 We will implement ADO.NET functionality by reusing <a
81 href="http://www.gnome-db.org">GNOME-DB</a>. This is an ideal
82 choice, since GNOME-DB was implemented precisely to provide an
83 ADO-like system for GNOME.
85 *** Component Integration
87 We will provide a new namespace to use GNOME specific features
88 as well as a namespace to host Bonobo interfaces and classes
93 The class library will be licensed under the terms of the GNU
94 LGPL. Some people have pointed out that the plain LGPL is
95 troublesome for embedded use of the Mono class libraries. So
96 we are considering to use the GPL with a special exception
98 href="http://www.gnu.org/software/classpath/classpath.html">GNU
99 Classpath</a> project did.
101 The exception to the GPL would be:
103 <i>The library is distributed under the terms of the GNU General
104 Public License with the following exception:
106 If you link this library against your own program, then you do not
107 need to release the source code for that program. However, any
108 changes that you make to the library itself, or to any native
109 methods upon which the library relies, must be re-distributed in
110 accordance with the terms of the GPL.</i>
112 If you are going to contribute, please keep in mind that we
113 might require you to agree that Ximian might adjust the
114 license to enable the use of the class libraries on embedded
115 systems or to develop proprietary applications using Mono.
117 We suggest that you assign the copyright of your work to the
118 GNOME Foundation or the Free Software Foundation to simplify
119 defending the code in case it is used inappropiately.
121 ** Class Library testing
123 We need to write regression tests that will verify
124 the correctness of the class library, compiler, and JIT
127 ** Coding conventions
129 Please follow the conventions on the ECMA specification (On
130 the Annex Partition) for your coding your libraries.
132 Use 8 space tabs for writing your code (hopefully we can keep
133 this consistent). If you are modifying someone else's code, try
134 to keep the coding style similar.
136 For a rationale on 8 space tabs, read Linus Torvald's Coding
137 Style guidelines in the Linux kernel source for a rationale.
139 *** Missing implementation bits
141 If you implement a class and you are missing implementation bits,
142 please put in the code the word "TODO" and a description of what
143 is missing to be implemented.
145 *** Tagging buggy code
147 If there is a bug in your implementation tag the problem by using
148 the word "FIXME" in the code, together with a description of the
151 Do not use XXX or obscure descriptions, because otherwise people
152 will not be able to understand what you mean.
154 *** Tagging Lame specs
156 Sometimes the specification will be lame (consider Version.ToString (fieldCount)
157 where there is no way of knowing how many fields are available, making the API
158 not only stupid, but leading to unreliable code).
160 In those cases, use the keyword "LAMESPEC".
164 Frequently asked questions about the class library:
166 Q: I am writing a new class that overrides one of the system classes,
167 and I am getting a 1595 warning from the compiler. Should we use a
170 A: There is a quick solution to the problem, you can pass the command
171 line argument /nowarn:1595 and this will effectively let you use
172 your implementation of the code, while overriding the ones from the