spreling/yii2-template

Yii 2 Spreling 项目模板

1.0 2015-08-25 12:34 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:26:36 UTC


README

这是一个用于开发具有多个层次的复杂 Web 应用的最佳框架 Yii 2 应用骨架。它源于 Yii 2 高级项目模板

该模板包括三个层次:前端、后端和命令行界面,每个层次都是一个独立的 Yii 应用。

该模板旨在在团队开发环境中使用,支持在不同环境中部署应用。

除了 Yii 2 高级项目模板外,还对目录结构进行了重构。该模板基于模块的概念构建,甚至核心组件也被封装在模块中。通过这种方式,可以轻松地将预构建的模块集合部署到骨架中,快速构建网站。

文档位于 Wiki

Latest Stable Version Total Downloads

目录结构

_common
    engine/
        config/          contains shared configurations
        modules/         contains all the modules used in both backend and frontend    
          core/          contains the core files for this skeleton used in both backend and frontend  
           models/       contains model classes used in both backend and frontend
    vendor/              contains dependent 3rd-party packages
_environments            contains environment-based overrides
_init                    contains script for environment-based overrides and a requirements check script
backend
    engine/
        config/          contains backend configurations
        modules/         contains all the modules used in the frontend    
          core/          contains the core files for this skeleton used in the frontend
            components/  contains Web component classes
            controllers/ contains Web controller classes
            models/      contains backend-specific model classes
            views/       contains view files for the Web application
            widgets/     contains frontend widgets
    web/                 contains the entry script and Web resources 
      assets/            contains application assets such as JavaScript and CSS
      css/               contains css that is not generated by the application
      resources/         contains all the resource needed for the website except CSS and Javascript
    runtime/             contains files generated during runtime
console
    engine/
        config/          contains console configurations
        modules/         contains all the modules used in the console    
          core/          contains the core files for this skeleton used in console
            controllers/ contains console controllers (commands)
            models/      contains console-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains various tests for the advanced application
frontend
    engine/
        config/          contains frontend configurations
        modules/         contains all the modules used in the frontend    
          core/          contains the core files for this skeleton used in the frontend
            components/  contains Web component classes
            controllers/ contains Web controller classes
            models/      contains frontend-specific model classes
            views/       contains view files for the Web application
            widgets/     contains frontend widgets
    web/                 contains the entry script and Web resources 
      assets/            contains application assets such as JavaScript and CSS
      css/               contains css that is not generated by the application
      resources/         contains all the resource needed for the website except CSS and Javascript
    runtime/             contains files generated during runtime