It contais some patterns for accounting software, such as accounting entries, transactions and adjustments. The architecture he describes is based on events. Never read it entirely, as the system I work on was already in the middle of its development stage and I couldn't change the design.
Account - Represents a financial account. eg. Cash, Sale, Expense;
Category - The category where the Account belongs to. eg. Asset, Expenses, Revenues;
Mutation - Represents a financial entry of an account.
Transaction - Contains a collection of mutations.
Money - A composite class using Currency object and storing amount as long integer;
When I approached the design initially I kept thinking about Decorator and Builder Patterns. Tax calculation can use the Strategy Pattern. Observer Pattern can be used to veto Transaction.
For dealing with currencies, remember that you need to always remember not just what currency the amount was entered in, but also what time it was entered, and what the rate of each currency was at that time. Also, accountants are not forgiving when it comes to "inaccuracies" in amounts. If an amount is entered, you have to store it as it was entered, and not convert it first, because afterwards you won't be able to guarantee that you can get back the entered amount just like it was entered.
These may sound like obvious things, but people do sin against them in the real world.
I find the Data Model Resource book to be a good source of inspiration for modeling business structures. Apache Ofbiz ERP was built around the concepts in this book.
发布评论
评论(7)
不久前,当我被分配到开发这样一个系统时,我在 Martin Fowler 网站上发现了这个链接:
Martin Fowler - 会计模式
它包含会计软件的一些模式,例如会计分录、交易和调整。 他描述的架构是基于事件的。 永远不要完整阅读它,因为我工作的系统已经处于开发阶段的中期,我无法更改设计。
希望能帮助到你。
A while ago when I was assigned to work on such a system, I found this link in the Martin Fowler website:
Martin Fowler - Accounting Patterns
It contais some patterns for accounting software, such as accounting entries, transactions and adjustments. The architecture he describes is based on events. Never read it entirely, as the system I work on was already in the middle of its development stage and I couldn't change the design.
Hope it helps.
Martin Fowler 的分析模式涵盖了其中一些主题。
Martin Fowler's Analysis Patterns covers some of those topics.
我将有以下结构类:
当我最初接触设计时,我一直在思考装饰器模式和构建器模式。 税收计算可以使用策略模式。 观察者模式可以用来否决事务。
I would have the following structural classes:
When I approached the design initially I kept thinking about Decorator and Builder Patterns. Tax calculation can use the Strategy Pattern. Observer Pattern can be used to veto Transaction.
对于处理货币,请记住,您不仅需要记住输入金额所用的货币,还需要记住输入的时间以及当时每种货币的汇率。 此外,会计师对于金额的“不准确”也不会宽容。 如果输入了金额,则必须按输入时的原样存储它,而不是先将其转换,因为之后您将无法保证可以像输入时一样取回输入的金额。
这些听起来似乎是显而易见的事情,但人们在现实世界中确实得罪了它们。
For dealing with currencies, remember that you need to always remember not just what currency the amount was entered in, but also what time it was entered, and what the rate of each currency was at that time. Also, accountants are not forgiving when it comes to "inaccuracies" in amounts. If an amount is entered, you have to store it as it was entered, and not convert it first, because afterwards you won't be able to guarantee that you can get back the entered amount just like it was entered.
These may sound like obvious things, but people do sin against them in the real world.
我可以推荐 企业应用架构模式 和
分析模式、可重用对象模型均由 Martin Fowler 提供,他们为软件架构模式提供了常见问题。
I can Recommend Patterns of Enterprise Application Architecture and
Analysis Patterns, Reusable Object Models both by Martin Fowler they give software architectural patterns to common problems.
我发现数据模型资源书是建模灵感的良好来源业务结构。 Apache Ofbiz ERP 是围绕本书中的概念构建的。
I find the Data Model Resource book to be a good source of inspiration for modeling business structures. Apache Ofbiz ERP was built around the concepts in this book.
对于 UI/报告:查看 Crystal Reports 和 Business Objects。 两者都在我工作的投资会计部门使用。
我们在这里使用其他东西作为内部结构(JD Edwards),但除了“是的,它就是这样做的”之外,我无法真正深入细节
FOR UI / REPORTING: Look into Crystal Reports and Business Objects. Both are used at my place of employment in the Investment Accounting department.
We use other stuff for the internals here (JD Edwards) but I can't really go into much detail other than 'yeah, it does that'