April 2003 - Posts
I just read where we now have Intellisense in the Debug|Immediate window with v 1.2. Too cool. I have had this on my wish list for quite some time.
My thing today is questioning the typical model of passing data between logical tiers as result sets, xml, arrays, strings, etc. This Microsoft article
does a nice job outlining other options.
Standard, out of the box .NET collections store references of type System.Object. We have a structure that we add to a collection. We add approx 2500 structure types to this collection.
Well, duh, if we are adding a structure, which is a value type, to a collection, which stores a reference type, the structure will get boxed and allocated on the heap 2500+ times! Its like creating a reference type 2500+ times!
Solution: use a reference type (class) vs. a structure in this case.
I come from a vb background. I am the classic business dude who later in life developed an interest in programming. I guess I am a Mort, although I truly do not know the definition of a mort. Unlike a Mort though, I am more of a 'why and how does this work', so I love vb.net, however I like to dig into the framework and the internals of what .net is doing for me.
That said, I am loving inheritance. I am jamming with it all over the place. So much so, I have decided to name our first born:
'Derives' Or 'Implements'
Greg 'Derives' Robinson, Jr.
Greg 'Implements' Robinson, Jr.
Now is that money or what! Now, I have a case for multiple inheritance!
Picking VB.NET over C# is a little like picking which Playboy bunny will join you in the hot tub—you can’t go wrong either way.
So, here we go again:
I use to work at a consulting shop where this battle was faught and argued daily. In the end, you know what, the client writing the check decides and it is up to you whether or not you want to develop with their platform of choice.
Which, for me of course is always .NET :-)
I think I have discoverd a bug when setting the DefaultValue property on DataColumn and serializing a DataSet.
Our source table does not allow nulls. So, when my client requests a Dataset, we loop through the returned DataSet and set a DefaultValue for each 'does not allow nulls' DataColumn. We do this as we are DataBinding and using a CurrencyManager to mange the binding. The CurrencyManager frowns if the clients does not provide a value for a column that does not allow nulls on an Insert. So, assuming the user did not set the value on an Insert, there will be a DefaultValue.
The client updates the Dataset and sends the Dataset changes back to our Data Tier type. There, we use DataAdapter to push the updates back to our datasource. When using a local data tier type, all works well. When using a remoted data tier type, we get a serialization exception on the dataset when the client is passing the dataset as a param to the data tier type (remoted, hosted by IIS). We are using the SoapFormatter and it seems the dataset cannot be serialized once a DataColumn DefaultValue is set .
As a test, I created a test database that mirrors our existing one. I changed the table in question to allow nulls. I removed the code that sets DataColumn.DefaultValue in my client. All worked well with the local and remoted data tier type.
This leads me to believe there is a .net bug in serializing a dataset where datacolumn.defaultvalue properties have been set.
I have not blogged here in a while, nor have I blogged on my personal site. Why, two-fold. One, I just hired a .net developer and I have been very busy with ramp up and training. Hopefully, he will be blogging here soon, Bill Sanders.
Secondly, and probably the main reason, I have received some rude comments and e-mails about my blogs. Most of which were out right obnoxious and rude. Stuff like "Hey jerk..." and "You are a poor developer if you post that". I have also received some e-mails that imply I am too chatty. With all that said, I have been somewhat turned-off to blogging, realizing the 'global/public' nature of the whole thing.
I was having a lot of fun sharing and writing. However, a few inconsiderate, selfish, pigheaded folks have made me take a step back and re-visit the whole idea of blogging. I honestly do not have the time or patience to respond to these types of e-mails nor am I happy that folks feel the need to attack. It simply makes no sense, and by being silent I do not have to deal with it. BTW, this also applies to LISTSERVS, mainly the DevelopMentor ones. I love reading them and I love replying and posting. However, same thing. I few folks decided to send me e-mails implying I am too chatty. So, I am walking away from all this for a while.