Skip to main content

Posts

Showing posts from June, 2008

WinForms : DesignMode

Back to WinForms...It was a user control which calls a service, I knew that if I wrap the service call inside a ComponentModel.DesignMode, I could get away with the service call being called at design time and the designer throwing me exceptions...Now this is not an issue at all when your are designing the control, cos' Visual Studio does not create an instance of the user control that is being designed, instead it creates a base class, UserControl, this is also true when you designing a form, a Form instance is created. Therefore .ctor of the control being designed is never called, so doesn't the service call.Now if I drag an drop this control (ctrl1) into another a control(ctrl2), the control's DesignMode property is true, but if I now drag the ctrl1 into a form, the DesignMode of ctrl1 is false.This basically means that ctrl2 is sited in the form and not ctrl1, makes sense right?.There are two work around that you can use to avoide this...1) See if the current process th...

Going Parallel With Parallel Extension For .Net 3.5

Now a days, almost all computers being used have multiple cores, for an example technologies like dual core.But, although you have dual core, generally you write programs that run on a single core, this does not utilize the total power of the multiple CPU or core that you have. This is exactly the power what Microsoft Parallel Extensions for .NET Framework 3.5 (a.k.a PFX).gives you. With PFX, you can write flexible programs that would take advantage of utilizing multiple cores in the environment it is deployed in, giving you high performance and scalabilty. PFX comes in 2 "Flavours", Task Parallel Library (TPL) and PLINQ. TPL gives you general APIs that can be used to make your program run in parallel, for an example , take the for loop below for(int i = 0; i < 1000000; i++ ) { //Do something that is not dependent on other iterations } the for loop does 1000000 iterations, and does something that is not dependent on other iterations. Running this program in a mulit core ...

Weekend at Namunukala.

Last weekend we took some time off, at Bandarawela. Climbing the Namunkala mountain and visiting some natural pools. It was a fun guranteed trip after all. This is our team.

Velocity : Distributed Caching

Caching is one way you could increase your applications response time. For an example, take a hotel reservation system, where you might need to show a list of hotels for a particular country in your reservation page. For each and every reservation made by users, a service call or a direct database call is onvloved to fetch the list of hotels for the country the user has selected, and when the number of concurrent users to your system increases, the performance of your system decreases too. To avoid these hits, caching of your hotel objects or a hotel dataset can be used, so you application can use these to respond to a request without calling the service or making a call to the database, further more the cache is updated at periodic intervals to accomadate changes to the underlying data. Velocity is an in-memory distibuted caching solution from Microsoft, still in it's CTP, addresses application scalabilty. In typical applications you would cache your data in the host your applicat...

Better Late Then Never

It's been a few weeks since I have blogged, was a bit hooked up on catching on with some of the MS technologies.I started learning the ADO.Net entity Framework, downloaded some videos, samples and ye, did some pretty intresting stuffs with it.Then there was last week, when one of my friends asked me a question on web services, got a bit confused and I had to dig into some of the ws-* standards and WCF Security, and finally thought of going through the specificaions at w3c, and I ended up reading the ws-security and ws-addressing spec.Then there was this week, started looking at some presentations on the ADO.Net data services on MIX 08, still doing this !!!. and another thing about all these is that I am getting not much of time to do all these readings, cos' I have hooked up into some of the old cartoons that I always wanted to watch, like the X-Men, King Artuher, The Mask etc...Well for all, I guess its better late then never !!!