Code Monkey home page Code Monkey logo

apiart's Introduction

Api文档管理系统


作者:dzer <email:[email protected] blog:dzer.me>
创建时间:2015/10/30 ‏‎10:47:43
最后修改时间:2015/10/30 15:30:13 

1.网站概述

该网站采用Yii2.0框架编写,主要用于API接口文档的管理和接口调试,方便后台人员对接口的添加、更新维护、多人通知等,方便客户端人员对接口的调试。

2.功能模块

#####2.1 文档管理 - 项目管理 - 模块管理 - 接口管理 - 操作历史记录 - 接口変更通知 - 文档导出

#####2.2 调试功能 - 自动填充字段 - 自定义字段(包括header等) - 记录历史操作 - 暂支持POST、GET、PUT、DELETE #####2.3 用户管理 - 注册 - 项目成员邀请 - 权限管理(包括文档操作管理,查看调试功能管理)

##3.域名、服务器 demo地址:apiart.dzer.me

##4.web规范 #####4.1 框架 采用Yii2.0框架,Yii是一个快速,安全,易于开发的框架。 #####4.2 编码规范 严格遵守PSR-2 和 Yii编码规范。 编码规范概述:

  • 文件必须使用 <?php 或 <?= 而不是<?
  • 文件结尾必须有一空行
  • 文件只用不带BOM的UTF-8编码格式
  • 使用4个空格而不是tab分隔(如使用IDE 请设置tab为4个空格)
  • 类名风格: StudlyCaps.
  • 类的常量使用全大写加下划线的命名风格
  • 方法和属性命名使用驼峰风格
  • 私有属性命名以下划线为前缀
  • 使用 elseif 而不是 else if.

详细规范参考:Yii代码规范

#####4.3 注释规范 严格遵守phpDocumentor格式

  • 在每个文件首页添加注释说明
  • 在每个类或每个函数、方法上方添加注释说明
  • 对有必要的变量的功能、范围、默认条件加上注释
  • 对复杂的逻辑算法加注释

##5.数据库规范 #####5.1 数据库设计规范

  • 字符集全部采用UTF-8
  • 所有数据表第一个字段都是主键自增id,不可空
  • 避免使用触发器
  • 表引擎尽量使用InnoDB(不需要事务或没有关联类型的表可使用myisam引擎 如:日志类型的表)
  • 每个表和字段必须写相应的详细注释

#####5.2 命名规范

  • 数据库表名和列名都使用小写命名
  • 命名中的单词应使用下划线分割(例如 user_info)
  • 表名使用一个通用前缀api_
  • 表名和列名回避mysql的保留字

##6.版本发布规范 采用git管理代码版本,托管在github,master为稳定发布版,dev分支为开发版,如有其他协作人员建立相应分支进行开发。

git地址:https://github.com/dzer/apiart

apiart's People

Contributors

dzer avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.