I have an order processing application with many features.
I want to be able to put some features in external and configureable
DLLs.
The main application has to pass an order object (and possibly some
other objects) to the external dll.
I have designed a base class with just interfaces on which the real
dlls base. The main application has a reference to this base class.
The external dlls (and the base class) need a reference to the main
application so it can properly use the classes that are passed from
the main application to the external dlls.
Since the main app has a reference to the external dlls and the
external dlls have a reference to the main app this looks to me like
circular reference.
Can I get into trouble with this design? Is it better to move all the
classes to a separate dll and reference this dll from the main
application and the external dll?
Any comments welcome
Tosch 4 1345
I bet you already answer the question. Only set reference to dll(s).
chanmm
"Tosch" <to**********@s wissonline.ch> wrote in message
news:7s******** *************** *********@4ax.c om... I have an order processing application with many features. I want to be able to put some features in external and configureable DLLs. The main application has to pass an order object (and possibly some other objects) to the external dll.
I have designed a base class with just interfaces on which the real dlls base. The main application has a reference to this base class. The external dlls (and the base class) need a reference to the main application so it can properly use the classes that are passed from the main application to the external dlls.
Since the main app has a reference to the external dlls and the external dlls have a reference to the main app this looks to me like circular reference.
Can I get into trouble with this design? Is it better to move all the classes to a separate dll and reference this dll from the main application and the external dll?
Any comments welcome
Tosch
It would be a circular reference.
Assuming the following assumptions are correct then the subsequent
suggestion could be of use to you:
1) You are using the Base class as a means to expose a limited interface to
your main application.
2) Your Order object is used BY your external dll, and your Order object
does not need a reference to
your external DLL.
Suggestion:
1) Take your Order Objects out of the Main App and put them in Order.dll
2) Add Reference to Order.dll in Main App
3) Add Reference to Order.dll in your existing 'external' dll
= No Circular References.
Also if the Base Class is just an interface then consider creating an
Interface and using Implements in your
external DLL Classes.
Hope this helps some
Neil
"Tosch" <to**********@s wissonline.ch> wrote in message
news:7s******** *************** *********@4ax.c om... I have an order processing application with many features. I want to be able to put some features in external and configureable DLLs. The main application has to pass an order object (and possibly some other objects) to the external dll.
I have designed a base class with just interfaces on which the real dlls base. The main application has a reference to this base class. The external dlls (and the base class) need a reference to the main application so it can properly use the classes that are passed from the main application to the external dlls.
Since the main app has a reference to the external dlls and the external dlls have a reference to the main app this looks to me like circular reference.
Can I get into trouble with this design? Is it better to move all the classes to a separate dll and reference this dll from the main application and the external dll?
Any comments welcome
Tosch
Neil,
thanks for your comments.
The base class is indeed just an interface and the 'real' external
DLLs implement that interface.
The way I have designed it now (with circular reference), it does
acutally work, except for a warning when compiling. But it just
doesn't feel right.
I will put the order object and any objects that I pass between the
main application and the external DLLs in a separate DLL, just seams
cleaner to me too.
Tosch
On Thu, 29 Jul 2004 17:29:39 +0000 (UTC), "Neil Woodvine"
<nR************ ****@btEinternM et.cEom> wrote: It would be a circular reference.
Assuming the following assumptions are correct then the subsequent suggestion could be of use to you: 1) You are using the Base class as a means to expose a limited interface to your main application. 2) Your Order object is used BY your external dll, and your Order object does not need a reference to your external DLL.
Suggestion: 1) Take your Order Objects out of the Main App and put them in Order.dll 2) Add Reference to Order.dll in Main App 3) Add Reference to Order.dll in your existing 'external' dll
= No Circular References.
Also if the Base Class is just an interface then consider creating an Interface and using Implements in your external DLL Classes.
Hope this helps some Neil
"Tosch" <to**********@s wissonline.ch> wrote in message news:7s******* *************** **********@4ax. com... I have an order processing application with many features. I want to be able to put some features in external and configureable DLLs. The main application has to pass an order object (and possibly some other objects) to the external dll.
I have designed a base class with just interfaces on which the real dlls base. The main application has a reference to this base class. The external dlls (and the base class) need a reference to the main application so it can properly use the classes that are passed from the main application to the external dlls.
Since the main app has a reference to the external dlls and the external dlls have a reference to the main app this looks to me like circular reference.
Can I get into trouble with this design? Is it better to move all the classes to a separate dll and reference this dll from the main application and the external dll?
Any comments welcome
Tosch
Tosch,
FYI, your app will work fine with circular references ... for a while. With
circular references (A>refs>B>refs> A) even after your app appears to have
closed down, the objects will remain alive in memory (that cannot be
accessed again) until you restart your machine.
This is a memory leak.
Therefore, if you use your app multiple times without restarting you'll
eventually use up all your memory.
Try adding some Logging code to your Class_Finalize method and you'll see
the difference between closing your app with circular references and closing
your app with non-circular references.
Cheers,
Neil
"Tosch" <to**********@s wissonline.ch> wrote in message
news:4l******** *************** *********@4ax.c om... Neil, thanks for your comments. The base class is indeed just an interface and the 'real' external DLLs implement that interface. The way I have designed it now (with circular reference), it does acutally work, except for a warning when compiling. But it just doesn't feel right. I will put the order object and any objects that I pass between the main application and the external DLLs in a separate DLL, just seams cleaner to me too.
Tosch On Thu, 29 Jul 2004 17:29:39 +0000 (UTC), "Neil Woodvine" <nR************ ****@btEinternM et.cEom> wrote:
It would be a circular reference.
Assuming the following assumptions are correct then the subsequent suggestion could be of use to you: 1) You are using the Base class as a means to expose a limited interface
toyour main application. 2) Your Order object is used BY your external dll, and your Order object does not need a reference to your external DLL.
Suggestion: 1) Take your Order Objects out of the Main App and put them in Order.dll 2) Add Reference to Order.dll in Main App 3) Add Reference to Order.dll in your existing 'external' dll
= No Circular References.
Also if the Base Class is just an interface then consider creating an Interface and using Implements in your external DLL Classes.
Hope this helps some Neil
"Tosch" <to**********@s wissonline.ch> wrote in message news:7s******* *************** **********@4ax. com... I have an order processing application with many features. I want to be able to put some features in external and configureable DLLs. The main application has to pass an order object (and possibly some other objects) to the external dll.
I have designed a base class with just interfaces on which the real dlls base. The main application has a reference to this base class. The external dlls (and the base class) need a reference to the main application so it can properly use the classes that are passed from the main application to the external dlls.
Since the main app has a reference to the external dlls and the external dlls have a reference to the main app this looks to me like circular reference.
Can I get into trouble with this design? Is it better to move all the classes to a separate dll and reference this dll from the main application and the external dll?
Any comments welcome
Tosch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrea Griffini |
last post by:
I did it.
I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.
For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
|
by: Paul Stanial |
last post by:
How viable is it to use MS Access as a front end (via ODBC) to a SQL Server
2000 database?
The users would access via the internet using a netgear vpn setup.
Thanks,
Paul S
|
by: John Morgan |
last post by:
Though I have designed and implemented a number of large reasonably
well received web sites I do not consider myself a graphics designer
I am now for the first time going to work with a graphics designer. I
notice that in the draft design the idea will be that many 'pages'
will in fact be pdf files. I suppose I exaggerate slightly but the
site could turn out to be a series of 'contents'pages comprising links
to pdf files which are for...
|
by: Tosch |
last post by:
I have an order processing application with many features.
I want to be able to put some features in external and configureable
DLLs.
The main application has to pass an order object (and possibly some
other objects) to the external dll.
I have designed a base class with just interfaces on which the real
dlls base. The main application has a reference to this base class.
The external dlls (and the base class) need a reference to the...
|
by: paul.drummond |
last post by:
Hi all,
I am new to whole idea of "web services" and architectures such as .NET
and J2EE so please bare with me. I am trying to research as much as
possible before asking silly questions but there is so much out there!
I need to start somewhere!!!
My question is, when developing local non-web based applications, is
SOAP still the standard way to communicate between applications in the
..NET world?
| |
by: David Williams |
last post by:
Hi Guys, I have a couple of problems. The first is (I believe) a simple
syntactic problem you can probably solve quite easily. The second is a
design style problem which might be more tricky...
So, I have a class with a couple of integers. I provide a couple of
functions to operate on those integers (add, subtract) and the function
to be called is chosen via a function pointer. Like so:
01: #include <iostream>
02:
|
by: A_M_IS |
last post by:
Dear valuable experts,
I truly hope than You can suggest for me Your ideas how to resolve
design.
I developing relative small Access VB tool, for single user use only.
Access version 2003, but db saved for compatibility as ver. 2000.
Basic structure of this tool is dependent from my house departments
structure.
Each department owes their own table, where they can write inputs
necessary and dependent for annual budget analysis and...
|
by: YellowFin Announcements |
last post by:
Introduction
Usability and relevance have been identified as the major factors
preventing mass adoption of
Business Intelligence applications. What we have today are traditional
BI tools that don't work
nearly as well as they should, even for analysts and power users. The
reason they haven't
reached the masses is because most of the tools are so difficult to use
and reveal so little
|
by: Phlip |
last post by:
1230987za wrote:
Kanze is a classically-trained "unit tester". In some circles "unit" is a QA
concept - specifically, if a test fails, you only need to inspect one unit.
So "units" are "things which are clearly delimited and accessible to
inspection". That should map onto C++ classes - specifically due to
overlapping requirements. C++ classes _should_ be "things which are clearly
delimited and accessible to inspection". Yet...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |