Data Virtualization


  • Hello there.

    Sry for noob question, but...

    Is there any way to implement data virtualization using JavaScript WinRT apps ?

    Think -> Search -> Ask -> Think again.

    Monday, March 5, 2012 7:27 PM


  • I don't know of any specific frameworks, but JavaScript (with its loose typing and simple object extension) is nicely suited for this kind of abstraction. Just pick a pattern (e.g. abstract factory pattern),  define your data interface, and start coding an implementation for each data source you want to support. If you want the illusion of type you can implement a base class, like "DataAccessBase" (http://msdn.microsoft.com/en-us/library/windows/apps/br229813.aspx), then derive from that class for each data access implementation, and then when you have an instance of each class you can check "instanceof DataAccessBase" before you start accessing properties and functions. Classes are nice because it lets you define getters and setters on object properties.

    Testing is really easy because JavaScript makes mocking objects and dependency injection crazy easy.

    Senior Dev for Windows Phone Services

    Monday, March 5, 2012 8:03 PM