前言

UT框架(全称UsualTool Framework,简写UT、UTFrame、UTFramework)是基于PHP的多端应用开发框架。

UT框架内置几乎所有关系数据库或非关系数据库的类库,拥有可自定义的模板引擎、语言本地化解析器及各种函数库。轻便简易的开发模式使开发者更容易理解流程、上手开发。使用UT虽然需要PHP基础知识,但更多的是对UT函数方法的调用,这将节省更多的开发时间。

GitHub release (latest by date including pre-releases) GitHub GitHub last commit GitHub code size in bytes

第一个hello world程序

与传统MVC区别

传统MVC中,控制器用来调用模型和视图,模型获取并处理数据,视图再将数据进行美化向终端输出。其过程多采用面向对象方式进行封装,虽然在标准化、工程化等维度上有优势,但其往往会将最简单的事情过度复杂化,过度封装严格按照既定模式,亦可能造成性能下降。

UT在设计之初,借鉴了MVC架构优点,整体使用1个控制器入口来调用所有模型和视图,侧重模型间独立而又紧密的联系,最终形成了模块化开发模式,对模型代码不强制封装。在一个模块中,缓存、模板视图、模型代码互相紧密联系;在整个应用中,模块间互相联系且又相互独立,可以输出模块化视图,亦可输出整体工程化视图。

文书

Copyright © 2018-2022 by UT (UsualTool Framework) All rights reserved.
您需要明确,UT核心(框架)是基于Apache2.0协议使用, 您可以通过http://www.apache.org/licenses/LICENSE-2.0了解或下载到详尽的协议内容。
You need to be clear that the UT core (framework) is based on the Apache 2.0 protocol, and you can read or download the detailed protocol from the http://www.apache.org/licenses/license-2.0.
您需要明确,UT可视包(开发后端)可以免费使用,亦可以用于商业用途, 但必须遵循可视包的使用协议,保证可视包原始著作权人的相应权利不被损害和侵犯。
You need to be clear that the UT visual package (development backend) can be used for free or for commercial purposes, However, the use agreement of the visual package must be followed to ensure that the corresponding rights of the original copyright owner of the visual package will not be damaged and infringed.
UT(框架或可视包)若包含第三方资源,在发布时可能进行了简化,但您在使用时,请务必遵循其要求进行署名或使用,我们将不对此担责。
If UT (framework or development backend) contains third-party resources, it may be simplified at the time of release, but when you use it, be sure to follow its requirements for signature or use, we will not be responsible for this.
您自愿使用UT(框架或可视包),必须了解可能存在的风险,需要明确UT著作权人与开源参与者不对任何使用UT的行为或目的提供任何明确的或隐含的赔偿或担保。
If you voluntarily use UT (framework or development backend), you must understand the possible risks and make it clear that the UT copyright owner and open source participants will not provide any explicit or implicit compensation or guarantee for any behavior or purpose of using UT.
安装UT(框架或可视包)即表明您已经明确理解并同意相应协议,包括在您所在国的法律法规所允许的范围内合法使用UT,并且独立承担所有法律责任及义务。
Install UT (framework or development backend) that you have a clear understanding and consent to the corresponding agreement, can be in your country's laws and regulations within the scope of use UT, can independently assume all legal responsibilities and obligations.

UT框架开发结构图

┌─── app 应用目录 Application
────├─── assets 资源 Resource
────├─── admin 后端示例 Admin
────────└───index.php 后端示例控制器 Admin controller
────├─── log 日志 Log
────├─── modules 模块 Module
────────└───ut-frame 公共默认模块 Common module
────────├────├─admin 后端模型 Admin model
────────├────├─cache 缓存编译 Cache
────────├────├─skin 视图 View
────────├────────├─admin 后端视图 Admin view
────────├────────└─front 前端视图 Client view
────────├────├─front 前端模型 Client model
────────├────────├─error.php 错误页 Error page
────────├────────└─index.php 前端示例文件 Client example file
─────────────└─usualtool.config 配置引导 Configure
────├─── plugins 插件 Plugin
────├─── template 模板工程 Formwork
────────└───模板名称 Template Name
─────────────├─assets 静态资源 Static Resources
─────────────├─move 安装时覆盖的文件 Files overwritten during installation
─────────────├─skin 视图 View
────────────────├─ut-frame 公共模块模型视图 Common module model-view
────────────────────├─admin 后端视图 Admin view
────────────────────├─cache 缓存 Cache
────────────────────└─front 前端视图 Client view
────────────────└─其他模块模型视图 Other module model-view
─────────────└─usualtool.config 配置引导 Configure
────└─── config.php 应用配置文件 Application configure
├─── lang 语言包 Language package
├─── library 类库 Class library
├─── update 更新包目录 Update
├─── vendor 依赖库目录
├─── .ut.config 全局配置 Global configuration
├─── autoload.php 自动加载 Automatic file loading
├─── index.php 前端控制器 Client Controller file
├─── usualtool 命令行服务端 Command line
└─── UTVER.ini 版本号 Version

文档有错误?
反馈:292951110@qq.com

定位至目录

始于2018年,UT框架版权归原作者所有.
开放、包容、发展。 工单 | 团队 | 蜀ICP备2024067013号