469,647 Members | 1,769 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,647 developers. It's quick & easy.

Wrapping several DLLs in one "virtual" dll?

Hi,

I'm programming some classes in order to be able to import different
text formats (TXT, RTF, HTML, ...) to my own format called RUF.

I've defined one Solution within several Projects, each one is focused
in one specific format, includes from 5 to 15 classes and produces one
DLL.

Solution GATEWAY:
- Project TXTClasses: [5 classes] -> TXTClasses.dll
- Project RTFClasses: [15 classes] -> RTFClasses.dll
- Project HTMLClasses: [12 classes] -> HTMLClasses.dll
- Project Gateway: [32 classes?] -> Gateway.dll ?

The problem is that although my current "big application" needs *all*
the classes I dont want to put all the classes in just one Project,
mainly due to two reasons:

a) to have a Solution with only one Project with 30-50 classes in it is
a big mess.

b) in future I will develop other small programs that will need to
acces to only one format (for example only to the RTFClasses.dll)

The questions are:

1) Can I build a "virtual" Gatewal.dll that wrappes all reminder dlls?
2) How can I solve this requirements? are they too odd?

thanks,

Francesc

Nov 24 '05 #1
5 3123
Hi
Might have got the wrong end of the stick, but why do you need to
bundle your dlls in on super dll. Just reference each dll needed in you
application.

OK you might have to include 4 or 5 references, but so what. In your
smaller projects you may not require all the functionality that would
be in your super dll, so this might actually save you adding unrequited
stuff. Also for future maintenance, having multiple dlls, may allow you
to swap and change any one of these for a new version.
regards

Nov 24 '05 #2
"Phil Mc" schrieb:
Hi
Might have got the wrong end of the stick, but why do you need to
bundle your dlls in on super dll. Just reference each dll needed in
you application.

OK you might have to include 4 or 5 references, but so what. In your
smaller projects you may not require all the functionality that would
be in your super dll, so this might actually save you adding
unrequited stuff. Also for future maintenance, having multiple dlls,
may allow you to swap and change any one of these for a new version.
regards


That's correct, as adding asssemblies is not something that we do 25
times a day :-)

If you have a common interface or base class for the conversion task, I
would recommend to package those classes into a seperate DLL. If you
implement an AbstractFactory, or use some "Depenency Injection
Container" library (http://tinyurl.com/444k5, http://tinyurl.com/c2swr)
you can reach your goal of seperation all the code and minimize the
discovery of the concrete objects.

HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40@*NO*SPAM*gmx.net
Nov 24 '05 #3
a) to have a Solution with only one Project with 30-50 classes in it is
a big mess.
Really? A project of that size is pretty small to me.

b) in future I will develop other small programs that will need to
acces to only one format (for example only to the RTFClasses.dll)
Would it be a problem if they loaded a single DLL with support for
other formats?

1) Can I build a "virtual" Gatewal.dll that wrappes all reminder dlls?


There's no such thing as a virtual DLL. But you can merge multiple
assemblies to one with tools like these

http://research.microsoft.com/~mbarnett/ILMerge.aspx
http://www.gotdotnet.com/community/u...x?query=ILLINK
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 24 '05 #4
Hello,

How about looking into the new provider model of .net 2.0? That way you can
very, very easily create dynamic references to only the converters you need
by just declaring them in the web.config, and maybe create a factory to give
you an instance of the correct converter as needed....
Morten
"Francesc" <fb*******@cogitoergosum.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
Hi,

I'm programming some classes in order to be able to import different
text formats (TXT, RTF, HTML, ...) to my own format called RUF.

I've defined one Solution within several Projects, each one is focused
in one specific format, includes from 5 to 15 classes and produces one
DLL.

Solution GATEWAY:
- Project TXTClasses: [5 classes] -> TXTClasses.dll
- Project RTFClasses: [15 classes] -> RTFClasses.dll
- Project HTMLClasses: [12 classes] -> HTMLClasses.dll
- Project Gateway: [32 classes?] -> Gateway.dll ?

The problem is that although my current "big application" needs *all*
the classes I dont want to put all the classes in just one Project,
mainly due to two reasons:

a) to have a Solution with only one Project with 30-50 classes in it is
a big mess.

b) in future I will develop other small programs that will need to
acces to only one format (for example only to the RTFClasses.dll)

The questions are:

1) Can I build a "virtual" Gatewal.dll that wrappes all reminder dlls?
2) How can I solve this requirements? are they too odd?

thanks,

Francesc

Nov 25 '05 #5
Hi,

Thanks for your replies and for your ideas. I am quite new to C# and
some of your suggestions are to hard to implement and other even to
understand, then I will follow Phil and Andreas suggestion and their
"modularity" way, as they said adding individual references is not too
much work.

The only question that stills annoys to me is that if I want to
"protect" the DLLs with some registered license feature it would be
easier to pack all them in just one DLL ... but I think that given my
unknowledge on the subject I should not think about so "tiny details".

I'll peek this links to learn a bit more, thanks,

Francesc

Nov 28 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by mshetty | last post: by
4 posts views Thread by Jon Shemitz | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.