New to .NET and writing a C# ASP.Net application that needs to access
a COM+ VB dll (which I was not involved in writing). The COM+ VB dll
returns a VB Collection. I use VBA.CollectionClass to define my
return object. Everything works great but the question is (coming
from a C++ person): what exactly is this VBA.Collection? Is it going
to slow down the app. when we are in production? Would it better
faster to add a method to the COM+ VB dll that returns an XML string
w/ the data instead of a VB collection.
Thanks, Beth 8 2617
I would not have any concerns about VB's Collection performance, especially
compared to the overhead of having data converted to text and the text being
sent/serialized...
"elizabeth" <ez******@hotmail.com> wrote in message
news:78**************************@posting.google.c om... New to .NET and writing a C# ASP.Net application that needs to access a COM+ VB dll (which I was not involved in writing). The COM+ VB dll returns a VB Collection. I use VBA.CollectionClass to define my return object. Everything works great but the question is (coming from a C++ person): what exactly is this VBA.Collection? Is it going to slow down the app. when we are in production? Would it better faster to add a method to the COM+ VB dll that returns an XML string w/ the data instead of a VB collection.
Thanks, Beth
Definitely. XML string will faster. Less overhead.
The idea of returning objects from VB DLL is not good at all.
"elizabeth" <ez******@hotmail.com> wrote in message
news:78**************************@posting.google.c om... New to .NET and writing a C# ASP.Net application that needs to access a COM+ VB dll (which I was not involved in writing). The COM+ VB dll returns a VB Collection. I use VBA.CollectionClass to define my return object. Everything works great but the question is (coming from a C++ person): what exactly is this VBA.Collection? Is it going to slow down the app. when we are in production? Would it better faster to add a method to the COM+ VB dll that returns an XML string w/ the data instead of a VB collection.
Thanks, Beth
> The idea of returning objects from VB DLL is not good at all.
Why is that? I would agree that it _might_ be a bad idea in _certain
configurations_, but usually it should work just fine.
"codewriter" <co**************@yahoo.com> wrote in message
news:Hg*******************@news20.bellglobal.com.. . Definitely. XML string will faster. Less overhead. The idea of returning objects from VB DLL is not good at all.
"elizabeth" <ez******@hotmail.com> wrote in message news:78**************************@posting.google.c om... New to .NET and writing a C# ASP.Net application that needs to access a COM+ VB dll (which I was not involved in writing). The COM+ VB dll returns a VB Collection. I use VBA.CollectionClass to define my return object. Everything works great but the question is (coming from a C++ person): what exactly is this VBA.Collection? Is it going to slow down the app. when we are in production? Would it better faster to add a method to the COM+ VB dll that returns an XML string w/ the data instead of a VB collection.
Thanks, Beth
That exactly what I mean. Marshalling of a collection should outperform your
manual process of converting stuff into XML / sending it back to the caller
(which is in a sense marshalling as well) / converting the XML back to
"normal" data.
"codewriter" <co**************@yahoo.com> wrote in message
news:Hx*******************@news20.bellglobal.com.. . It will work, the problem is performance. Think about marshaling.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:Ow**************@TK2MSFTNGP10.phx.gbl... The idea of returning objects from VB DLL is not good at all. Why is that? I would agree that it _might_ be a bad idea in _certain configurations_, but usually it should work just fine.
"codewriter" <co**************@yahoo.com> wrote in message news:Hg*******************@news20.bellglobal.com.. . Definitely. XML string will faster. Less overhead. The idea of returning objects from VB DLL is not good at all.
"elizabeth" <ez******@hotmail.com> wrote in message news:78**************************@posting.google.c om... > New to .NET and writing a C# ASP.Net application that needs to
access > a COM+ VB dll (which I was not involved in writing). The COM+ VB
dll > returns a VB Collection. I use VBA.CollectionClass to define my > return object. Everything works great but the question is (coming > from a C++ person): what exactly is this VBA.Collection? Is it
going > to slow down the app. when we are in production? Would it better > faster to add a method to the COM+ VB dll that returns an XML string > w/ the data instead of a VB collection. > > Thanks, Beth
I seriously doubt it. We are talking about VB collection here.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... That exactly what I mean. Marshalling of a collection should outperform
your manual process of converting stuff into XML / sending it back to the
caller (which is in a sense marshalling as well) / converting the XML back to "normal" data.
"codewriter" <co**************@yahoo.com> wrote in message news:Hx*******************@news20.bellglobal.com.. . It will work, the problem is performance. Think about marshaling.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:Ow**************@TK2MSFTNGP10.phx.gbl... > The idea of returning objects from VB DLL is not good at all. Why is that? I would agree that it _might_ be a bad idea in _certain configurations_, but usually it should work just fine.
"codewriter" <co**************@yahoo.com> wrote in message news:Hg*******************@news20.bellglobal.com.. . > Definitely. XML string will faster. Less overhead. > The idea of returning objects from VB DLL is not good at all. > > "elizabeth" <ez******@hotmail.com> wrote in message > news:78**************************@posting.google.c om... > > New to .NET and writing a C# ASP.Net application that needs to access > > a COM+ VB dll (which I was not involved in writing). The COM+ VB dll > > returns a VB Collection. I use VBA.CollectionClass to define my > > return object. Everything works great but the question is (coming > > from a C++ person): what exactly is this VBA.Collection? Is it going > > to slow down the app. when we are in production? Would it better > > faster to add a method to the COM+ VB dll that returns an XML
string > > w/ the data instead of a VB collection. > > > > Thanks, Beth > >
I'd say we're talking more about a COM object here.
"codewriter" <co**************@yahoo.com> wrote in message
news:le*******************@news20.bellglobal.com.. . I seriously doubt it. We are talking about VB collection here.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... That exactly what I mean. Marshalling of a collection should outperform your manual process of converting stuff into XML / sending it back to the caller (which is in a sense marshalling as well) / converting the XML back to "normal" data.
"codewriter" <co**************@yahoo.com> wrote in message news:Hx*******************@news20.bellglobal.com.. . It will work, the problem is performance. Think about marshaling.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:Ow**************@TK2MSFTNGP10.phx.gbl... > > The idea of returning objects from VB DLL is not good at all. > Why is that? I would agree that it _might_ be a bad idea in _certain > configurations_, but usually it should work just fine. > > > "codewriter" <co**************@yahoo.com> wrote in message > news:Hg*******************@news20.bellglobal.com.. . > > Definitely. XML string will faster. Less overhead. > > The idea of returning objects from VB DLL is not good at all. > > > > "elizabeth" <ez******@hotmail.com> wrote in message > > news:78**************************@posting.google.c om... > > > New to .NET and writing a C# ASP.Net application that needs to access > > > a COM+ VB dll (which I was not involved in writing). The COM+
VB dll > > > returns a VB Collection. I use VBA.CollectionClass to define
my > > > return object. Everything works great but the question is
(coming > > > from a C++ person): what exactly is this VBA.Collection? Is it going > > > to slow down the app. when we are in production? Would it
better > > > faster to add a method to the COM+ VB dll that returns an XML
string > > > w/ the data instead of a VB collection. > > > > > > Thanks, Beth > > > > > >
COM does not marshal objects, it marshals object references.
Therefore, COM does not move objects across the process boundaries.
Universal Marshaler creates a Proxy and a Stub.
Therefore, your statement:
"Marshalling of a collection should outperform your
manual process of converting stuff into XML / sending it back to the caller
(which is in a sense marshalling as well) / converting the XML back to
"normal" data."
does not make any sense.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... That exactly what I mean. Marshalling of a collection should outperform
your manual process of converting stuff into XML / sending it back to the
caller (which is in a sense marshalling as well) / converting the XML back to "normal" data.
"codewriter" <co**************@yahoo.com> wrote in message news:Hx*******************@news20.bellglobal.com.. . It will work, the problem is performance. Think about marshaling.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:Ow**************@TK2MSFTNGP10.phx.gbl... > The idea of returning objects from VB DLL is not good at all. Why is that? I would agree that it _might_ be a bad idea in _certain configurations_, but usually it should work just fine.
"codewriter" <co**************@yahoo.com> wrote in message news:Hg*******************@news20.bellglobal.com.. . > Definitely. XML string will faster. Less overhead. > The idea of returning objects from VB DLL is not good at all. > > "elizabeth" <ez******@hotmail.com> wrote in message > news:78**************************@posting.google.c om... > > New to .NET and writing a C# ASP.Net application that needs to access > > a COM+ VB dll (which I was not involved in writing). The COM+ VB dll > > returns a VB Collection. I use VBA.CollectionClass to define my > > return object. Everything works great but the question is (coming > > from a C++ person): what exactly is this VBA.Collection? Is it going > > to slow down the app. when we are in production? Would it better > > faster to add a method to the COM+ VB dll that returns an XML
string > > w/ the data instead of a VB collection. > > > > Thanks, Beth > >
"codewriter" <co**************@yahoo.com> wrote in message
news:ZU*******************@news20.bellglobal.com.. . It definitely shows that you have very faint idea about COM marshaling.
*yawn*
Marshaling is a data transmission between processes.
In fact marshaling is "The act of passing the function calls and parameters
of an OLE object across process boundaries." according to MSDN. I would add
that in COM marshaling also occurs between apartments.
This means that your calling object lives in one process and the caller in another.
See my previous remark....
If you return a collection from a calling object and then use it in your caller, let's
say in a For Each loop, you will be marshaling your data every time you access the collection.
Why should the caller and the callee be in different processes? We're
talking about ASP page and COM+ application... A COM+ application can be set
up to run in-proc.
Let's assume that you are using collection of objects each of which has four properties, and you have 50 objects in your collection. This will mean that in your For Each loop you will be making at least 200 trips across the process boundaries in case you want to retrieve all the properties. That was the whole purpose of creating serializers in .NET.
Alright. I see the light. Now we know the purpose of serializers in .NET,
people. :)
Seriously, nothing would hold you from implementing custom marshaling in
COM.... (Oh yeah, it may not be easy...)
You serialize your object, let's say in XML string, and pass it to the caller. It is
going to be only one trip. You should buy "Programming Distributed Applications with COM and Visual Basic 6.0" fro Microsoft Press. It will help.
I prefer Don Box's books, thank you. Have a good one.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:uL**************@TK2MSFTNGP10.phx.gbl... I'd say we're talking more about a COM object here.
"codewriter" <co**************@yahoo.com> wrote in message news:le*******************@news20.bellglobal.com.. . I seriously doubt it. We are talking about VB collection here.
"Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... > That exactly what I mean. Marshalling of a collection should outperform your > manual process of converting stuff into XML / sending it back to the caller > (which is in a sense marshalling as well) / converting the XML back
to > "normal" data. > > "codewriter" <co**************@yahoo.com> wrote in message > news:Hx*******************@news20.bellglobal.com.. . > > It will work, the problem is performance. Think about marshaling. > > > > "Val Savvateev" <vs********@meridium.com_NO_SPAM> wrote in message > > news:Ow**************@TK2MSFTNGP10.phx.gbl... > > > > The idea of returning objects from VB DLL is not good at all. > > > Why is that? I would agree that it _might_ be a bad idea in _certain > > > configurations_, but usually it should work just fine. > > > > > > > > > "codewriter" <co**************@yahoo.com> wrote in message > > > news:Hg*******************@news20.bellglobal.com.. . > > > > Definitely. XML string will faster. Less overhead. > > > > The idea of returning objects from VB DLL is not good at all. > > > > > > > > "elizabeth" <ez******@hotmail.com> wrote in message > > > > news:78**************************@posting.google.c om... > > > > > New to .NET and writing a C# ASP.Net application that needs
to > access > > > > > a COM+ VB dll (which I was not involved in writing). The
COM+ VB > dll > > > > > returns a VB Collection. I use VBA.CollectionClass to
define my > > > > > return object. Everything works great but the question is (coming > > > > > from a C++ person): what exactly is this VBA.Collection? Is it > going > > > > > to slow down the app. when we are in production? Would it
better > > > > > faster to add a method to the COM+ VB dll that returns an
XML string > > > > > w/ the data instead of a VB collection. > > > > > > > > > > Thanks, Beth > > > > > > > > > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Wandy Tang |
last post by:
Dear All,
How to pass a collection from a VB Component to an ASP page? I have no clue
the syntax of all.
Many Thanks.
Regards,
Wandy Tang
|
by: Ieuan |
last post by:
I'm currently having great problems getting information from a
VBA.CollectionClass.
I have a .NET webpage that has a reference to a dll that returns many
VBA.CollectionClasses. I'm able to call...
|
by: Ieuan |
last post by:
Hello all and Happy New Year,
I've been having this problem for some time and thought I'd try to see
if anyone else out there has had the same problem or can give a little
help.
I'm using a...
|
by: MT |
last post by:
I have a project that uses VC++ 7.0 with a class that implements
ICollection. I have the following methods in the class:
void ICollection::CopyTo(Array * myArr, int index);
IEnumerator *...
|
by: Rob |
last post by:
Hi,
Is there a way to access the session state or application
state of a running asp.net side from another program running
on the server?
Are papers etc. available on this? All help and hints...
|
by: Marina |
last post by:
Hi,
Let's say I have 2 classes, one of which is inheriting from the other.
I also have a generic class.
When I declare an instance of the generic class, I want to be able to cast a
generic...
|
by: **Developer** |
last post by:
When I get the image from the file the file remains locked so the Delete
fails with a "used by another process"
So I tried using a clone and disposing the obtained image.
But that didn't fix...
|
by: Franky |
last post by:
I have a project containing a class and it works OK.
However, when I copy the class and paste it into my library I get and error.
Do you know what might cause that?
THANKS
Something = New...
|
by: saheli |
last post by:
In my C# project i call a VB 6.0 .dll which in turn returns
a load of information. Most of this information is readable. However,
some of the information returned is of type VBA.CollectionClass.
...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |