yii2-app-practical

Yii 2 Practical Project Template (based on advanced app)

  • 所有者: kartik-v/yii2-app-practical
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Latest Stable Version
License
Total Downloads
Monthly Downloads
Daily Downloads

Yii 2 Practical Project Template is a skeleton Yii 2 application based on the
yii2-advanced template best for
developing complex Web applications with multiple tiers. The template allows a
practical method to directly access the frontend from the app root.

The template includes three tiers: front end, back end, and console, each of which
is a separate Yii application.

The template is designed to work in a team development environment. It supports
deploying the application in different environments.

Why yii2-practical?

After installing an app in the yii2-advanced application you normally would access the
frontend by:

http://domain/app/frontend/web

However, in many practical scenarios (especially on shared and single domain hosts) one
would want their users to directly access frontend as:

http://domain/app

The yii2-app-practical enables you to achieve just that by carefully moving and rearranging the
bootstrap files and web components of frontend to work directly out of the app root. The
frontend/web is entirely eliminated and one can directly access the application frontend
this way:

http://domain/app

All other aspects of the app configuration remain the same as the yii2-advanced app. The common, backend and console
will remain as is. The frontend config, assets, models, controllers, views, widgets and components, will still reside within
the frontend directory. It is just the web access that is moved out to app root.

SOME KEY ADDITIONS

  1. The template has some security preconfigured for users with Apache web servers. It has a default .htaccess security configuration setup.
  2. The template has prettyUrl enabled by default and the changes have been made to .htaccess as well as urlManager
    component config in the common config directory.
  3. The template has isolated cookie settings for backend and frontend so that you can seamlessly access frontend and backend from same client.
    The config files includes special identity and csrf cookie parameter settings for backend. Edit it according to your needs if necessary.

Detailed documentation can be referred at docs/guide/README.md.

DIRECTORY STRUCTURE

/
    /                    contains the frontend entry script, favicon, and robots.txt.
    assets/              contains frontend application runtime web assets such as JavaScript and CSS
common
    config/              contains shared configurations
    mail/                contains view files for e-mails
    models/              contains model classes used in both backend and frontend
    tests/               contains tests for common classes    
console
    config/              contains console configurations
    controllers/         contains console controllers (commands)
    migrations/          contains database migrations
    models/              contains console-specific model classes
    runtime/             contains files generated during runtime
backend
    assets/              contains backend application runtime web assets such as JavaScript and CSS
    config/              contains backend configurations
    controllers/         contains Web controller classes
    models/              contains backend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for backend application    
    views/               contains view files for the Web application
    web/                 contains the entry script and Web resources
frontend
    assets/              contains web assets and scripts used by frontend application
    config/              contains frontend configurations
    controllers/         contains Web controller classes
    models/              contains frontend-specific model classes
    runtime/             contains files generated during runtime
    tests/               contains tests for frontend application
    views/               contains view files for the Web application
    widgets/             contains frontend widgets
vendor/                  contains dependent 3rd-party packages
environments/            contains environment-based overrides

主要指標

概覽
名稱與所有者kartik-v/yii2-app-practical
主編程語言PHP
編程語言PHP (語言數: 4)
平台
許可證Other
所有者活动
創建於2014-04-24 08:44:08
推送於2018-11-05 12:46:42
最后一次提交2018-11-05 18:15:53
發布數7
最新版本名稱v1.5.2 (發布於 )
第一版名稱v1.0.0 (發布於 )
用户参与
星數67
關注者數9
派生數26
提交數68
已啟用問題?
問題數17
打開的問題數3
拉請求數4
打開的拉請求數0
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?