Tutorial_01_Intro

教程_01 _简介

Daniel Nicoletti edited this page on Feb 20, 2019 · 9 revisions

Daniel Nicoletti于2019年2月20日编辑了本页

OVERVIEW

总览

  1. Introduction
  2. Cutelyst Basics
  3. More Cutelyst Basics
  4. Basic CRUD
  5. Authentication

INTRODUCTION

前 言

This tutorial is an adaptation of the great Catalyst Tutorial to match what we currently have in Cutelyst.

本教程是对great Catalyst教程的改编,与我们目前在Cutelyst中的内容相匹配。

DESCRIPTION

说明

This tutorial provides a multi-part introduction to the Cutelyst Web Framework. It seeks to provide a rapid overview of many of its most commonly used features. The focus is on the real-world best practices required in the construction of nearly all Cutelyst applications.

本教程分多个部分介绍Cutelyst Web框架。它试图快速概述许多最常用的功能。重点是几乎所有Cutelyst应用程序的构建所需的实际最佳实践。

Although the primary target of the tutorial is users new to the Cutelyst framework, experienced users may wish to review specific sections (for example, how to add authentication and authorization to an existing application).

尽管本教程的主要目标是刚刚接触Cutelyst框架的用户,但有经验的用户可能希望查看特定部分(例如,如何向现有应用程序添加身份验证和授权)。

Download the tutorial source code

下载教程源代码

These reference implementations are provided so that when you follow the tutorial, you can use the code to ensure that your system is set up correctly, and that you have not inadvertently made any typographic errors, or accidentally skipped part of the tutorial.

提供这些参考实现的目的是,当您遵循本教程时,可以使用这些代码来确保系统设置正确,并且不会无意中出现任何印刷错误,或意外跳过本教程的一部分。

NOTE: Cutelyst can run on any OS supported by Qt, you only need to pay attention to minimum Qt version required. It should make little or no difference to Cutelyst's operation, but this tutorial has been written using the Debian-based Tanglu OS.

注意:Cutelyst可以在Qt支持的任何操作系统上运行,您只需要注意所需的最低Qt版本。这对Cutelyst的操作应该没有什么影响,但本教程是使用基于Debian的Tanglu操作系统编写的。

Subjects covered by the tutorial include:

本教程涵盖的主题包括:

  • A simple application that lists and adds books.
  • 一个列表和添加书籍的简单应用程序。
  • How to write CRUD (Create, Read, Update, and Delete) operations in Cutelyst.
  • 如何在Cutelyst中编写CRUD(创建、读取、更新和删除)操作。
  • Authentication ("auth").
  • 身份验证(“auth”)。
  • Role-based authorization ("authz").
  • 基于角色的授权(“authz”)。
  • Attempts to provide an example showing current Cutelyst practices.
  • 试图提供一个展示当前Cutelyst实践的示例。
  • The use of Grantlee Template (Django).
  • Grantle模板(Django)的使用。
  • Useful techniques for troubleshooting and debugging Cutelyst applications.
  • 用于排除故障和调试Cutelyst应用程序的有用技术。
  • The use of SQLite as a database.
  • 使用SQLite作为数据库。

This tutorial makes the learning process its main priority. For example, the level of comments in the code found here would likely be considered excessive in a "normal project." Because of their contextual value, this tutorial will generally favor inline comments over a separate discussion in the text. It also deliberately tries to demonstrate multiple approaches to various features (in general, you should try to be as consistent as possible with your own production code).

本教程将学习过程作为首要任务。例如,在“正常项目”中,此处代码中的注释级别可能会被认为过高由于它们的上下文价值,本教程通常倾向于内联注释,而不是文本中的单独讨论。它还特意尝试演示各种特性的多种方法(一般来说,您应该尽量与自己的产品代码保持一致)。

Furthermore, this tutorial tries to minimize the number of controllers, templates, and database tables. Although this does result in things being a bit contrived at times, the concepts should be applicable to more complex environments.

此外,本教程将尽量减少控制器、模板和数据库表的数量。虽然这确实会导致事情有时有点做作,但这些概念应该适用于更复杂的环境。

VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL

本教程中使用的版本和约定

This tutorial was built using the following resources. Please note that you may need to make adjustments for different environments and versions:

本教程是使用以下资源构建的。请注意,您可能需要针对不同的环境和版本进行调整:

  • Ubuntu 17.10
  • Cutelyst 2.1.0
  • Qt 5.6
  • Grantlee 5.0
  • SQLite 3

uWSGI can also be used by replacing cutelyst-wsgi2 with uwsgi and loading the cutelyst plugin, Cutelyst-WSGI supports HTTP, HTTPS and FastCGI while being faster, using less memory, and supporting HTTP keep-alive and pipelining), which is enough for production and development even on embedded hardware.

uWSGI还可以通过使用uWSGI替换cutelyst-wsgi2并加载cutelyst插件来使用,Cutelyst-WSGI支持HTTP、HTTPS和FastCGI,同时速度更快,使用更少的内存,并支持HTTP保持活动和流水线),这就足以支持生产和开发,即使是在嵌入式硬件上。

DATABASES

数据库

