views:

119

answers:

2

Hi All,

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.

A: 

You could have a look at the Smart Client Software Factory from Microsoft's Patterns and Practices which can provide you with some standard building blocks and design guidance.

And there is also OpenNETCF's IoC Framework on Codeplex which is modelled on SCSF and extends it in some ways.

tomlog
Er... I wouldn't take advice from the Smart Client Software Factory seriously. It is just a port of the desktop one and is therefore not designed with Mobile in mind. It shows.
Quibblesome
@Quibblesome: doesn't that somewhat contradict with your own answer? ;)
tomlog
Its the difference between "design patterns" and design. I can use the same patterns but give you two different designs. Somehow the misconception that Design == Design Pattern has spread throughout our industry. Design Patterns are just a communication tool for designers to discuss certain and well known approaches, they are not a substitute for thinking about the given problem domain.
Quibblesome
I have now edited it a bit for clarity.
Quibblesome
+1  A: 

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.

Quibblesome