创建自定义的服务 v1.00+(适用以后版本)

kbmMW使用一个不同术语调用---服务支持的RPC,或者远程过程调用。

一个服务就是在可用被客户端通过远程过程调用访问的服务器上的一组业务逻辑(或者业务对象。这是另一个术语)。在正常的2层架构的应用程序中,服务器端通常根本不包含任何业务逻辑,有的只是一些数据库之类中的未被加工的数据形式。在多层架构中(通常为3层),服务器上有两层(或者两个服务)--数据库服务器和应用服务器。与客户端业务逻辑相关的代码(比如,特殊计算、数据库查找)均放在客户端相反,这些代码被移入了服务器端应用服务上的一个服务对象中。这样做的好处是它相比升级上百个客户端维护一个服务器更好。再进一步,它使得具有很多个类型的客户端使用业务逻辑更方便。他们可以简单调用具有业务逻辑代码的应用服务器。

这片文档将要告诉你两种创建服务的方法,简单的使用向导和手动方式。为了更好的理解服务的内部工作,强烈建议你阅读手动方法,即使你选择了使用向导方法来创建服务。

我们的例子,我们创建了一个新服务(KBMM_TIME)1.0版本,当客户端调用时来返回服务器时间。

神奇的向导

最容易创建一个新服务的方法是使用KBMMW服务向导。 File->New (->Others for Delphi 6):

这将在你被要求选择你想要创建服务类型的地方打开有初始化对话窗口的向导,你有很多依靠你的安装的注册服务。为了创建一个简单的业务对象,你需要正常的选择来基于它的自定义服务、简单服务或者事件驱动的服务之一,在向导中不同服务的描述中获取更多的信息。

本文档中示例,我们想要创建一个自定义服务

'Extend the service' 复选框意味着你创建一个派生与服务而不是只是使用它,如果你想要创建它自己本身,向导将会告诉你添加什么到你的项目中来来使用它。

Creation of customized services
for kbmMW v. 1.00+
kbmMW supports RPC, or Remote Procedure Calls, using a different term – services.
A service is a grouping of business logic (or business objects which is another term) on the server
which can be accessed by clients through remote procedure calls.
In a normal 2-tier application, the server side often does not contain any business logic at all, but
only the raw data in the form of a database of some kind. In the n-tier architecture (usually 3-tier)
there are two tiers (or servers) on the server side – the database server and the application server.
Instead of placing business related code (e.g. special calculations, lookups in databases,
screenscraping on backend host systems etc.) in the client, this code would be moved to a service
object on the server side application server.
The benefits of this are that it is much easier to maintain one server than to have to upgrade 100s of
clients. Further, it makes it much easier to have several different types of clients use the business
rules, since they would not have each of them to contain the business code themselves. They would
instead simply call the application server that contains the business code.
This document will show two ways to create services, the easy way using a wizard and the manual
way.
To better understand of the inner workings of services, it is strongly suggested that you read the
manual method even if you choose the wizard for creating new services.
For our example, we will create a new service (KBMMW_TIME) version 1.0 which will return the

server time to the client when called

The magic of wizards
The easiest way to create a new service is to use the kbmMW Service Wizard.
Find it in File->New (->Others for Delphi 6):

神奇的向导

最容易创建一个新服务的方法是使用KBMMW服务向导。 File->New (->Others for Delphi 6):

This will start the wizard with this initial dialog where you are asked to choose the type of service
you want to create. You have several choices depending on the types of registered services on your
installation. For creating a simple business object, you would normally either choose to base it on
Custom service, Simple service or Eventoperated service. Read more about the different services in
the description in the wizard.

这将在你被要求选择你想要创建服务类型的地方打开有初始化对话窗口的向导,你有很多依靠你的安装的注册服务。为了创建一个简单的业务对象,你需要正常的选择来基于它的自定义服务、简单服务或者事件驱动的服务之一,在向导中不同服务的描述中获取更多的信息。

For the example in this document we want to create a custom service.

The 'Extend the service' checkbox means you are creating a descendent of the service (adding new
functionality) instead of using it as is. If you would use as is, the wizard would tell you what to add
to your project to use it.
All services are automatically registered in the registry for the benefit of the wizard. By selecting
the 'Service administration' tab, that information can be viewed and altered.
After selecting the Custom service, click Next.

