do { Engine.BlogAbout(".NET","Silverlight"); } while ( alive );  

Mark Monster

Mark Monster  

Archive for December, 2007

The Local History project: Some challenges

Some time ago I mentioned thinking about a project on Local History. This project is still in a very conceptive application. But I already know that I want to have Windows Service and a Windows UI. More on other details later, but now let’s talk about communication between the Windows Service and the Windows UI.

It’s possible to do some very basic communication with a Windows Service. This can be done like this:

On the Windows Service handle commands like this:

1 protected override void OnCustomCommand(int command) 2 { 3 base.OnCustomCommand(command); 4 //Do your handling. 5 }

On the Windows UI send the commands like this:

1 ServiceController sc = new ServiceController("WindowsServiceName"); 2 int customCommand = 21; 3 sc.ExecuteCommand(customCommand);

Yes you can see this are just very basic commands, you can send integers to the Windows Service that it needs to handle. I’m sure there are enough samples to find that only needs this basic commands. But I need more, much more.

How can we do more advanced communication between the Windows UI and the Windows Service?

Read the rest of this entry »

Google Talk helps you translate text

image

I just read an article on lifehacker.com about Translation in Google Talk. It works very good. Only the last translation should have been "Do you speak Dutch?", very strange the translation was actually a change in language even in the text.

This feature from Google could really help me since English isn’t my mother language. You can just invite the bot to your Google Talk account. Use language codes. For example Dutch to English is done by the bot nl2en@bot.talk.google.com and English to French is done by en2fr@bot.talk.google.com.

Reusing Class Library between Web Service and consumer

.NET and Visual Studio make it Web Service consumers very easy to generate a proxy for accessing the Web Service. It uses the WSDL to generate all the methods, even the asynchronous access methods. Also all data-structures are generated. Sadly all lists are generated like simple array’s.

Wouldn’t it be nice to use the same data-structures on the consumer as we can on the Web Service? I’ve been thinking about this for a long time, but as far as I knew it wasn’t possible. Also a lot of people told me it just wasn’t possible.

Read the rest of this entry »

Practicing more on the database - Rowversion / Timestamp data type

The Transact-SQL timestamp data type is not what it looks. It’s not some sort of datetime data type, it’s a rowversion. Each database has a counter that is incremented for each insert or update operation on a table that has a rowversion / timestamp column. Rowversion / timestamp is generally used as a mechanism for version-stamping table rows. The rowversion is unique for one entire database.

Read the rest of this entry »