[Mono-list] stupid extensions (dll/exe) question

Met met@uberstats.com
Thu, 18 Mar 2004 19:13:53 -0500


Hello,

On Thu, 2004-03-18 at 18:34, gabor wrote:
> is it needed/recommended to use the standard windows extensions?
> 
> i don't really understand the details,but are they used so that it is
> possible to move them to windows and still use them?
> 
> i can kind of understand it, but it feels a little
> alien/different/inconvenient to have libs as dll instead of .so and so
> on.
> 
> so what's the recommended naming practice when developing mono apps?

I'm certainly not speaking _for_ Mono, but rather from my own views and
experiences....

A Mono executable or .dll is NOT a traditional binary or shared object
(.so) in structure or theory to a C/C++ application.  You need the mono
runtime to execute/understand them.  So in one way the naming convention
is for people, so that they can visually see and understand what they're
dealing with.  It's also so that people (silly weird people) don't try
to link a non Mono application against a Mono library.  

To make it easier for yourself and for your users you can/should create
shell scripts like the Mono project does to launch applications.  For
example, when you run mcs from the command line your launching a shell
script that tells the mono runtime to execute the mcs.exe.  So in a
sense their is no _real_ "mcs" binary.  You should do the same for your
programs so that a normal user can easily execute that application
without _having_ to know the difference. Executable's should reflect the
application name with a .exe at the end.  Nothing complicated. The shell
script should be the same, minus the .exe (weird but that's what
everyone does for simplicity, while keeping the truth of the application
type if you look for it - like Python programs).  

Libraries (.dlls) generally speaking all seem to represent their
namespace (or lowest level namespace in that collection of code).  So a
dll should generally only contain 1 root level namespace with as many
children as you see fit.

   Mono.Test.Child1
   Mono.Test.Child2
   Mono.Test.Child3

If these were the namespaces belonging to a .dll then it should be
called Mono.Test.dll.  But if you add a namespace like "Mono.Other" then
you should probably call it Mono.dll.  Size and function of the
namespaces dictate the need for seperate distinct libraries.

This is my understanding and what I use for my projects.  So hopefully
it makes sense and is helpful.

~ Matthew

P.S. The .exe/.dll versus .z/.xy are probably for compatibility (future
users and other systems).

P.P.S. This is probably more than you wanted ;-)