0

I'm developing Windows Store application using javascript. I also have WinRT library for client-server interactions. Client receives from server a custom class User, which is sealed, as it's required for classes in WinRT lib. I need to extend User object for further use with data binding.

What are best practices for doing it? Is there best way than creating new UserDataBinding class and copying all properties from User?

Charles
  • 50,943
  • 13
  • 104
  • 142
Yury Pogrebnyak
  • 4,093
  • 9
  • 45
  • 78
  • And suggestion for your approach - instead of copy of all propeties - store a instance of user class in your wrapping binding class and expose through get set properties values you need. If your User class is your custom code why cant you just put binding stuff there ? – drk Feb 25 '13 at 07:54
  • @drk sounds like a view model to me.. – Aran Mulholland Mar 05 '13 at 03:20
  • Yeah pretty much the same, i didn't see your answer before posting comment – drk Mar 05 '13 at 11:05

1 Answers1

0

How about using the MVVM pattern and wrapping the User object with a View Model?

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228