简体   繁体   English

从表示层进行服务层调用

[英]Making a Service Layer call from Presentation layer

I have to choose a technology to connect my Application/Presentation Layer (Java Based) with the Service Layer (Java Based). 我必须选择一种技术来连接我的应用程序/表示层 (基于Java)和服务层 (基于Java)。 Basically looking up appropriate Spring Service from the Business Delegate Object. 基本上从业务代表对象中查找适当的Spring服务。

There are so many options out there that it is confusing me. 那里有很多选择让我很困惑。 Here are the options I've narrowed down to but not sure.. 以下是我缩小到但不确定的选项..

  • Spring RMI 春季RMI

  • Apache Camel Apache Camel

  • Apache ServiceMix (ESB) Apache ServiceMix(ESB)

  • Iona FUSE (ESB) Iona FUSE(ESB)

Here is what I want to know 这是我想知道的

  1. If you have worked on (or evaluated) any of these, which choice do You think is more appropriate? 如果您已经(或评估过)其中任何一项,您认为哪种选择更合适? (and it wouldn't hurt to tell me why :) (并告诉我为什么:)不会有害
  2. Are there other technologies that I should be looking at as well? 我还应该关注其他技术吗?
  3. As of now I do not see Application and Service layer being distributed but I do not want to rule out this possibility in future. 截至目前,我没有看到应用程序和服务层正在分发,但我不想在将来排除这种可能性。 Is this a good idea to design to provide this flexibility? 设计提供这种灵活性是一个好主意吗?

Any help would be useful. 任何帮助都会有用。 Thanks! 谢谢!

Spring Remoting would seem like the simplest approach. Spring Remoting似乎是最简单的方法。 It also would leave you open to more complex approaches in the future if that is the direction you want to take. 如果这是您想要采取的方向,它还将使您在未来对更复杂的方法持开放态度。

From the limited view of your requirements, I would stick with a simple solution with a lower learning curve, and leave the ESB till you determine you actually need it. 从有限的需求角度来看,我会坚持使用一个学习曲线较低的简单解决方案,然后离开ESB,直到确定您确实需要它为止。

The KISS principle is a wonderful thing. KISS原则是一件很棒的事情。

It mostly boils down to do you want to use Spring Remoting (which Spring RMI and Apache Camel are implementations of) - or do you want to use JAX-WS for web services (which CXF or Metro implement). 它主要归结为您是否希望使用Spring Remoting(Spring RMI和Apache Camel是其实现) - 或者您是否希望将JAX-WS用于Web服务(CXF或Metro实现)。 ie do you want automatic remoting for your POJOs - or do you want WS with WSDL contracts and so forth. 即,您是否希望自动远程处理POJO - 或者您是否希望WS与WSDL合同等等。

Once you've decided on the remoting technology; 一旦你决定了远程技术; your next decision is do you want to bundle it inside your application as a library (eg Spring RMI or Camel) - or do you want to deploy it in an ESB container like ServiceMix to be able to hot-redeploy modules and so forth. 您的下一个决定是,您希望将其作为库(例如Spring RMI或Camel)捆绑在应用程序中 - 或者您是否希望将其部署在像ServiceMix这样的ESB容器中以便能够热重新部署模块等等。

If the latter is your choice then use Apache ServiceMix - or use the FUSE ESB if you want a commercial distribution with more documentation, frequent releases, commercial support and so forth. 如果后者是您的选择,那么使用Apache ServiceMix - 或者如果您想要具有更多文档,频繁发布,商业支持等的商业发行版,请使用FUSE ESB。

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

相关问题 我们能否在不影响服务层的情况下处理从dao层到表示层的异常(服务层中没有任何修改) - Can we handle a exception from dao layer to presentation layer without impacting the service layer(no modification in service layer) 将变量从表示层传递到逻辑层 - Pass variables from Presentation Layer to Logic Layer 如何将smartGWT(表示层)与Spring服务集成? - How to integrate smartGWT(presentation layer) with Spring service? 将 Presentation Modal 对象传递给服务和业务层 - Passing Presentation Modal objects to the service and business layer 使用Spring从控制器层调用存储库和服务 - Call repository and service from controller layer with Spring 控制器属于表示层? - Controller belongs to the Presentation layer? mvc呼叫服务层方法 - mvc call service layer method 如何从Java 9中新创建的层中的模块调用服务? - How to call a service from module in a new created layer in Java 9? 如何从spring boot服务层调用java类方法 - How to call a java class method from spring boot service layer spring security中的手动认证逻辑应该放在哪里 - 服务层或表示层? - Where should the manual authentication logic in spring security go - Service layer or presentation layer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM