Board index » Visual Studio » Theoretical Problem

Theoretical Problem

Visual Studio157
Hello,



I am creating an activex control which is tied to relational data. This

relational data will get 'rolled-up' into calculated data. This means that

I have to process a large amount of data from the relational source.



My question is this:



Would it be better to create a separate dll for this action? Should it

be an ActiveX dll? Should I then create a dll for each large process such

as data manipulation? What is the tradeoff?





Thanks in advance,



I know this is a large topic, but a quick rundown on my best options would

be great. I have created quite a few controls, but they were always large

controls with no called dlls (that I, myself created for that purpose,

anyway).



Andrew Mueller


-
 

Re:Theoretical Problem

Hi Andrew Mueller



Quote
Hello,



I am creating an activex control which is tied to relational data. This

relational data will get 'rolled-up' into calculated data. This means that

I have to process a large amount of data from the relational source.



My question is this:



Would it be better to create a separate dll for this action? Should it

be an ActiveX dll? Should I then create a dll for each large process such

as data manipulation? What is the tradeoff?

I say it is a good idea to split data display and the data model

(including the algorithms). That way you have a better chance to reuse

your code and a way better chance to test it.



This is especially true if you have a complex model.



If you split domain (calculation, rolling up the data, ..) from

presentation (GUI) you could even pre-calculate the data (for example

in an external 'Thread' (ActiveX Exe, name what you want).



The disadvantage is the aditional interface between model and

presentation (not neccesary a bad thing).





Jens

-

Re:Theoretical Problem

Thank you for the response. I will split up the design.



Is it best to bind with project reference to the dll?



Thank you,



Andrew Mueller





"Jens Neuhalfen" <JNeuhalfen@akkaya.de>wrote in message

Quote
Hi Andrew Mueller



>Hello,

>

>I am creating an activex control which is tied to relational data.

This

>relational data will get 'rolled-up' into calculated data. This means

that

>I have to process a large amount of data from the relational source.

>

>My question is this:

>

>Would it be better to create a separate dll for this action? Should

it

>be an ActiveX dll? Should I then create a dll for each large process

such

>as data manipulation? What is the tradeoff?

I say it is a good idea to split data display and the data model

(including the algorithms). That way you have a better chance to reuse

your code and a way better chance to test it.



This is especially true if you have a complex model.



If you split domain (calculation, rolling up the data, ..) from

presentation (GUI) you could even pre-calculate the data (for example

in an external 'Thread' (ActiveX Exe, name what you want).



The disadvantage is the aditional interface between model and

presentation (not neccesary a bad thing).





Jens





-

Re:Theoretical Problem

Hi Andrew,



Quote
Thank you for the response. I will split up the design.



Is it best to bind with project reference to the dll?





First: the visibility should be GUI -->Model and not no never ever

Model -->GUI (even Model <-->GUI is a bad thing). It makes live

easier. Trust me on that.



Second:

The answer is: it depends. Personally I favour the use of

typelibraries (IDL & midl to compile) and CreateObject over the

vb-binary-incompatibility settings with "New" (sorry for that rant,

but vb can make live a nightmare.).



I bet a lot of people think different so you are all right doing

either. For your control you have "no" other chance but to use plain

VB and the Project reference.



Jens



[snip]

-

Re:Theoretical Problem

Thank you. I will follow your advice. I had planned on using CreateObject

after I typed the last message, but thought I would await your response

before putting that clarification in. I typically prefer that as well for

many reasons.



Yes, the control will be dropped into a container which automatically

creates a project reference. Not too worried about that part of it.



Thanks again!



Andrew Mueller







"Jens Neuhalfen" <JNeuhalfen@akkaya.de>wrote in message

Quote
Hi Andrew,



>Thank you for the response. I will split up the design.

>

>Is it best to bind with project reference to the dll?

>



First: the visibility should be GUI -->Model and not no never ever

Model -->GUI (even Model <-->GUI is a bad thing). It makes live

easier. Trust me on that.



Second:

The answer is: it depends. Personally I favour the use of

typelibraries (IDL & midl to compile) and CreateObject over the

vb-binary-incompatibility settings with "New" (sorry for that rant,

but vb can make live a nightmare.).



I bet a lot of people think different so you are all right doing

either. For your control you have "no" other chance but to use plain

VB and the Project reference.



Jens



[snip]





-