running DWT with DDL

John Reimer terminal.node at gmail.com
Wed May 28 19:02:04 PDT 2008


Hello Tom,

> Perhaps a little background info might be useful. Frank had a few
> rather tricky requirements:
> 
> 1. There is a large library which should be shared across applications
> 2. There are plugins to the library
> 3. Applications must be able to derive classes from the ones in
> plugins
> 4. Plugin implementations may be changed post-deployment. In other
> words, the app may not know the source or binary code of the plugins
> in
> advance.
> 1. itself is a tough issue on Windows, as DLLs are not D - friendly.
> 2, 3, and 4 mean that the application has classes whose code parts are
> not known until the plugins are loaded. While it might be solved with
> some fancy design patterns, it would be nice if the setup worked out
> of
> the box without any hacking around.
> But how can we have an executable that derives from classes whose
> implementation is not known - it's in .di files? As far as I know, one
> can't have incomplete executables on Windows or Linux. (executables
> with unresolved symbols).
> 
> Here's where DDL steps in. There are perhaps more solutions, but we've
> employed a version where there's a 'host' executable that loads the
> application, the lib (and potentially the plugins) dynamically. The
> host links them all together using DDL and then starts the app. As a
> result, we only have one executable (and as Frank said, it can be
> shared across apps) and lots of libs that are loaded thru DDL. As libs
> may be incomplete, all problems are solved right away.
> 


This is great news!  Tom and Frank, thanks for experimenting with this.

I'm looking forward to seeing this option applied creatively to dwt projects 
(and other D projects).  I can see that this sort of plugin architecture 
could prove quite useful for larger dwt apps like poseidon or even application 
"systems" like eclipse (no D equivalent yet).  This may not necessarily be 
useful for small dwt apps, but I'm sure there are a host of opportunities 
for creative use.  Perhaps from OS kernels to high-level plugin systems.

Great work!

-JJR




More information about the Digitalmars-d-dwt mailing list