views:

482

answers:

1

I was wondering what would be the best strategy to implement a badges system using asp.net mvc. The one that stackoverflow has is pretty interesting. What do you suggest?

I guess I need to clarify the question a bit. The problem would be the different criteria for earning every badges. How do make that logic extensible?

+3  A: 

I'd do it purely in T-SQL, and set up a SQL job that runs periodically (Jeff did it using C#, and has a goofy system where it runs the process based on a page request).

Basicly, in your SQL Job, scan your member tables and calculate if anyone is qualified for a badge, if so, update the badge table(s).

Then in the front end, do a query to retrieve new badges for a member on each request.

FlySwat
I'm not sure but aren't the badges here assigned immediately? So this would probably rather be a SQL trigger or implemented in the business logic?
hangy
No, they are not assigned immediately.
FlySwat