简体   繁体   English

使用 WCF RIA 服务,其中数据源不是经典(关系)数据库

[英]Usage of WCF RIA Services, where the datasource isn't a classical (relational) database

I want (have) to write a Silverlight and (or) ASP.NET based webapplication with SAP in the backend (in other words, the datasource is no classical database) .我想(必须)在后端编写一个带有SAPSilverlight和(或)基于ASP.NET的 Web 应用程序(换句话说,数据源不是经典数据库)。 The usage of Silverlight and ASP.NET is a precondition. Silverlight 和 ASP.NET 的使用是前提条件。 Is it possible to use the WCF RIA Services (and Silverlight) where the data-source are RFCs from SAP ?是否可以使用WCF RIA 服务(和 Silverlight),其中数据源是来自 SAP 的 RFC? Makes this sense ?这有道理吗? If yes, how the pattern/architecture could be shortly described ?如果是,如何简要描述模式/架构? Or should I take other architectures into considerations (usage of plain WCF services, WCF data services ,...) ?或者我应该考虑其他架构(使用普通WCF 服务、WCF 数据服务……)?

i may be completly off-track since i'm from the SAP side of the fence, and know nearly nothing about asp, but can't you use a web-service as a datasource ?我可能完全偏离轨道,因为我来自围栏的 SAP 一侧,并且对 asp 几乎一无所知,但是您不能使用 Web 服务作为数据源吗? any SAP RFC function can be changed into such a webservice.任何 SAP RFC 功能都可以更改为这样的网络服务。

regard,看待,
Guillaume纪尧姆

The architectural problem that you are facing, is that SAP is not a data-source.您面临的架构问题是 SAP 不是数据源。 SAP is the business logic layer. SAP 是业务逻辑层。 Trying to force it to act as a mere data-source will probably cause problems down the road.试图强迫它充当单纯的数据源可能会导致问题。

So my advice is to use simple WCF services.所以我的建议是使用简单的 WCF 服务。 Or, if you are using old version of sap, to wait eagerly to the new .net connector .或者,如果您使用的是旧版本的 sap,请急切地等待新的 .net 连接器 Do the presentation layer in .net or silverlight.在.net 或silverlight 中做表示层。 And keep all the logic in sap.并将所有逻辑保持在 sap 中。

There are actually two possible scenarios that you haven't specified which of them your application will be using.实际上有两种可能的方案,您尚未指定您的应用程序将使用其中的哪一种方案。
1. Using a standard sap application. 1. 使用标准的 sap 应用程序。
2. Using a custom(Z) sap application. 2. 使用 custom(Z) sap 应用程序。

In the first option, its clear that sap is doing the logic.在第一个选项中,很明显 sap 正在执行逻辑。 Doing it otherwise will make your application vulnerable to upgrades in the back-end.否则会使您的应用程序容易受到后端升级的影响。
In the second option, you can expose CRUD like interface.在第二个选项中,您可以公开 CRUD 之类的接口。 And try to disguise sap as a data-layer.并尝试将 sap 伪装成数据层。 I think that it will be wrong.我认为这将是错误的。 This entire architecture doesn't make sense.这整个架构没有意义。 But if its forced on you, don't try to "save" it, because it will just make it worse.但是,如果它是强加于您的,请不要尝试“保存”它,因为它只会使情况变得更糟。 Do the logic in sap, and the presentation in .net.在 sap 中做逻辑,在 .net 中做演示。 I think that re-implementing SQL can't be considered an elegant architecture.我认为重新实现 SQL 不能被认为是一种优雅的架构。

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

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