This tutorial will primarily focus on SQLite because of its simplicity of installation and use; however, modifications in the script required to support MySQL and PostgreSQL will be presented in the Appendix.

本教程将主要关注SQLite,因为它的安装和使用非常简单;不过,支持MySQL和PostgreSQL所需的脚本修改将在附录中介绍。

You can jump to the next chapter of the tutorial here: Cutelyst Basics

​你可以在这里跳到教程的下一章:Cutelyst基础知识

cutelyst教程_01 _简介相关推荐

  1. [医疗信息化][DICOM教程]DICOM标准简介

    [医疗信息化][DICOM教程]DICOM标准简介 使用OsiriX的DICOM标准简介 内容 介绍 什么是DICOM 医院系统内的图像传输 了解DICOM服务 OsiriX提供的DICOM服务 其他 ...

  2. matlab 积分进阶教程,最适合小白的matlab教程系列_进阶系列二之微积分

    微积分篇 更多文章参考 符号变量 极限问题 求导数 求导数----偏导数 积分--符号解 积分数值解 多重积分 级数求和 泰勒级数展开 常微分方程 更多文章参考 最适合小白的matlab教程系列_基础 ...

  3. 用python做自我介绍_用python做个自我介绍(python入门教程)_逻辑教育

    原标题:用python做个自我介绍(python入门教程)_逻辑教育 本文涉及的python基础语法为:数据类型等 数字类型 1. 字符串的拼接 我们在上一章中已经简单介绍了一下字符串的创建方式,这里 ...

  4. Android精通教程-Android入门简介

    前言 大家好,我是 Vic,今天给大家带来Android精通教程-Android入门简介的概述,希望你们喜欢 每日一句 If life were predictable it would cease ...

  5. 手把手的K-means聚类算法教程(含简介及教育数据应用实例 Python实现)

    手把手的K-means聚类算法教程(含简介及教育数据应用实例 Python实现) 1. K-MEANS的基本原理 2. 数据预处理 2.1 数据读取:from Excel 2.2 数据预处理:标准化Z ...

  6. 最适合小白的matlab教程系列_进阶系列二之微积分

    微积分篇 更多文章参考 符号变量 极限问题 求导数 求导数----偏导数 积分--符号解 积分数值解 多重积分 级数求和 泰勒级数展开 常微分方程 更多文章参考 最适合小白的matlab教程系列_基础 ...

  7. 【乐绘派】Audition专业音频后期制作教程 | 1-软件简介

    Audition专业音频后期制作教程 | 1-软件简介

  8. node-red教程1 node-red简介

    编者的话 • 一个偶然的机会,认识了node-red.这种拖拽控件编写代码的方式给了我很深刻的印象.由于我平时工作偏向硬件,所以对这些华丽的前端技术技术不是很了解,但个人认为,node-red技术在搭 ...

  9. TM4C123GLaunchPad教程三_外部中断

    TM4C123GLaunchPad教程三_外部中断 介绍 ​ TM4C的每个IO口都可以分别配置外部中断,每组IO口对应一个中断服务函数,例如PA0-PA7对应同一个中断服务函数,每个IO口可以配置为 ...

最新文章

  1. springcloud(二):注册中心Eureka
  2. 小白兔想的飞鸽传书(173dmba)安卓版
  3. python日志,支持彩色打印和文件大小切片写入和写入mongodb
  4. 手环升级鸿蒙设备名单,定档6月2日!鸿蒙“首批”升级名单公布,共计11款华为机型!...
  5. 如何编写字符设备驱动
  6. 华硕主板怎么开启tpm2.0
  7. MVC HtmlHelperTModel 类
  8. (转)主成分分析(Principal components analysis)-最大方差解释
  9. ajax以base64上传图片到django
  10. 服务如何获取当前登录的windows用户名
  11. 2017云栖大会Tech Insight亮点大剧透
  12. oracle如何导入用户数据文件,oracle的dmp数据文件的导出和导入以及创建用户
  13. 单点故障解决方案介绍smart link/monitor link /stp
  14. 利用TF_IDF算法计算两英文文章的文本相似度 C++实现
  15. html名人名言页面,网页制作:关于生命的名言警句 ― 名人名言  一品故事网,Www.07938.Come...
  16. 矩阵论笔记(二)——线性变换
  17. LLC输出滤波电容选择
  18. Python爬虫入门之爬虫解析提取数据的四种方法
  19. centos linux开机启动项,Centos 配置开机启动项
  20. Python通过类的组合模拟街道红绿灯

热门文章

  1. 20系列显卡服务器,关于20系列的DLSS
  2. NDP1415 40V输入20A外置MOS大电流同步降压控制器IC
  3. MT6737芯片尾缀资料介绍
  4. ERROR Deployer not found: git
  5. 我的软考之路(四)——数据结构与算法(2)之树与二叉树
  6. 【web压测】压测常用工具、压测指标到底是什么?
  7. 特斯拉高管揭秘自动驾驶技术:48种神经网络上阵,最多可检测1000种物体
  8. c语言remainder函数,remainder
  9. 奇虎360温铭:OpenResty的未来
  10. 【统计分析系统--SAS介绍】