简体   繁体   English

跨不同编程语言共享通用业务逻辑的策略

[英]Strategies for sharing common business logic across different programming languages

Having a monolithic business application with complex business logic implemented in Visual Dataflex, we are facing the challenge of maintaining our business logic across programming languages as certain features are written in other programming languages (mainly .NET). 由于在Visual Dataflex中实现了具有复杂业务逻辑的单一业务应用程序,我们面临着跨越编程语言维护业务逻辑的挑战,因为某些功能是用其他编程语言(主要是.NET)编写的。

So I am looking for strategies to "synchronize" business logic across different programming language implementations, in order to avoid mismatches. 所以我正在寻找在不同的编程语言实现中“同步”业务逻辑的策略,以避免不匹配。 Avoiding duplication is a plus, but this may be compensated by automated testing. 避免重复是一个优点,但这可以通过自动化测试来补偿。

EDIT: SOA is a great suggestion. 编辑:SOA是一个很好的建议。 But what about those cases where a service will not be fast enough? 但那些服务不够快的情况呢?

EDIT 2: Any suggestions for using a metalanguage ? 编辑2:使用元语言的任何建议?

Looks like you're looking for Service Oriented Architecture (SOA). 看起来您正在寻找面向服务的体系结构(SOA)。 With SOA, you can define your business logic as Services, which can be called from any program, in any language. 使用SOA,您可以将业务逻辑定义为服务,可以使用任何语言从任何程序调用。 When the business logic changes, change your Service and the behavior will change in everything that uses it. 当业务逻辑发生变化时,请更改您的服务,并且所有使用它的行为都会发生变化。 SOA also minimizes code duplication, because the logic only appears in one place (the service). SOA还最大限度地减少了代码重复,因为逻辑只出现在一个地方(服务)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM