AgFx Windows Phone App and Data Caching Framework
AgFx has been moved to GitHub, go
here for current source.
Build great data-connected Windows Phone 7 applications.
Welcome to AgFx, a framework for building Windows Phone 7 applications. This framework exists because many apps for Windows Phone 7 run into the same types of problems around managing data, keeping work off of the UI thread, and optimizing network usage. It's
goal is to make all of this easy so you can focus on writing your application.
To get started with AgFx, check out this tutorial
which not only walks through the basic process of building an AgFx-based application, but also gives an overview of what the framework can do.
AgFx supports both Windows Phone 7 and Windows Phone 7.1 (Mango) development platforms.
AgFx is available via NuGet
- Automatic caching and retrieval of data from network requests
- Automatically handles determines if cache is valid or if a new valid data needs to be fetched
- Easy framework for building databound view model objects based on cached data
- Instance tracking ensures that all parts of your app are referencing the same instance - an update in one place will update data in other places
- Flexible framework for defining how objects are cached, how long the cache is valid, and how to handle invalid cache items, etc.
- Simple framework for app-wide broadcast messages
- Many helper classes for implementing common pattern in Windows Phone 7 apps.
- Debugging features to allow you to see what AgFx is doing and see reports for timings of how the network fetch and deserilization parts of your app are performing.
In brief, AgFx allows you to describe the two things that it can't automatically figure out, and then it does everything else.
There are three things that each data-connected application has to describe
- How to fetch it's data. This is usually an URL, but could be other things.
- How to deserialize that data, once fetched, into a model or view model object
- How long the data is valid for, and what to do when it expires. In other words, after what point should new data be fetched, and should invalid cached data be
With that information, which you define for each of your objects, AgFx can handle the rest.
For more information about how AgFx handles data, check out
How AgFx Works
See the Documentation tab for more info.
AgFx is a work in progress but has been used to build several types of data connected Windows Phone applications, and efforts will be made to avoid breaking changes. However, it is still currently in the
quality band. Design-wise it's closer to the stable band, but it won't be moved officially until a broad set of applications are using it successfully. When possible, changes will be staged by maintaining old APIs with the ObsoleteAttribute.
In any case, very few breaking changes should be expected.
The following components are closest to the stable quality band:
The following components are still in preview:
AgFx Shortcomings and Todos
Not all is perfect in AgFx land. Here's a list of known issues and to-do work items
- Store housekeeping. Currently if your app does a lot of load requests with different LoadContext/Identity, then the cached values will stay in the store. AgFx does scavenge out-of-date items when a value is requested - meaning if you do
Load<MyVM>("me") every time you launch, AgFx will clean up out-of-date caches. But if you were to do Load<MyVm>(DateTime.Now.Ticks) at each load, you'd get leftovers. This is something I'll address shortly and shouldn't
greatly impact most apps in the first place.
- Documentation for the AgFx.Controls.Phone project. Coming soon.