Windows Phone 7 Database Rapid Repository V2.0 Released

Rapid Repository is a Windows Phone 7 Database and Silverlight Isolated Storage Database.

 

Rapid Repository requires no setup and the API has been designed to be easy to use and discoverable, you will be saving, updating, deleting and querying your complex entities within minutes.

There is no major learning curve, you will literally have a near full understanding of most of the repository within minutes of downloading and referencing the library.

The more advanced features such as querying with views and filters are still very easy to use and the tutorials provided will have you using them within minutes.

 

Download Rapid Repository from Microsoft Codeplex

Blog Tutorials

I will be adding some samples and video tutorials soon.

V2.0 Features

This is a full list of features within Rapid Repository V2.0

  • Numerous methods for performing Create, Read, Update and Delete operations
    • Add
    • Update
    • Delete
    • Exists
    • GetById
    • GetAll
    • Query
  • Views & Filters
    • A view is a subset of an entity which can be implemented to greatly improve querying speed and performance
    • Filters are Where Conditions placed on the view to further filter the data
  • Rapid Context
    • The context is mainly used for performing any operations request by the repository
    • It also allows access to all operation requests, this enables the examination and updating/deleting of any pending changes if required in more complex scenarios
  • Entity Cache
    • Entities are cached locally by default for improved performance, there are methods available for eager loading the cache at application start up and also for turning off caching on a per entity basis
  • File Access Helper
    • RapidRepository.File contains helper methods for storing file that are not entities such as an image byte array

Breaking Changes

RapidContext has moved from namespace RapidRepository.Context to the root namespace RapidRepository. This was done as the context should be a top level class.

A new OperationRequests property has been added to the RapidContext – this is now the way to access any pending requests.

Bug Fixes

There have been numerous improvements from V1.0, the main bug that has been fixed was a caching bug that sometimes caused the GetAll method to not load all entities.

Technical Details

The full source code and tests can be downloaded from or browsed on the Microsoft Codeplex site http://rapidrepository.codeplex.com/.

As an overview, the Rapid Repository is a document database which serialises and deserialises entities into Json and saves the json as text files within the Windows 7 Phone Isolated Storage.

Each saved entity has it’s own json file with a globally unique identifier (GUID) filename.

Views are stored slightly differently, instead of have a file per row, a view is stored in a single json file for the specific view type. An entity can have many different views.

Caching is turned on for each entity type by default, this can be turned off if required. The cache stores an in-memory representation of all entities used during the application session, this enables better performance when re-using the entities within an application session.

 

Summary

I’m really happy with the improvements in V2.0 and I especially think the Views and Filters feature will be really useful as it will greatly improve the speed of querying the data within the repository.

I hope you like it and would be really grateful for any feedback.

Kind Regards,

Sean McAlinden.

6 Comments

  • Hi Chaminda,
    I had thought about using binary serialization but as the speed is pretty good using the built in json serializer I thought I would go for that. The problem with the Compact framework is that it does not have the binary formatter so I would need to create a custom binary serializer.
    I think if people are finding the speed an issue i could add it to the road map but as i say, it is pretty fast anyway, especially if you use the Views and filters feature.
    Kind Regards,
    Sean.

  • Hi Sean,

    Good stuff as usual...
    The API is just nice... I'm interested in the architecture view about RR.. what do you store in files... how do you execute queries...etc. can you do a post about that? -if you didn't already-

    Another thing, I've implemented a custom DB in my app (tailored for my entities.. etc) which isn't optimal for expansion/modification so I was looking to use RR... but it lacks one very crucial functionality for me .. which is indexes.. I do depend on queries like "where item.Column == 'value'"... so I need to index Column...
    I've implemented an IsolatedStorage-Friendly BTree for that... I was planning to see if it can fit in RR.. but I need that architecture view to be able to know my way through the code...

    Last thing is the license, I vaguely read the license and I think it's ok but wanted to make sure from you, is it ok to redistribute the binaries in a commercial product without any NOTICE or Credits or anything? (I'm not trying to deny your credits, I just don't have anywhere to show it :))

    Thanks and keep it up!

  • Hi Haytham,

    Glad you like it, I'd do a post soon covering the overall architecture but as a quick (very high level)overview, underneath the scenes it is a document database similar to Raven or Mongo db.
    The closest thing to an index at the moment is the Views and Filters feature which i think will cover your scenario, take a look at the tutorials link Querying with Views and filters at the top of this page, once a view is created you have full linq access.
    I'll double check the licence after work but I can definitely say that you do not have to credit me at all and you can do with or distribute the code as if you created it yourself, basically I'm not after anything for the code, I'm just doing it to help people write apps so I can get more cool apps for my phone :)

    Thanks, Sean.

  • Hi Chaminda/pFaz,

    I can see that the json format will be a bit of a problem when storing lots of files so I'll add a binary serializer to the top of the road map, if you guys have any luck implementing this yourselves before I get to it and don't mind your code going into the project let me know, of course I'll give you full credit for the input.
    I think I might try and have the serializer type overridable through the API as some people have asked for other types of serialization as well such as different flavours of json and xml.

    Kind Regards,
    Sean.

  • Hi Sean,
    This is an outstanding piece of software. I was able to put it to use on WP7. I am trying to figure out a way to have the information displayed in a sorted order during the CustomerSearch. You have any ideas on how I could accomplish that?

  • Hi Buell,
    Glad you like it.

    Just use linq/lambda on the result set from the GetAll or Query() results - such as .Query().OrderBy(x => x.FirstName).ToList();

    Kind Regards,
    Sean.

Comments have been disabled for this content.