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="download.html">Classes Distribution</a> to see if it is
22 not implemented yet, if not, check the <a
23 href="class-status.html">Class Status</a> to see if someone is
24 already working on it, and maybe contact them.
26 If nobody is working on it, mail <a
27 href="mailto:mono-list@ximian.com">mono-list@ximian.com</a>
28 with the class you want to implement and CC <a
29 href="mailto:miguel@ximian.com">miguel@ximian.com</a>.
31 You can also track live the activities of the Mono CVS module
32 by subscribing to the <a
33 href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list</a>
39 The Class Library resides in the `mcs' module in the directoy
42 Each directory in the directory represents the assembly where
43 the code belongs to, and inside each directory we divide the
44 code based on the namespace they implement.
46 There are two cases when we should consider portability: when
47 we are dealing with a couple of classes only that differ from
48 system to system (Consider System.Net and System.IO for Win32
49 and Unix). In those cases we will just place the files for
50 example on <t>corlib/System/System.IO/Unix-Console.cs</t> and
51 <t>corlib/System/System.IO/Win32-Console.cs</t>.
53 For classes that might differ more (for example, the
54 implementation of Windows.Forms), we might have different
55 directories altogether: <t>System.Windows.Forms/Win32</t>,
56 <t>System.Windows.Forms/Gtk+</t> and
57 <t>System.Windows.Forms/Cocoa</t>.
59 ** Using existing components from GNOME.
61 Our current plan is to implement the GUI tools on top of
62 Gtk+. The only obstacle here is that applications from Windows
63 might expect to be able to pull the HWND property from the
64 widgets and use PInvoke to call Windows functions.
66 ** Class Library and Win32 dependencies.
68 There are a few spots where the Win32 foundation is exposed to
69 the class library (for example, the HDC and HWND properties in
70 the GDI+). Casual inspection suggests that these can be
71 safely mapped to Gdk's GC and GdkWindow pointers without
74 The only drawback is that support for PInvoke of Win32 code
75 won't be available. An alternate solution would be to use
76 portions of Wine, or even to use Wine as our toolkit.
78 *** Initial GDI+ and WinForms implementation
80 The initial implementation will use Gtk+ as the underlying
81 toolkit. Since GTK+ has already been ported to many windowing
82 systems other than X (including frame buffer, Win32, and BeOS)
83 its use should cover most applications for most users.
87 We will implement ADO.NET functionality by reusing <a
88 href="http://www.gnome-db.org">GNOME-DB</a>. This is an ideal
89 choice, since GNOME-DB was implemented precisely to provide an
90 ADO-like system for GNOME.
92 *** Component Integration
94 We will provide a new namespace to use GNOME specific features
95 as well as a namespace to host Bonobo interfaces and classes
100 The class library will be licensed under the terms of the GNU
101 LGPL. Some people have pointed out that the plain LGPL is
102 troublesome for embedded use of the Mono class libraries. So
103 we are considering to use the GPL with a special exception
105 href="http://www.gnu.org/software/classpath/classpath.html">GNU
106 Classpath</a> project did.
108 The exception to the GPL would be:
110 <i>The library is distributed under the terms of the GNU General
111 Public License with the following exception:
113 If you link this library against your own program, then you do not
114 need to release the source code for that program. However, any
115 changes that you make to the library itself, or to any native
116 methods upon which the library relies, must be re-distributed in
117 accordance with the terms of the GPL.</i>
119 If you are going to contribute, please keep in mind that we
120 might require you to agree that Ximian might adjust the
121 license to enable the use of the class libraries on embedded
122 systems or to develop proprietary applications using Mono.
124 We suggest that you assign the copyright of your work to the
125 GNOME Foundation or the Free Software Foundation to simplify
126 defending the code in case it is used inappropiately.
128 ** Class Library testing
130 We need to write regression tests that will verify
131 the correctness of the class library, compiler, and JIT
134 Please write your regression tests using <a
135 href="http://nunit.sourceforge.net">NUnit</a>
137 ** Coding conventions
139 Please follow the conventions on the ECMA specification (On
140 the Annex Partition) for your coding your libraries.
142 Use 8 space tabs for writing your code (hopefully we can keep
143 this consistent). If you are modifying someone else's code, try
144 to keep the coding style similar.
146 For a rationale on 8 space tabs, read Linus Torvald's Coding
147 Style guidelines in the Linux kernel source for a rationale.
149 *** Missing implementation bits
151 If you implement a class and you are missing implementation bits,
152 please put in the code the word "TODO" and a description of what
153 is missing to be implemented.
155 *** Tagging buggy code
157 If there is a bug in your implementation tag the problem by using
158 the word "FIXME" in the code, together with a description of the
161 Do not use XXX or obscure descriptions, because otherwise people
162 will not be able to understand what you mean.
164 *** Tagging Lame specs
166 Sometimes the specification will be lame (consider Version.ToString (fieldCount)
167 where there is no way of knowing how many fields are available, making the API
168 not only stupid, but leading to unreliable code).
170 In those cases, use the keyword "LAMESPEC".
174 Frequently asked questions about the class library:
176 Q: I am writing a new class that overrides one of the system classes,
177 and I am getting a 1595 warning from the compiler. Should we use a
180 A: There is a quick solution to the problem, you can pass the command
181 line argument /nowarn:1595 and this will effectively let you use
182 your implementation of the code, while overriding the ones from the