March 2004 - Posts
Sorry if this is a little off topic, but would anybody know of any good examples on the web of how to perform an automatic reboot using C#?
Vashilli: Check the System.Management namespace.
ps: I feel like answering spam.
On the DOTNET-CLR Greg ask about DateTime formats across time zones. Recently Dan Rogers released an article on MSDN which addresses a few best practices. I advice to inspect the ISO/DIS 8601 standard up front. The trick is to work with Coordinated Universal Time (UTC) DateTime formats throughout your application AND to persist ONLY UTC aware DateTime formats. You should eventually localize the UTC format for presentation purposes. Work like a charm.
Pat has a thing or two to say about “a Service”.
Reasonable explanation. Though I understate that “a Service” as a whole isn’t too complicated for those that actually build them. I’ve got the feeling that to many people try to push the thing we tend to name SOA in a corner. I strongly belief SOA should not be cornered, at least not in the phase in which the technology resist for the moment.
Pat I was charmed with your appearance on The Server Side so I hope you’ll be able to keep up the flood of valuable information.
This small movie got me rolling over the floor from laughing. What a geek tool :D
Still shocked by my findings... I noticed that the (de)serialization process does not fail for in WebService scenario. What is significant different about the WebService serialization protocol compared to .NET Remoting?
My workaround for the .NET Remoting version posted earlier is to stream the Data Transfer Object instance into a string object. I can now safely pass the string as result and deserialize it on the client. It sucks, but it works.
Let’s say you want to expose serviced logic as a WebService. I for instance wrote a BatchMLMessagingAdapter which inherits ServicedComponent in order to participate in COM+ transactions. It is highly likely that you’ll experience this exception: System.EnterpriseServices.RegistrationException. The exception stack reveals that this is due to a SecurityException as soon as you wire up a client which invokes your WebService. Struggling a bit with what could cause this error I figured that the dynamic registration for the BatchMLMessagingAdapter component failed.
A bit of gooling resulted in this excellent tip from Christian.
Assuming you use Visual Studio.NET 2003:
These are the settings in the project settings (Common Properties/Build Events/ Post-build Event Command Line):
..\..\postbuild.bat $(TargetFileName) $(ProjectDir)
Now add this bat file to your project directory, named “postbuild.bat”:
call "D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
gacutil.exe /u %2
regsvcs.exe /u %1
gacutil.exe /i %1
regsvcs.exe %1
Be sure to have the project setting for "Run the Post-Build Event" the value of "When the build updates the project output".
Check if the path to your Visual Studio.NET tool directory is correct (especially if you have VS.NET 2002 and 2003 running side by side on your box).
System.Xml namespace classes can’t be serialized? Joseph Cooney implemented a serializable XmlDocument in his code template generator. Jumping through hoops to serialize an XmlDocument, tell me this isn’t for real! I still haven’t found a sufficient solution to serialize XmlElement objects. I’ve isolated the necessary code from my application. Download it here. The code includes a client/server using a TcpChannel instance to pass a Data Transfer Object.
Anyone ever bumped into this limitation? If so what is your workaround? I only found one entry on the very same subject. Wrapping the XmlElement in a Serializable class feels somewhat awkward.
Has Martin chosen the wrong career? His last post is to be considered deeply philosophical. I'd characterize myself as a developer with an enabling attitude. I must admit that during my day job I occasionally shift towards the directing attitude (unfortunately). Mostly due to the fact that I run into the < 50% average rule quite frequently. I'm convinced natural leadership drives people towards the directing attitude which doesn't fit well in a productive working environment. Beware of your attitude!
Attitude is a choice!
You may not be able to control what happens to you, but you are completely responsible for your reaction to what happens to you [John C. Maxwell].
I just read Sanders’s column in the SDGN magazine. Sander briefly mentions Fowlers comments made during the JAOO 2003 convention about “software architects” (note that Sander is talking about his participation at the JAOO event, not Fowler in particular). Fowler seemed to have given the impression that so called “IT architects” tend to further delay projects with their architecture babble. This instead of adding value to the project in the areas that actually DO matter. Interesting!
I dug up an old blog entry of one of my favorite writers.
Although I comprehend Fowler’s words in context I still, for no particular reason can’t really drill down to the core of the problem. The tendency of my projects is that they get slightly over-engineered at first. The project then accelerates and soon reaches its first milestone. The “over-engineering strategy” helps me to oversee the benefits of a more complicated but more flexible design. Is this what Fowler means by delaying projects… the thing I need ( being a fairly inexperienced engineer) to oversee the big picture? Is this where experience comes in? What makes or brakes the architect?
More Posts