[Mono-list] Mono Weekly News, January 10th 2003

Jaime Anguiano Olarra jaime@gnome.org
11 Jan 2003 02:00:18 +0100

Content-Type: multipart/alternative; boundary="=-/WpuUSPtYWXp2X0H4Vq0"

Content-Type: text/plain
Content-Transfer-Encoding: 7bit

	Hi Mono Community!,

	Here there are the latests Mono news. It has been more than a week
since the older letter due to the quite days we have had during the
vacations. Sorry for the delay. 

// http://www.go-mono.org -- The Mono Project. .NET + freedom.

Content-Type: text/html; charset=utf-8

  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
	Hi Mono Community!,

	Here there are the latests Mono news. It has been more than a week since the older letter due to the quite days we have had during the vacations. Sorry for the delay. 

// http://www.go-mono.org -- The Mono Project. .NET + freedom.



Content-Disposition: attachment; filename=index.html
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; name=index.html; charset=ANSI_X3.4-1968

<title>Mono Weekly News. Jan 10th, 2003</title>

<h1>Mono Weekly News (Jan 10th, 2003)</h1>

  Welcome to the third MWN letter. We have a lot of news for you!.=20

  <b>Table of contents
    <li>1. Headlines.
	   <li>1.1 Switch support has landed in Mono CVS.</li>
	   <li>1.2 Glade# use attributes and implicit names.</li>
	   <li>1.3 Mono debugger now has support for multi-thread debugging.</li>
	   <li>1.4 Mono and Mono ASP.NET as an Apache module.</li>
	   <li>1.5 Zoltan has published his Code Coverage analysis tool for Mono.<=
	   <li>1.6 Paolo added a memory profiler to Mono.</li>
	   <li>1.7 Steve Newman contributed his Javascript interpreter to Mono.</l=
	   <li>1.8 Jonathan Pryor has published his type-reflector.</li>
    <li>2. Meet the team. This week </li>
    <li>3. The Mono Spell.</li>
    <li>4. Mono Socials: Duncan does Tokyo.</li>
    <li>5. CVS Activity.</li>
    <li>6. Mailing List Activity.</li>
<p>  <h3>1.1 Switch support has landed in Mono CVS.</h3></p>
<p>  At the beginning of the week Jonathan Pryor sent this=20
     <a href=3D"http://lists.ximian.com/archives/public/mono-list/2002-Dece=
mber/004281.html">amazing email</a>.
     Mono supports now the 'switches' as described in MSDN docs: "a way to =
     flags/control information into your program so they can be used". They=
     primarily used with code instrumentation. More info in the email!.

<p>  <h3>1.2 Glade# use attributes and implicit names.</h3></p>
<p>  Rachel has made Glade# use attributes so binding C# widgets to the=20
     designed widgets is now easier than ever. Alp has improved this to=20
     use implicit names as well. This means, before you had to do:
     <pre class=3D"programlisting">
     Gtk.Window main_window =3D (Gtk.Window) gxml["main_window"];
     but now you can just use the attribute:
     <pre class=3D"programlisting">
	Gtk.Window main_window;

<p>  <h3>1.3 Mono debugger now has support for multi-thread debugging.</h3>=

<p>  Martin's Mono debugger now has support for multi-thread debugging that=
     possible to have the new special feature of having breakpoints that ca=
n be=20
     defined in a per-thread basis now.

<p>  <h3>1.4 Mono and Mono ASP.NET as an Apache module.</h3></p>

