30.3.05

[joke] Turner Brown... :)))

A skinny little white guy goes into an elevator, looks up and sees this HUGE African American guy standing next to him. The big guys sees the little guy staring at him, looks down and says:
"7 feet tall, 350 pounds, 14 inch penis, 1 pound left testicle, 1 pound right testicle,...Turner Brown."

The small man faints dead away and falls to the floor. The big guy kneels down and brings him to, shaking him. The big fellow says, "What's wrong with you?" In a weak voice the little guys says, "What EXACTLY did you say to me?"

The big dude says, "I saw the curious look and figured I'd just give you the answers to the questions everyone always asks me. I'm 7 feet tall, I weight 350 pounds, I have a 14 inch penis, my left testicle weighs 1 pounds, my right testicle weighs 1 pounds and my name is Turner Brown."

The small guy says, "Turner Brown?
Thank God! I thought you said "Turn around."

18.3.05

SoapSerializerTransformer on gotdotnet, downloads

WOW! 200+ downloads in just 7 days... I'm really impressed!

Either people really missed this in Enterprise Library or Download's title is extremely catchy :)

Comment your thoughts here: have you found any bugs, do you miss some features...

12.3.05

SoapSerializerTransformer on gotdotnet

Now you can download my custom serializer transformer I blogged about in previous post on gotdotnet.

Enjoy!

9.3.05

Microsoft Enterprise Library - custom Serializer Transformer provider

A couple of weeks ago I started playing with MS Enterprise Library 1.0. Basically MS EntLib is a
package with various logically connected Application Blocks put together. If you've used AppBlocks before EntLib won't be a problem to understand, moreover the concept is the same but "better".
Great feature is Enterprise Library Configuration utility which enables you to make all necessary adjustments to your .config file through UI. :)
I only regret that assemblies that contain your custom providers must reside in a GAC or folder where EntLibConfig utility is installed in. Or you could add <codebase> node in Enterprise Library or machine config files. Wouldn't it be cool if you could tell EntLibConfig utility: "Look, the thing I wrote is correct, so ignore reflection errors you're receiving" or instruct it to look for assemblies in a specific folders.
Well, whatever...

I jumped on a Enterprise Library bandwagon starting with Configuration Application Block regarding project I'm currently involved with (check my previous post) and although I still have to crawl through all of the blocks in Library, I already ran into problem with XML Serializer Transformer provider.

What was the problem? Basically put, I wrote custom objects to hold configuration data and decided to use builtin XML Serializer Transformer provider to write configuration data to XML file. (XML Serializer Transformer uses .NET's XML serialization.)
My configuration objects hold many name-value pairs of information, but still require several custom properties, so I inherited them from DictionaryBase. Problem No.1 XmlSerializer (which is used by XML Serializer Transformer) doesn't support serializing object which implements IDictionary interface.
Ok, I'll find some other way to create dictionary-like class. How about NOT inheriting object from DictionaryBase but adding a NameValueCollection or Hashtable as a private member and wrap calls to them in custom methods. Wrong! Same result as Problem No.1: these types implement IDictionary. :(
Googling for an hour or so, and a possible result is here: inherit from NameObjectCollectionBase. Problem No.2 Ok, now it serializes name-value pairs, but it doesn't serialize public properties. (Apparently that's BY DESIGN?!?) DAMN! Now I'm really pissed!
Back to Google...

Thank you http://groups.google.com and someone who posted this solution: SOAP serialization will serialize almost anything to XML without a problem (how would .NET Remoting work without it? :) ). I honestly don't know why I didn't remember this myself...

So I wrote custom serializer transformer provider for Enterprise Library Configuration Block :"SoapSerializerTransformer". The process is quite simple...
1. Create a class, inherit it from TransformerProvider
2. Implement three methods: void Initialize(ConfigurationView configurationView), object Serialize(object value) and object Deserialize(object section) - you can copy method bodies from
XmlSerializerTransformer and then make changes, pretty straightforward.
3. Make adjustments in your .config file (you can use Enterprise Library Configuration utility - but don't forget to copy the assembly where your provider is implemented in folder where EntLibConfig utility resides or EntLibConfig will report reflection errors during Validation process)
And that's it!

To help you get started feel free to download and freely use my implementation (C#).

Pozdrav!

Apology

It's been a very long time since my last post. I was thinking about writing some really good excuse (presumably believable), but I decided to tell THE TRUTH: I was lazy! Yup... I was so lazy about typing new blogs that I completely forgot about it... :(

Am I sorry? Yes and no.

Yes: so many things happened since my last post that I wanted to write about here, but now are more-or-less lost. Also, not to forget, I promised some articles about WS-*...

No: I did and learned so many new things in the meantime, that I don't know where to (re)start bloging.

I co-founded software consulting - training organization: idroot.net. Web is still under construction and will remain in that status for some time... Until it's finally published check out my personal web: http://dfruk.idroot.net.

Currently, I'm involved in a "financial market" software project as a dev consultant. Most interesting fact is that server-part of this project is a high-perf .NET application, so when this project finishes sometime around mid-June maybe I'll have a tips'n'tricks article about writing high-perf .NET applications.