Yii2 advanced template open source mall system examples, examples, DEMO, yii2 framework learning and development necessary

Yii is a high-performance, suitable for developing web2 0 application PHP framework, fast, safe and professional PHP framework.
Yii comes with rich functions, including MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc., which can significantly shorten the development time.
Yii2 officially provides free advanced template framework instance code, but the function is relatively simple. Yii2 developed an open source mall project based on the advanced template. It is free and open source. It can be used for secondary development or learning to see if you can use it.
Front desk presentation: test.shopwind.net
Background presentation: admin.test.shopwind.net (account: admin, password: 123456)
Source code download address: gitee.com/shopwind/yii2-shopwind

Project presentation:

directory structure

├─shopwind------------------------------------------Application directory
│  ├─apiserver-------------------------------------API Interface service module
│  │  ├─config------------------------------------configuration file
│  │  ├─controllers-------------------------------Module controller
│  │  ├─languages---------------------------------Language pack
│  │  ├─library-----------------------------------Module class library
│  │  │  ├─Formatter.php--------------------------Data formatting class
│  │  │  ├─Respond.php----------------------------Data input / output class
│  │  │  └─Signature.php--------------------------Data validation signature class
│  │  ├─models------------------------------------Business layer
│  │  ├─runtime-----------------------------------Application run cache file
│  │  └─web---------------------------------------Web Deployment directory (external access directory)
│  │      └─index.php------------------------------API Entry file
│  ├─backend---------------------------------------Background module
│  │  ├─config------------------------------------configuration file
│  │  ├─controllers-------------------------------Module controller
│  │  ├─languages---------------------------------Language pack
│  │  ├─library-----------------------------------Module class library
│  │  ├─models------------------------------------Business layer
│  │  ├─runtime-----------------------------------Application run cache file
│  │  └─web---------------------------------------Web Deployment directory (external access directory)
│  │      └─assets--------------------------------Static asset publishing directory
│  │      └─templates-----------------------------Template (view) file directory
│  │      └─index.php------------------------------Background entry file
│  ├─common----------------------------------------Public file directory
│  │  ├─actions-----------------------------------Public action directory
│  │  ├─bussiness---------------------------------Business logic layer
│  │  ├─components--------------------------------Common component class library
│  │  ├─config------------------------------------Global profile
│  │  ├─controllers-------------------------------Controller parent class
│  │  ├─install-----------------------------------Installer class
│  │  ├─library-----------------------------------Common logic layer
│  │  ├─mail--------------------------------------Mail sending class
│  │  ├─models------------------------------------Database model class
│  │  ├─plugins-----------------------------------Public plug-in class library
│  │  │  ├─connect-------------------------------Third party login plug-in directory
│  │  │  │  ├─qq--------------------------------qq Login plug-in
│  │  │  │  ├─alipay----------------------------Alipay login plug-in
│  │  │  │  ├─weixin----------------------------Wechat login plug-in
│  │  │  │  └─xwb-------------------------------Sina Weibo login plug-in
│  │  │  ├─express-------------------------------Express tracking plug-in directory
│  │  │  ├─oss-----------------------------------Object store plug-in directory
│  │  │  ├─payment-------------------------------Payment plug-in directory
│  │  │  │  ├─alipay----------------------------Alipay PC Payment plug-in
│  │  │  │  ├─alipay_app------------------------Alipay APP Payment plug-in
│  │  │  │  ├─alipay_wap------------------------Alipay mobile phone payment plugin
│  │  │  │  ├─wxpay-----------------------------WeChat official account payment plug-in
│  │  │  │  ├─wxapppay--------------------------WeChat APP Payment plug-in
│  │  │  │  ├─wxnativepay-----------------------Wechat code scanning payment plug-in
│  │  │  │  ├─wxmppay---------------------------Wechat applet payment plug-in
│  │  │  │  ├─wxh5pay---------------------------WeChat H5 End payment plug-in
│  │  │  │  ├─unionpay--------------------------China UnionPay payment plug-in
│  │  │  │  └─deposit---------------------------Station balance payment plug-in
│  │  │  ├─sms-----------------------------------SMS plug-in directory
│  │  │  └─BasePlugin.php-------------------------Plug in base class 
│  │  └─widgets-----------------------------------Widget class library
│  ├─console---------------------------------------Console directory
│  │  ├─config------------------------------------configuration file
│  │  └─controllers-------------------------------Module controller
│  ├─frontend--------------------------------------Front desk( PC)modular
│  │  ├─config------------------------------------configuration file
│  │  ├─controllers-------------------------------Module controller
│  │  ├─languages---------------------------------Language pack
│  │  ├─library-----------------------------------Module class library
│  │  ├─models------------------------------------Business layer
│  │  ├─resource----------------------------------Resource directory
│  │  ├─runtime-----------------------------------Application run cache file
│  │  ├─widgets-----------------------------------PC End pendant catalog
│  │  └─web---------------------------------------Web Deployment directory (external access directory)
│  │      └─assets--------------------------------Static asset publishing directory
│  │      └─install-------------------------------Program installation directory (portal)
│  │      └─templates-----------------------------Template (view) file directory
│  │      └─index.php------------------------------Front desk( PC)Entry file
│  ├─mobile----------------------------------------Reception H5/WAP modular
│  │  ├─config------------------------------------configuration file
│  │  ├─controllers-------------------------------Module controller
│  │  ├─languages---------------------------------Language pack
│  │  ├─models------------------------------------Business layer
│  │  ├─runtime-----------------------------------Application run cache file
│  │  ├─widgets-----------------------------------H5 End pendant catalog
│  │  └─web---------------------------------------Web Deployment directory (external access directory)
│  │      └─assets--------------------------------Static asset publishing directory
│  │      └─templates-----------------------------Template (view) file directory
│  │      └─index.php------------------------------Front desk( H5)Entry file
├─composer.json--------------------------------------Composer configuration file  
└─vendor-------------------------------------------Third party class library directory

Catalog interpretation

1. The directory under the root directory, such as apiserver frontendbackendmobile, is called an application or site. Each application (site) contains its own set of MVC structure, which can be accessed by resolving different domain names. However, please do not directly resolve the domain name to the application directory, but to the web directory under the application directory. Only this directory is allowed to be accessed externally to ensure the security of the application (site).

2. The directory common under the root directory is the directory of public files. All public files of applications (sites) can be placed in this directory to facilitate repeated calls.

3. The configuration file under each application (site), i.e. the config directory, is the configuration file of the application, mainly including the configuration: route, controller path, view, Session, component, etc., not the database connection configuration file. Our database configuration file is: @ shopwind / front / Web / data / config PHP, all applications share the configuration file, and even multiple databases are written in the configuration file.

Entry file

The entry file is also called the entry script. The entry script is the first step in the application startup process. An application (whether Web application or console application) has only one entry script. The end user's request instantiates the application through the entry script and forwards the request to the application. The entry script of a Web application must be placed in a directory accessible to end users, usually named index php. The following example is the entry file path of each Web application:

Foreground PC side entry file

@shopwind/frontend/web/index.php

Background entry file

@shopwind/backend/web/index.php

Development documentation

Detailed development document link

Tags: Java PHP ASP.NET yii

Posted by bobocheez on Mon, 03 Jan 2022 07:56:30 +1030