Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: VB7: what about LSET


Message #1 by "Everardo Cunha" <ecunha@o...> on Fri, 8 Dec 2000 12:53:14 -0000
Thanks Helen for the link. I've included the commentary just in case for
other people to view easily on this list.


"CSLA and .NET Values
There is a lot of interest about how CSLA applications will fit into the
.NET world.

.NET provides features that make it easier to create powerful Windows DNA
applications - including those creating based on the CSLA. However, there
are some obvious technical differences, since VB.NET doesn't support LSet
(or alternatives such as memory copies).

It is important to remember that the CSLA restricts serialization code to
two methods in each object - GetState and SetState. This means we can swap
out the entire serialization approach by just changing these two methods as
long we keep the interface the same - in other words as long as we serialize
two/from a String value.

Today this means we can easily switch between LSet/UDT, PropertyBag and XML
serialization. This is illustrated by another article - Serialization Code
Speed Test.

"Strategically LSet is not a good option, though it remains the fastest. But
we know LSet won't be there in .NET.

I prefer the PropertyBag today. It is about half the speed of LSet, but is
much easier and more powerful. However, there's no PropertyBag in VB.NET. On
the other hand, creating a PropertyBag object is pretty trivial, so I see
that as a small hurdle.

XML is an option as well. Unfortunately even with MSXML 3.0 parsing is still
about half the speed of the PropertyBag. If properly done, the XML stream
created is about the same number of bytes as a PropertyBag though, so
network traffic is comparable. XML is supported in VB.NET of course, so this
option can be attractive in that regard.

However, .NET provides entirely new serialization technology - built right
into the .NET Framework itself. In .NET, objects are normally passed by
value - as opposed to COM where passing by value is something we do by hand
via serialization. I am still researching the best way to utilize .NET's
serialization technology within a CSLA design, but it is very exciting
stuff!

Unfortunately, there's no direct or easy path from GetState/SetState to the
new technology other than cutting out a lot of code we no longer need. In
other words, upgrading won't come for free..."


  Return to Index