简体   繁体   English

架构隔离机制

[英]Architecture Isolation mechanisms

We are currently reviewing how to isolate our core business components (in the code) from the front end development. 我们目前正在审查如何将我们的核心业务组件(在代码中)与前端开发隔离。 We already have multi-tier architecture but they are referenced using dll (or webservices in some places). 我们已经有了多层体系结构,但是使用dll(或某些地方的Web服务)来引用它们。

What we would like to do is to outsource some part of UI to external developers. 我们要做的是将UI的某些部分外包给外部开发人员。 The problem is that we have to provide the dll which can be reverse engineered and the core business logic code then can be "obtained". 问题是我们必须提供可以进行反向工程的dll,然后可以“获取”核心业务逻辑代码。

One way to tackle this instead of exposing BO using dll, use Webservices to expose BO. 解决此问题的一种方法而不是使用dll公开BO,而是使用Webservices公开BO。 However there are few problems. 但是,问题很少。 for eg Security, Debugging, exception handling, hosting etc. To me this does not sound right for the issues mentioned above but also web services are not meant for such problems. 对于例如安全性,调试,异常处理,托管等。对我来说,这对于上面提到的问题听起来并不正确,但是Web服务并不适用于此类问题。

I am wondering does anyone has come across similar scenario? 我想知道有人遇到过类似情况吗? or If someone has done this? 或如果有人这样做了? if so how? 如果是这样怎么办?

Thanks, 谢谢,

Provide a web service point that implements the business logic - this will be hosted by yourselves and accessible to the UI developers. 提供一个实现业务逻辑的Web服务点-它将由您自己托管,并且可供UI开发人员使用。

This way you keep control of your business logic and the UI team have access to the API. 这样,您可以控制业务逻辑,并且UI团队可以访问API。

If this is not possible, extract the public interfaces of your business logic into its own package and implement a set of "canned" responses - just hard coded data for the UI people to work with. 如果无法做到,则将业务逻辑的公共接口提取到其自己的程序包中,并实施一组“固定”响应-只是供UI用户使用的硬编码数据。 This allows you to give the UI team the interface they will integrate with as well as sample data, but without your actual business logic. 这使您可以为UI团队提供与他们集成的界面以及示例数据,而无需实际的业务逻辑。

The concept of interface contract seems spot-on here. 接口契约的概念在这里似乎很流行。

If the contracts of your interfaces are well defined (let them be DLL entry points, WSDLs, whatever), it should not be very difficult to create a mock implementation that allows the UI developers to test the behaviour. 如果接口的约定定义良好(让它们成为DLL入口点,WSDL等),那么创建允许UI开发人员测试行为的模拟实现应该不会很困难。

The only precaution we took is to ask UI contractors to commit code into our SVN repository (no, no Git here :)) so that our build machine could run integration tests continuously and we could assess progresses and issues on a daily basis. 我们采取的唯一预防措施是要求UI承包商将代码提交到我们的SVN存储库中(不,这里没有Git :)),以便我们的构建机器可以连续运行集成测试,并且可以每天评估进度和问题。

The y-principle might help you to get the separation of concerns you are asking for. y原理可以帮助您将所关注的问题分开。

It is a method for separating business and technical concerns in a systematic manner. 这是一种系统地分离业务和技术问题的方法。

The following character graphic depicts the approach: 以下字符图形描述了该方法:

  Business requirements      Technical requirements
+------   |                             |  ------+
|         v                             v        |
|  Business model               Technical model  |
\          \                            /      /
 \          \                        /       /
   \          \                    /       /
     \          > Mapping rules <        /
       \              |                /
         \            |              /
          \           v             /
           \    Implementation     /
            \         |           /
             \        |          /
              \       v         /
               Acceptance Tests

The approach can be automated if the Mapping rules are consistent and can be repeatedly applied. 如果映射规则一致并且可以重复应用,则该方法可以自动化。 A reverse-y analysis can show whether this is the case. 反向y分析可以显示是否是这种情况。

In case the approach is applicable it will have a profound effect on efficiency. 如果该方法适用,它将对效率产生深远影响。 In stead of having to do the mapping of business issues to technical issues over and over again the process can be made repeatable and eventually automated. 不必一遍又一遍地将业务问题映射到技术问题,过程可以变得可重复并最终实现自动化。

You can find more on this on my companies webpage. 您可以在我的公司网页上找到更多信息。

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

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