设计一个可插入点和徽章系统 [英] Designing a pluggable points and badges system

查看:139
本文介绍了设计一个可插入点和徽章系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何设计一个可插入点和徽章系统,这是很容易打开和关闭,以及容易变成它自己的模块?

许多试验和错误后,我到达那个点和徽章简直太交织到,他们不能以简单的方式被外部应用程序的唯一业务逻辑(许多规则涉及到应用程序的核心结构的理解的结论,这使得事情已经相当耦合)

我现在做的一切简单的方式 - 我在服务类的方法外在所有的业务逻辑(验证,持久化,游戏化,通知)。然而,这些方法已经变得相当混乱,我怕相当耦合的。有没有简单的方法来简单地关闭任何底层系统的


解决方案

作为一个想法,怎么样去耦哪些业务逻辑事件你如何解释他们为点,徽章,等级给用户的关心?所以,你可以像一个球巴兹徽章一个地方,有嚼头的东西落实在一个足球赛季的买盘连续三个星期一咖啡。

在概念上,认为传递消息对所有潜在的有趣的交易和互动,这个奖项模块,该模块封装(和会计师隐藏)这个有趣的功能。


一旦SO进一步审查,出现了<一个href=\"http://stackoverflow.com/questions/9108523/best-approach-for-designing-framework-for-badge-assigning-system\">substantial讨论这个问题事了。
特别值得注意的是覆盖事件的通知并,存储徽章标准的最佳方法数据库体系结构的徽章系统与<一个href=\"http://stackoverflow.com/questions/1049233/database-architecture-for-badge-system-arbitrary-criteria-mysql-php\">overall建筑讨论。<​​/ P>

有一直<一个相对优势的讨论href=\"http://stackoverflow.com/questions/9108523/best-approach-for-designing-framework-for-badge-assigning-system\">relational与<一个href=\"http://stackoverflow.com/questions/9108523/best-approach-for-designing-framework-for-badge-assigning-system\">nosql / <一个href=\"http://stackoverflow.com/questions/8008820/how-to-architect-achievements-and-badging-with-nosql\">Mongodb数据库为这样的特征,以及分区的业务逻辑成<一href=\"http://stackoverflow.com/questions/314412/designing-a-badge-system-where-to-fire-business-logic-in-$c$c-or-stored-proced\">stored程序的。

在我看来,有很多重新发明轮子回事。任何人都知道OSS框架或Github上项目出现在这个领域的?此外,在专门的徽章和一般游戏化的主题任何有价值的论文或文章?

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

解决方案

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?

这篇关于设计一个可插入点和徽章系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