使用Cairngorm工作的时候,很多开发者想知道关于业务委派(Business Delegate) 的效用以及他们的命令是否可以不那么简单地通过服务定位器来调用服务。
基于64个网页-相关网页
业务委派组件调用该服务,并将任何返回值打包为模型对象。
The business delegate component invokes the service and wraps any return value as a model object.
因为示例应用程序包含了一个业务委派类,所以我们在其中放置了验证逻辑。
Because our example application included a business delegate class, we placed the validation logic there.
可以从诸如业务委派等其它类上调用清单 1 中的简单方法,以按需执行验证逻辑。
Note that the simple methods in Listing 1 can be called from other classes, such as our business delegates, to perform validation logic as needed.
应用推荐