数据驱动的状态机上的应用
问题说明
我们目前正在制定一个数据驱动的状态机的应用。眼下,国家流都配置在数据库中,但没有决定/业务逻辑是在DB配置与我们目前的设计。正因为如此,在code已经基本上知道国家流动以及,所以真的没有一点配置数据库中的流动。
We are currently working on a "data-driven" state machine application. Right now, the state flows are all configured in the database, but none of the decision/business logic is configurable in the DB with our current design. Because of this, the code has to basically "know" the state flow as well, so there's really no point in configuring the flow in the database.
我心里有一个设计,让我们来连接在一起使用依赖注入(Spring.NET)的状态的模式,但我不知道,使这个数据驱动的最佳途径。我不是配置code状的东西(如类或方法名称)在数据库中的一个大风扇,但设计我心目中就要求我们要连接的数据库应用程序(类似于布线在Spring XML文件),因此,这似乎不好。
I have a design in mind that would allow us to wire together a state pattern using dependency-injection (Spring.NET), but I'm not sure of the best way to make this data-driven. I'm not a big fan of configuring code-like things (like class or method names) in the database, but the design I have in mind would require us to wire up the application in the DB (similar to wiring in a Spring XML file), so that seems bad.
我们已经使用Windows WF调查,但我认为我们有点担心WF的未来,这是否是一个好时机采纳。我从来没有处理规则引擎,所以我不知道如果这可能是一些使用这里。有没有人对如何落实这有什么建议?
We've investigated using Windows WF, but I think we're a little concerned about the future of WF, and whether this is a good time to adopt it. I've never dealt with rules engines, so I'm wondering if that might be of some use here. Does anyone have any suggestions on how to implement this?
正确答案
您最好的选择可能是从分离使用的技术数据存储的行为,以实现它们。
Your best bet is probably to decouple the data-stored behaviors from the technology used to implement them.
要做到这一点的方法是DSL(领域特定语言)。拿出了可以重新present抽象的业务逻辑(即微语),那在你的表存储字符串格式,并实现在code跨preTER它。这样一来,如果你的底层技术改变了,你只需要重新实现跨preTER。
The way to do this is a DSL (domain specific language). Come up with a format that can represent the business logic in the abstract (i.e. a micro language), store strings of that in your tables, and implement an interpreter for it in code. That way, if your underlying technology changes you just have to reimplement the interpreter.
我的工作是利用这一技术在80年代中期的应用程序,并且它被移植了几次,只有轻微的(和automatible)切换到业务规则规定。
I worked on an application that used this technique in the mid 1980's, and it's been ported several times with only minor (and automatible) changes to the business rules required.
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /reply/detail/tanhcffcfj
-
YouTube API 不能在 iOS (iPhone/iPad) 工作,但在桌面浏览器工作正常?
it1352 07-30 -
iPhone,一张图像叠加到另一张图像上以创建要保存的新图像?(水印)
it1352 07-17 -
保持在后台运行的 iPhone 应用程序完全可操作
it1352 07-25 -
使用 iPhone 进行移动设备管理
it1352 07-23 -
在android同时打开手电筒和前置摄像头
it1352 09-28 -
检查邮件是否发送成功
it1352 07-25 -
扫描 NFC 标签时是否可以启动应用程序?
it1352 08-02 -
Android微调工具-删除当前选择
it1352 06-20 -
Android App 和三星 Galaxy S4 不兼容
it1352 07-20 -
希伯来语的空格句子标记化错误
it1352 06-22