473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VB.NET object "bloating" and WCF


VB.NET object "bloating" and WCF.
//quote from web page
This can result in the following undesirable situations:
a.. You end up serializing objects that you didn't expect, resulting in a
larger stream.
b.. If the object handling the events is not Serializable, then the
serialization process will throw an exception.
The root of the problem is the fact that you cannot apply the
<NonSerializedattribute to events in VB (you can in C# by using the Field:
modifier).
//end quote
from
http://www.codeproject.com/vb/net/se...evbclasses.asp


Does anyone know if this VB.NET object "bloating" (where it serializes more
than it has to) is addressed in 2.0?

The reason I am asking is that I want to go to a WCF architecture, but some
of my back end business objects are already written in vb.net.

I need to know if I need to pay the piper now and translate them to C# to
avoid this issue.

My assumptions are that because WCF relies so heavily on serialization, I
feel this is a big gotcha which could happen.

Anybody have an idea that in VB.net 2.0 if this can be a big WCF gotcha? Or
am I barking up the wrong tree?

Thanks

Jun 11 '07 #1
2 1744
If you use [DataContract] then this is "opt-in" (unlike [Serializable]
which is "opt-out"), so it shouldn't be included.

Otherwise; it is more code, but I'm wondering if custom event
implementation (e.g. http://www.simple-talk.com/content/p...px?article=224)
might be the answer? Then you can presumably control access at the
field level.

But I'm a C# person, so this is only a "perhaps"...

Marc

Jun 13 '07 #2

Yeah, I'm a C# person as well.
(http://sholliday.spaces.live.com/)

And these VB.NET nuances irk the crap out of me.
99.9% of the time VB.NET is the same as C# (before I get a bunch of posts
telling me how smug I am).
But those 0.1% really bite when you hit them.

Anyway. Like I said, it may be the reason to convert existing code to C#
and be done with it.

...

"Marc Gravell" <ma**********@gmail.comwrote in message
news:11**********************@e26g2000pro.googlegr oups.com...
If you use [DataContract] then this is "opt-in" (unlike [Serializable]
which is "opt-out"), so it shouldn't be included.

Otherwise; it is more code, but I'm wondering if custom event
implementation (e.g.
http://www.simple-talk.com/content/p...px?article=224)
might be the answer? Then you can presumably control access at the
field level.

But I'm a C# person, so this is only a "perhaps"...

Marc

Jun 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John Smith | last post by:
After reading C# documentation the Conditional attribute seemed the way to go, but after inspecting the IL it seems those methods are still there and I imagine the CLR removes them. Using #if DEBUG...
10
by: Luke Meyers | last post by:
So, just a little while ago I had this flash of insight. It occurred to me that, while of course in general there are very good reasons for the conventional two-file header/implementation...
4
by: CeeBeeSky | last post by:
I am using Access 2003 but my Access file is in 2000 format. I have deleted some data (some unused customers in the "Customer" table and some old Orders from the "Order" table). I did this to try...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.