<p>  Daniel Lopez has checked in his Apache module to integrate Mono and Mo=
     ASP.NET support as an Apache module. Gonzalo has folded his new Mono h=
     classes into this module (they are now shared between XSP and mod_mono=
     You can get the mod_apache from CVS (module name: mod_mono).=20

<p>  <h3>1.5 Zoltan has published his Code Coverage analysis tool for Mono.=

<p>  Zoltan's Code Coverage Analyzer snapshots are now on his web. You can =
get them
     <a href=3D"http://www.nexus.hu/vargaz2/">here</a>

<p>  <h3>1.6 Paolo added a memory profiler to Mono.</h3></p>
<p>  This memory profiler gives a report of where memory was allocated in a=
     the number of allocation, the types of the objects and the total memor=
     allocated it's used to identify what codepaths are the most involved i=
n wasting=20
     GC memory.

<p>  <h3>1.7 Steve Newman contributed his Javascript interpreter to Mono.</=

<p>  Steve is the author of <a href=3D"janet-js.sourceforge.net">Janet</a>:=
 an ECMA=20
     compliant JScript engine, and a new group of developers is stepping up=
     continue his work on the interpreter and turn it into a full compiler =
     Mono and .NET. If you are interested in joining, join the=20
     <a href=3D"http://lists.ximian.com/mailman/listinfo/mono-list">mono-li=

<p>  <h3>1.8 Jonathan Pryor has published his type-reflector.</h3></p>

<p>  Type-reflector is a program similar in spirit to the .NET ``TypeFinder=
     SDK Sample. It allows a regular expression (as understood by=20
     System.Text.RegularExpressions) to be used for finding types and a lot=
     more interesting options for making your life easier. You can find the=
     code at mcs/tools/type-reflector

<p> <h3>2. Meet the team. This week Daniel Morgan.</h3></p>
    The Mono team is integrated by contributors all over the world that are
    working really hard to get this project going further. In this section
    we will be meeting this people so we can know more about them and what
    they are doing.=20

    This week we have been talking to Daniel Morgan in the IRC. Daniel=20
    is the developer who has worked out most of the SQL providers in=20
    Mono. He is from South Carolina, USA and before joining the Mono Team
    he was an active hacker in the GNOME Database Project=20
    (<a href=3D"http://www.gnome-db.org">http://www.gnome-db.org</a>) and=20
    prior to that he was a database driven insurance applications developer=
    He enjoys programming on Mono, riding his motorcycle and reading and
    watching science-fiction. Let's see what he told us.

<h4>Interview with Daniel Morgan</h4>

<table border=3D1 width=3D"100%">
<b>MWN: So you are the Mono expert on DataBase Providers, don't you?, can=20
you tell us what can be done using the code you contributed?
<b>Daniel Morgan:</b> I'm no expert, just a willing contributor to System.D=
in Mono. Currently you can create database driven applications with GTK# or=
depending on your requirements, you have to various DBMS backends, includin=
MySQL, PostgreSQL, Microsoft SQL Server, Sybase, and SQL Lite. If you need =
to a database not listed, you can get access via the ODBC or OLE DB provide=
Both ASP.NET and GTK# have become useful for creating real world applicatio=
ns... =20
along with System.Data, you could start creating programs like SQL#, financ=
accouting, or other business applications. I know the Microsoft SQL Server =
probably the most stable provider there is... simply because its pure C#...=
 it does=20
not use any client libraries because there are no client libraries, it has =
dependencies other than Mono and access to a SQL Server database...
<b>MWN: As you are involved in the GNOME-DB Project how do you see the ADO.=
NET model=20
for the new application development?. Do you feel like having Mono's ADO.NE=
implementation will make Linux DB Access applications much easier to develo=
<b>Daniel Morgan:</b>
Yes, I am involved in the GNOME-DB project. GNOME-DB was designed to provid=
e an ADO=20
or OLE-DB like data access model for Linux and UNIX.  So, ADO.NET seems the=
way to go. Mono's ADO.NET will definitely make application development much=
however, this isn't the main reason for using it.  It allows the programmer=
 to concentrate=20
more on implementing the business requirements instead of spending more tim=
e on the=20
details of the language.
<b>MWN: did you find any mistakes in the design, do you think there are som=
e classes=20
or assemblies that might be changed in the SPEC?
<b>Daniel Morgan:</b>
There are a few mistakes in the design... as with the first version of any=20
complex design...  such as, all data providers should have inherited from t=
he same=20
database exception class. Creating generic connections and adapters are dif=
ficult, but=20
this has been helped by Brian Ritchie's ProviderFactory. Every database ven=
dor has=20
their own API for accessing their database. ADO.NET provides an abstract wa=
y to access=20
these databases via interfaces which must be implemented by a data provider=
: IDbConnection=20
for connecting to a database; IDbCommand for executing SQL commands; IDataR=
eader for=20
reading data from a result set, IDbDataAdapter for filling a DataSet or Dat=
IDataParameter for parameters
MWN: Could you give some advice for the Mono users about the Providers and =
their use?.=20
If you were to write a new application that uses databases through Mono, wh=
ich classes=20
would you use?, what would be your general method to achive that?.
<b>Daniel Morgan:</b>
System.Data isn't all about databases; it can be used for non-database data=
 too... you=20
could create a data provider which does not even connect to database for in=
stance, a=20
DataSet and XmlDataDocument can read and write XML. Ville Palo has been wor=
king on the=20
DataSet and XmlDataDocument and understands it better. Most database applic=
programmers are used to developing in a relational manner... tables having =
rows and=20
columns...while XML application programmers are used to developing in a hie=
tree manner...XmlDataDocument and DataSet bridge that gap.
MWN: For the people interested in contributing, which classes and tasks do =
you think=20
need more help?
<b>Daniel Morgan:</b>
All the classes need loving :) especially any that throw NotImplementedExce=
ptions or=20
has MonoTODO's DataSet needs work; Reggie Burnet, the developer of a 100% C=
# provider=20
for MySQL is interested in including his provider in Mono... last I've hear=
d, it works=20
with the lastest cvs Mono basically, just like all the other areas of Mono,=
needs lots of testing it actually works better on Linux.
MWN: Is there anything left you would like to say to the world and the Mono=
 Community in=20
<b>Daniel Morgan:</b>
Yes, even though Mono has a PostgreSQL and MySQL provider; they both use a =
native client=20
library which has its drawbacks. These drawbacks includes, depenedency prob=
lems, slower=20
performance compared to a 100% pure .NET provider, sometimes failure, such =
as, PostgreSQL=20
does not work in SQL# For GTK# on Windows. Npgsql is a 100% C# provider for=
 PostgreSQL and=20
works on Mono. The Npgsql developers have already approved it to be include=
d in Mono and=20
under X11.
<b>MWN:</b> Thanks Daniel for your time and your work. Best wishes for the =
new year.

<p> Daniel also provided us with a nice example of how to add database acce=
to your programs using Mono. Here is the code:

Mono MySQL Hello World Example
<pre class=3D"programlisting">

Log on to the MySQL client tool mysql:

DanielMorgan@DANPC ~
$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 3.23.51-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Change to a database:

mysql> use test
Database changed

Create a database table named hello_world_test with the columns hello_id an=
hello_id is the id to this table and hello_desc is an attribute that is a

mysql> create table hello_world_test (
    -> hello_id varchar(2),
    -> hello_desc text);
Query OK, 0 rows affected (0.01 sec)

Insert a row into the new table named hello_world_test
with hello_id set to 'HW'
and hello_desc set to 'Hello World'.

mysql> insert into hello_world_test (hello_id, hello_desc) values
('HW','Hello W
Query OK, 1 row affected (0.00 sec)

Verify the data in the table.

mysql> select * from hello_world_test;
| hello_id | hello_desc  |
| HW       | Hello World |
1 row in set (0.02 sec)

Now, create the SQL statement you will use in your C# program.

mysql> select hello_desc from hello_world_test where hello_id =3D 'HW';
| hello_desc  |
| Hello World |
1 row in set (0.02 sec)

// MySqlHelloWorld.cs
// On Windows, compile like:
//     mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe
MySqlHelloWorld.cs \
//          -lib:C:/cygwin/home/MyHome/mono/install/lib \
//          -r System.Data.dll -r Mono.Data.MySql.dll
// On Linux, compile like:
//    mcs MySqlHelloWorld.cs -r System.Data -r Mono.Data.MySql
//DanielMorgan@DANPC ~/mono/20021223/mcs/class/Mono.Data.MySql/Test
//$ mono f:/cygwin/home/DanielMorgan/mono/install/bin/mcs.exe
//    -r System.Data.dll -r Mono.Data.MySql.dll
// Compilation succeeded
//DanielMorgan@DANPC ~/mono/20021223/mcs/class/Mono.Data.MySql/Test
//$ mono MySqlHelloWorld.exe
//Result: Hello World
using System;
using System.Data;
using Mono.Data.MySql;

class MySqlHelloWorld {
        static void Main(string[] args) {
                string connectionString =3D "Database=3Dtest";
                string sql =3D
                        "SELECT hello_desc " +
                        "FROM hello_world_test " +
                        "WHERE hello_id =3D 'HW'";

                // connect
                IDbConnection dbcon =3D new MySqlConnection();
                // set the connection string
                dbcon.ConnectionString =3D connectionString;
                // open a connection to the database
                // create command
                IDbCommand dbcmd =3D dbcon.CreateCommand();
                // set the command's SQL
                dbcmd.CommandText =3D sql;
                // execute the SQL
                IDataReader reader =3D dbcmd.ExecuteReader();
                // read the first row in the result
                if(reader.Read()) {
                        // display the result
                        Console.WriteLine("Result: " + reader["hello_desc"]=
                else {
                        // display message row not found
                        Console.WriteLine("Row not found.");

                // clean up
                reader =3D null;
                dbcmd =3D null;
                dbcon =3D null;

<p> <h3>3. The Mono Spell.</h3></p>
<i>dietmar ignores papers comparing java with .net</i> Dietmar Maurer.</p><=
<i>If God meant us to use unicode, He would have put 16 bits in a byte.</i>=
 Marcus Urban.</p>

<p>  <h3>4. Mono Socials: Duncan does Tokyo.</h3></p>

<p>  The always_minded_to_help and Ximian Mono hacker Duncan spent some of=20
     his hollydays visiting the monkeys at Tokyo, as Atsushi Enomoto who is
     the maintainer of System.XML and Nick Drochak known mostly for his tes=
     although he contributes in lots of places. You can see the gallery=20
     <a href=3D"http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo"=

<p> <h3>5. CVS Activity.</h3></p>
<p>  This has been a bussy week. Here are the results.
     (*) Actually I am using the number of commits as measure, I will try t=
     get more accurate aproximations in the future. (Starting Jan 01th,
     till Jan 08th)

<p>  Authors: Total 23</p>

<p><table border=3D1>
     <tr><td>Alp Toker</td><td>4</td></tr>
     <tr><td>Atsushi Enomoto</td><td>6</td></tr>
     <tr><td>Daniel Lopez</td><td>9</td></tr>
     <tr><td>Dennis Hayes</td><td>1</td></tr>
     <tr><td>Dick Porter</td><td>2</td></tr>
     <tr><td>Dietmar Maurer</td><td>6</td></tr>
     <tr><td>Duncan Mak</td><td>17</td></tr>
     <tr><td>Gaurav Vaish</td><td>10</td></tr>
     <tr><td>Gonzalo Paniagua</td><td>47</td></tr>
     <tr><td>Jackson Harper</td><td>2</td></tr>
     <tr><td>Jaime Anguiano</td><td>5</td></tr>
     <tr><td>Jeroen Janssen</td><td>4</td></tr>
     <tr><td>Johannes Roith</td><td>51</td></tr>
     <tr><td>Jonathan Pryor</td><td>1</td></tr>
     <tr><td>Marco Ridoni</td><td>5</td></tr>
     <tr><td>Martin Baulig</td><td>210</td></tr>
     <tr><td>Martin Willemoes Hansen</td><td>9</td></tr>
     <tr><td>Miguel de Icaza</td><td>20</td></tr>
     <tr><td>Paolo Molaro</td><td>14</td></tr>
     <tr><td>Piers Haken</td><td>2</td></tr>
     <tr><td>Rachel Hestilow</td><td>4</td></tr>
     <tr><td>Sebastien Pouliot</td><td>7</td></tr>
     <tr><td>Ville Palo</td><td>7</td></tr>

  <table border=3D1>

<p> <h3>6. Mailing List Activity.</h3></p>

<p> A bad ass week for the mono-list but as a matter of fact most
    of the mails have gone around buggy setups and about what is
    Mono going to do with JScript.

<p>The Mono and Javascript thread has been really interesting.=20
   The main points:
     <li>About using the code Rhys Weatherley is doing, Mr.Weatherley=20
     said "the answers to the two obvious questions are "GPL plus=20
     linking exception, not X11" and "hosted in a neutral CVS, not Mono or=20
     <li>By the moment using Janet CVS works for Mono.</li>
     <li>The language that Microsoft has implemented is "almost" a strict=20
     superset of ECMAScript 3, i.e. they've implemented ECMAScript 3 except=
     for a few corner cases.
     <li>The plan is: have a Reflection.Emit backend, make the=20
     compiler and make the JScript compiler embeddable class.
     <li>The following mail is a good summary:=20
     <a href=3D"http://lists.ximian.com/archives/public/mono-list/2003-Janu=
     <li>Steve Newman said that Janet will be licensed under the X11 so it
     can be used in Mono. Janet is a Javascript interpreter that Steve has
     developed and it will be the base for the Mono's Javascript compiler.
<p> Please visit us at the homepage of the Mono Project:
<a href=3D"http://www.go-mono.org">http://www.go-mono.org</a></p>