KBMMW-创建自定义服务相关推荐

  1. Windows下创建自定义服务的正确姿势(InstrsrvSrvany)

    总览 Windows NT工具包(Windows NT Resource Kit)提供了两个小工具,可以让我们创建自定义服务(适合于NT应用和一些16进制应用,批处理除外).两个工具包的下载地址:CS ...

  2. 在linux下创建自定义service服务

    三个部分 这个脚本分为3个部分:[Unit] [Service] [Install]. Unit Unit表明该服务的描述,类型描述.我们称之为一个单元.比较典型的情况是单元A要求在单元B启动之后再启 ...

  3. 42.angularJS自定义服务

    转自:https://www.cnblogs.com/best/tag/Angular/ 1. 你可以创建自定义服务,链接到你的模块中: 1 <!DOCTYPE html> 2 <h ...

  4. 7.ROS编程学习:自定义服务数据c++调用

    目录 一.准备工作--配置vscode 二.服务端创建 1.创建文件demo01_server.cpp 2.服务端的CMakeList.txt配置 3.测试服务端 三.客户端实现 1.创建domo01 ...

  5. 升级java包_升级自定义服务包 (Sun Java System Delegated Administrator 6.4 管理指南)

    升级自定义服务包 本节仅针对从 Communications Services 6 2005Q4 Delegated Administrator 升级到 Delegated Administrator ...

  6. 如何使用Create-React-App和自定义服务人员构建PWA

    Note: This is not a primer on create-react-app or what a service worker is. This post assumes prior ...

  7. C#创建windows服务并定时执行

    一.创建window服务 1.新建项目-->选择Windows服务.默认生成文件包括Program.cs,Service1.cs 2.在Service1.cs添加如下代码: System.Tim ...

  8. C# 创建Windows服务。服务功能:定时操作数据库

    一.创建window服务 1.新建项目-->选择Windows服务.默认生成文件包括Program.cs,Service1.cs 2.在Service1.cs添加如下代码: System.Tim ...

  9. Dockerfile创建自定义Docker镜像以及CMD与ENTRYPOINT指令的比较

    1.概述 创建Docker镜像的方式有三种 docker commit命令:由容器生成镜像: Dockerfile文件+docker build命令: 从本地文件系统导入:OpenVZ的模板. 关于这 ...

最新文章

  1. 【组队学习】【34期】Python(一级)
  2. luoguP2479 [SDOI2010]捉迷藏
  3. Day 49 Nginx
  4. PS制作高光导航背景
  5. 一封绝妙的情书 An Ingenious Love Letter
  6. ASP.NET 程序优化
  7. linux 防arp 带宽,linux下防arp
  8. Ubuntu 下安装tomcat和配置eclipse的遇到的问题的一点心得。
  9. NAT综合实验(华为)
  10. mysql truncate 日期_(LINQ to Entities)使用日期判断条件Truncate日期函数
  11. PHP 获取微视无水印源地址_最新抖音短视频无水印地址解析原理(抖音免费解析接口),以PHP代码为例...
  12. php 随机几率,php 随机概率程序算法
  13. 捋一捋Python中的Dict(下)
  14. 阿里云邮箱25端口被关闭,改用465端口Java发送邮件
  15. SpringBoot Mybatis 读写分离配置
  16. 华为又一黑科技:AR高精地图服务即将上线
  17. 照片美妆---卷积“换脸”
  18. 招商银行资金管理解决方案
  19. 屏幕小于6英寸的手机_2019有哪些小屏手机 8款6英寸以下小屏全面屏手机推荐
  20. Compose搭档 — Flow、Room

热门文章

  1. CoinCola可盈可乐研究院2月报 | 加密货币集体上涨
  2. Spring Boot使用方法小札(3):应用启动后做一些事
  3. Cairo 图形指南 (5) —— 形状与填充
  4. Python爬虫新手入门教学(十):爬取彼岸4K超清壁纸
  5. CTF比赛解析备课与教学:漏洞扫描
  6. OpenWrt-路由器上的linux
  7. 免费的Office办公套件LibreOffice for Mac
  8. 产品基础训练 - Persona[用户画像]
  9. Problem G Ray in the tube(思维)
  10. c语言和java哪个好学_学java前要学C语言吗?java和C语言哪个好学?