Skip to main content
gamedev.net
🔒 Locked

Modularizing programs into DLLs - avoiding circular dependencies.

Started by nsto119 Sep 6, 2006 at 12:40 AM 1 replies 500+ views
Original Post
nsto119
nsto119
So, in the past I've never really felt the need to modularize my program into DLLs - I had set requirements that didn't change, so i didn't feel like wasting the effort. My latest program has different requirements, and I figure that since I do so much graphics programming, it'd be in my best interest to make something that's easily reusable and upgradable without too much code copying. Being that I've never done anything like this, I'd really like to hear the best way to have so many DLLs without any corcular dependencies. I've spent all of... 30 minutes thinking of a solution, and this is what I came up with: http://img118.imageshack.us/my.php?image=engra1.jpg Am I way off base here? If I am, I'll attribute it to the fact that I just had 4 teeth pulled and am still a bit loopy from the anisthetitc.
NotAYakk
NotAYakk
What interface(s) does interface.dll export?

How does interface.dll get the implemenation of the interfaces it exports?
nsto119
nsto119
Interface.dll would export an instance of the IEngine (or whatever you'd like to call it) interface, which would be implemented by an Engine class in the executable.

I'm using C#, and the plan was to have interface.dll be the only dll directly refrenced by any assembly. all other DLLs would be loaded by the executable dynamically.

[Edited by - nsto119 on September 6, 2006 7:36:42 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.