C# – design pattern in Compact framework

c#-2.0compact-frameworkdesign-patternswindows-mobile

I have been working on Web application so far and has just got an opportunity to work ong Microsoft Compact Framework. i am pretty new about the framework. In ASP.net application I have been following some of the predefined Design patters and sometimes frameworks like CSLA.net or Factory/Abstract Factory.
Now while looking at the existing code produced so far for the existing device applications I find out that its lacking in any patterns and worked like use the thing where you want it . that's it. After having discussions with other members, I find out that Device application suppose to be lightwieght and contents passed in massages need to less. Which might be a problem with using the patterns.
Any of you well verse over the usage of Designn patterns while working with Compact Framework? Any ideas any inputs are highly welcome.

thanks.

Best Answer

Eh? I use the same design patterns in both desktop and mobile applications. However I do typically use different designs. I would suggest that instead of worrying about patterns and message size you should worry more about performance and memory usage. They are more fundamental and important, work them into your thinking at design time as well as implementation. Test any assumptions you're about to make about performance before integrating them into the design.

A small example of one difference is that a lot of desktop designs like to use reflection, however reflection is pretty slow on mobile. So you need a new approach or a workaround, in this case you can get around this by using code generation instead. However in other scenarios there may be no workarounds leading to a change in your design.