This is the 8th article in a series of articles that introduce Windows Phone 7 development to developers of other mobile platforms such as iOS and Android. In this article, we'll talk about some of the various options for storing and retrieving application-specific data on the phone.

When mobile developers build applications, one of the first things they need to decide is how they plan on storing data on the device. When you build a desktop application, this is rarely a concern. Mobile developers typically have less options because the devices have limited resources and, in many cases, the platform SDKs restrict the ways in which the developer can interact with the underlying file system.

For example, when you're building an application for a mobile device, you can't simply create and fill random directories wherever you like. In most cases, your application is restricted to operating within a sandbox. In addition to process isolation, this sandbox provides private file storage that is often limited by a maximum storage quota.

iOS developers are lucky in that they get access to Core Data, a framework for storing and querying relational data. Developers can visually model their database and generate Objective-C entity classes which they can use as parent classes for derived functionality. With iOS, Core Data can read and write SQLite database files. With the current version of Windows Phone 7, we have no such luxuries and are limited to using lower level facilities. However, when the "Mango" release of WP7 is made available (currently in Beta 2), developers will be able to build code-first LINQ to SQL database models that are backed by a compact, file-based SQL engine that runs on the phone.

Windows Phone 7 developers can access a private, sandboxed file store called Isolated Storage to read and write arbitrary files, so long as the app doesn't exceed its allotted quota. In addition to arbitrary files, there is also an API designed to make it easier for developers to read and write configuration settings within the application's Isolated Storage folder.

Read More.....