May 11, 2005

C#, Mono, and Npgsql for PostgreSQL

From February 2004 --

Some of you may know that I'm now more
interested in C# than in Java for the same
reasons I was looking at Java: marketability
of skills and ubiquity of available knowledge.
C# also happens to be a great language, or
so I have heard, faster and more flexible on
a Windows PC than a JRE. Not that I know.

The devil is of course in C# being Windows-
centric, but so are 90% of desktops, and if
one really wants to run C# code atop OS X
or Linux it can be done with the free Mono
framework (a bit immature; wait for ver. 2).
If not Mono, VPC7 is a less-than-ideal but
workable fallback for running .NET apps.

C#, .NET, and SQL Server go together like
beer and salt, but SQL Server isn't the only
database option. I think that maybe I'll try
building .NET Windows front-ends to very
simple PostgreSQL databases hosted on
UNIX. A .NET Data Provider does for .NET
what JDBC does for Java, and Npgsql is a
data provider for PostgreSQL servers. See
http://gborg.postgresql.org/project/npgsql.

If the .NET client does all the connectivity
work using data providers like Npgsql for
abstracting access, then client and server
can remain independently tweakable. That
is, the same data can be also accessed via
PHP or Ruby, and clients can also access
other back-ends like Oracle or SQL Server.

If you are also interested in C# or just want
to heckle, feel free to ask/comment. I deny
being a stooge for M$oft, but resistance is
futile and your species will be assimilated.

-Brad

--------- example of C# with Npgsql ---------

// in C#
using System;
using System.Data;
using Npgsql;
public class Test
{
public static void Main(String[] args)
{
String connstring = "Server=192.168.0.1;User
Id=test;Password=pass;Database=Test";
NpgsqlConnection conn = new NpgsqlConnection(connstring);
conn.Open();
conn.Close();
}
}

Posted by tapli005 at 10:00 AM | Comments (5)

First look at MONO 1.2

From December 2004 --

Microsoft's .NET Framework attempts to simplify
and standardize many software components that
previously sucked up countless coding hours
and led to inconsistent and incompatible code.
.NET includes support for several dev languages.
Our current XPBASE04 image includes .NET 1.1,
and the RSS reader I most favor depends on it.

Included "assemblies" are chunks of free, prefab
.NET code you can use as is - or write your own -
all part of a huge object-oriented code hierarchy.
Many see the .NET Framework as Microsoft's
answer to Java - a controlled, standard runtime.

Microsoft open-sourced the core of .NET, and the
Ximian Corporation (now owned by Novell) is
using that core to build a compatible framework
for Linux and OS X. The experiment is maturing...

I have another correction for my email: I checked
www.mono-project.com/about/mono-roadmap.html
and saw that features I noted earlier are planned
for MONO 1.2 (not 2.0), including limited VB.NET
support. Q2/2005. MONO 1.2 also aims to include
ADO.NET 2.0 and ASP.NET 2.0 features, etc.

See that website for a longer list of the features
planned for MONO 1.2 and beyond, including
the System.Windows.Forms 1.1 assembly. Also
see notes on MonoDevelop, a MONO/C# IDE
for Linux and Mac OS X. To develop for C#
and .NET in Emacs, check http://davh.dk/script
or www.cybercom.net/~zbrad/DotNet/Emacs.

Posted by tapli005 at 9:58 AM | Comments (0)

Early interest in ASP in Dec 2004

I've begun to play with ASP.NET and Visual Basic.NET
a bit. Aside from their currently requiring Windows and
IIS, I'm pretty impressed so far. Not that I've done much
of anything yet, but the tools seem to make some things
easy. I have a Dummies book and one from MS Press.
I intend to keep playing with these as well as Ruby.

I guess it depends on whether one considers Windows
Server '03 a safe and worthy platform for web services
and/or how successfully Novell ports the .NET stuff to
Linux in subsidiary Ximian's MONO effort (March '05).
If that goes well, .NET will no longer be Windows-only.
MONO 1.0 already runs on Linux and OS X, bringing
the C# language. 2.0 is supposed to include VB.NET
and some binary compatibility with Windows (limits?).

No idea how or whether Novell will get around ASP's
requirement of IIS (in addition to the .NET framework).
If ASP.NET doesn't fly on Linux, it may still be possible
to use VB.NET with Apache 2 via the .NET framework.

Of course I still think Ruby or PHP + Apache + MySQL
or PostgreSQL is probably "tighter" as in fewer obvious
risks and lower demands of the server - not to mention
free and open-source. The only downside to the open-
source approach, in my rather uneducated opinion, is
that it may take more time to do anything interesting
with databases. Then again, Ruby on Rails may make
Ruby-based web projects almost as easy as VB.NET.

Some factors against using ASP.NET at Biomed are
that we already have the servers (Solaris) and skills
(Dan) to run open-source apps. ASP.NET would take
new skills, discipline to secure and support a Windows
2003 Server, and cash for hardware and OS license.
I dunno if the benefits of ASP.NET could ever justify
those costs, so for now I consider ASP.NET just a toy.

Posted by tapli005 at 9:52 AM | Comments (2)

December 4, 2004

Eric Celeste's Google Scholar link for UMN SFX

Download file

Posted by tapli005 at 3:54 AM | Comments (0)