开发者

State Machine Vs Single Table inheritence

开发者 https://www.devze.com 2023-03-07 06:19 出处:网络
I am developing a project management application for in-house use. For storing project requirements, I am currently planing to implement Single Table Inheritance like:

I am developing a project management application for in-house use. For storing project requirements, I am currently planing to implement Single Table Inheritance like:

Lead < Requirement

Project < Requirement

My question is would state machine be better in this scenario instead of STI. So that a project requirement could go from one state to other like:

Lead -> Project -> Cancelled

Lead -> Project -> Completed

etc...

I am not sure if I understand state machines well and if my question does not make sense, please forgive me.

Upda开发者_JAVA百科te: By better I meant - easy to use/understand and most importantly easy to maintain.


I am leary of addressing the 'better' aspect of this but I've been using AASM for my workflow state machine and it's easy to use, easy to understand and otherwise pretty cool.

0

精彩评论

暂无评论...
验证码 换一张
取 消