4

How do I design a pluggable points and badges system which is easy to turn on and off, as well as easy to turn into a module of its own?

After many trials and errors I reached the conclusion that points and badges are simply too intertwined into the sole business logic of the application that they cannot be externalized in a simple way (many rules involve understanding of the core structure of the application, which makes things already quite coupled)

I currently do everything the simple way - I externalized all the business logic (validation, persistence, gamification, notifications) in the methods of a service class. Those methods however already became quite cluttered, and I fear quite coupled. There is no simple way to simply shut off any of the underlying systems

Dan
  • 9,391
  • 5
  • 41
  • 73
Preslav Rachev
  • 3,983
  • 6
  • 39
  • 63

1 Answers1

6

As an idea, how about decoupling which business logic events you care about from how you account for them as points, badges, levels to a user? So that you can implement in one place nutty stuff like a Ball Buzz badge for buying coffee on three consecutive Mondays during a football season.

Conceptually, think of passing a message for all potentially interesting transactions and interactions to this Awards module, which encapsulates (and hides from accountants) this fun functionality.


Upon further review of SO, there has been substantial discussion of the subject matter already. Particularly notable are "Best way to store Badge criteria" covering events notification and "Database Architecture for “Badge” System" with overall architecture discussion.

There has been discussion of relative merits of relational vs. nosql / Mongodb databases for such a feature, as well as partitioning business logic into stored procedures.

It appears to me that there is a lot of reinventing the wheel going on. Anybody aware of OSS frameworks or Github projects emerging in this area? Also, any worthwhile papers or articles on the subject of badges specifically and gamification generally?

Community
  • 1
  • 1
Walter K
  • 1,474
  • 1
  • 14
  • 24
  • Apparently there are (commercial) APIs for gamification these days http://www.programmableweb.com/search/gamification Was told that BigDoor is a major player. – Walter K Aug 31 '12 at 05:54
  • 1
    More research - OSS implementation http://code.google.com/p/userinfuser – Walter K Sep 18 '12 at 23:55
  • 2
    If you are into Gamification, make sure to work through the course on Coursera, named, you guessed, Gamification :) – Walter K Sep 18 '12 at 23:58