Earlier this week, I published the RIA Services Essentials project on CodePlex to share some sample code. The first sample included is an updated version of the Book Club application.
This application has become sort of a reference application. It was written to demonstrate some aspects of writing a semi-real-worldish application (note that it is still very much a demo app), but more importantly, demonstrating how you can use RIA Services effectively by going beyond the basics. As such, it isn't meant to be a HelloWorld app, which I agree would be useful. This post is a sort of guide for what is in the sample.
Here is a list of what the application demonstrates:
- Entity framework data model with one-to-many and many-to-many relationships as well as use of stored procedures
- Local data model augmented/mixed with a web service-based data model (in this case Amazon).
- CRUD and more (queries, insert, update, delete, as well as named update methods, and invoke methods)
- Use of convention and configuration for identifying CRUD operations
- Validation (field level, entity level, operation level, change-set scoped, server-only validation, async validation)
- Custom authentication (i.e. using your DAL/user table, rather than asp.net membership)
- Authorization (including custom authorization rules)
- Using authentication service and your User object in server code
- Usage of DomainServiceFactory
- Exposing reference data
- Presentation model for defining custom (non-DAL) types for use between client and server
- Shared code between client and server for validation rules
- Query limits, and caching
- Using RIA Services with MVVM on the client
- Adding computed properties on Entities on the client along with propagation of change notifications
- "More" style paging (as seen for example on twitter.com)
- Display of pending changes, validation errors
- Reference data used to fill lookup dropdown lists.
Here is a list of things on my mind to include over time:
- Using Fluent metadata
- Unit testing of server code and client code
- RIA Service class libraries
- Linq To SQL based data model or a custom DomainService base class
- Additional clients (like the Windows Phone client I demo'd at MIX10)
Separately, I'll be publishing blog posts over time that cover specific aspects of the application in some detail, and will be updating this list, so you have an index to go by:
I guess I need to publish a couple more topics soon. On that note, if someone builds upon or extends the application in interesting ways, that would be awesome! I'd be happy to link to your post from here.
Added (6/9/10): There is also some related video content:
- You can watch the MIX10 presentation.
- Dinesh presented a variant of the same app concept and data for the RIA Services v1 release on SilverlightTV (episode 28)
- On Silverlight.TV, I did a presentation on Validation (episode 18). It uses a different app, but shows some similar code.
Posted on Wednesday, 6/9/2010 @ 12:32 PM
| #
Silverlight