cobol 教程_现代COBOL:微服务教程

cobol 教程

You will learn and implement a microservice in COBOL without Mainframe. You will structure the project, manage dependencies, implement automatic tests and build virtualized execution environment. Finally, you will publish the microservice on GitHub under Continuous Integration workflow.

您将在没有大型机的情况下在COBOL中学习和实现微服务。 您将构建项目,管理依赖关系,实施自动测试并构建虚拟化的执行环境。 最后,您将在持续集成工作流下在GitHub上发布微服务。

前提条件 (Preconditions)

You have learned basic principles, methods and standards of COBOL. In this tutorial we’ll use GnuCOBOL — a free COBOL compiler which implements a substantial part of the COBOL 85, COBOL 2002 and COBOL 2014 standards and X/Open COBOL, as well as many extensions included in other COBOL compilers.

您已经学习了COBOL的基本原理,方法和标准。 在本教程中,我们将使用GnuCOBOL —一个免费的COBOL编译器,该编译器实现了COBOL 85,COBOL 2002和COBOL 2014标准以及X / Open COBOL的大部分内容,以及其他COBOL编译器中包括的许多扩展。

You are familiar with HTTP protocol — request and response formats.

您熟悉HTTP协议 -请求和响应格式。

You have Docker, a command-line virtualization tool, installed.

您已经安装了Docker (一种命令行虚拟化工具)。

You have NPM, a package manager for JavaScript programming language, installed.

您已经安装了NPM ,它是JavaScript编程语言的软件包管理器。

You have Git, an open source distributed version control client, installed.

您已经安装了Git (一个开源的分布式版本控制客户端)。

You have GitHub account for publishing of the microservice.

您具有用于发布微服务的GitHub帐户。

You may use any text editor you like, but I recommend Visual Studio Code (or its open-source version VSCodium) with COBOL-syntax extension bitlang.cobol installed.

您可以使用任何喜欢的文本编辑器,但是我建议安装Visual Studio Code (或其开放源代码VSCodium )并安装COBOL语法扩展名bitlang.cobol

TLDR (TLDR)

Complete source-code of this tutorial you can see on GitHub.

您可以在GitHub上看到本教程的完整源代码。

技术指标 (Specifications)

One of strengths of COBOL is a decimal mathematics. In this tutorial we’ll create a high-precision currency exchange microservice that exposes HTTP API and returns EUR amount in JSON format.

十进制数学是COBOL的强项之一。 在本教程中,我们将创建一个高精度的货币兑换微服务,该服务公开HTTP API并以JSON格式返回EUR金额。

Let’s say, the microservice awaits HTTP request GET /currency/amount on port 8000 and respond JSON {"amount": amount}, where

假设微服务在端口8000上等待HTTP请求GET / currency / amount并响应JSON {“ amount”:amount} ,其中

  • currency is a tree-letter ISO currency code, i.e. USD

    currency是一个树状字母的ISO货币代码,即USD

  • amount

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值