现代MVC WordPress框架

对于WordPress社区来说,这是一个激动人心的时刻,人们对现代编程实践的兴趣越来越大,越来越多的人熟悉Laravel等框架。作为回应,许多用于WordPress的MVC框架如雨后春笋般涌现,以帮助使其更强大、更可扩展和更可维护。

想知道其中一些框架是如何堆叠的吗?我们也是!我们比较了WordPress的6个MVC框架/插件/入门主题,并整理了一个方便的功能比较表。

Lumberjack – 建立在Bedrock和Timber之上的框架

Sage – 由Bedrock背后的团队构建的入门主题

Themosis – 一个建立在Symfony & Laravel软件包之上的框架

Timber – 一个提供Twig和一些MVC功能的插件

TypeRocket – 一个具有一些附加管理UI/功能增强功能的框架

WP Emerge – 框架和入门主题

Feature Comparison

LumberjackSage (with Bedrock)ThemosisTimberTypeRocketWP Emerge
GENERAL
LicenseMITMITGPL-2MITGPL-3GPL-2
DependenciesPHP 7.1+PHP 7.1+ & Node 8+PHP 7.1+PHP 5.3+PHP 7.2+PHP 5.5+
Composer Support✔︎✔︎✔︎✔︎✔︎✔︎
Environmentsdotenvdotenvdotenv
Configuration✔︎✔︎✔︎✔︎✔︎
Error Handling✔︎✔︎✔︎✔︎
Logging✔︎PSR-3✔︎✔︎
HTTP
TemplatingTwig [1]BladeBlade & TwigTwigTwig & customBlade & Twig
Controllers✔︎✔︎ [2]✔︎✔︎✔︎✔︎
Class based✔︎✔︎✔︎✔︎✔︎
View Composers✔︎✔︎✔︎
Server-side Routing✔︎✔︎✔︎✔︎✔︎
Method filtering✔︎✔︎✔︎✔︎
Named Routes✔︎✔︎✔︎
HTTP Messages✔︎PSR-7✔︎Laravel✔︎Laravel style✔︎PSR-7
Middleware✔︎PSR-15✔︎Laravel✔︎Laravel style✔︎
On routes✔︎✔︎✔︎✔︎
On Controllers✔︎✔︎✔︎
Session✔︎✔︎✔︎✔︎
Persistant✔︎✔︎✔︎
Flash✔︎✔︎✔︎✔︎
Extendable Backends✔︎✔︎
DATA
Post Classes✔︎ [1]✔︎✔︎ [3]
QueryBuilder✔︎✔︎✔︎
Post based✔︎✔︎
SQL based✔︎✔︎
Custom Post Meta Fields✔︎✔︎
THEME FEATURES
FrontendBootstrap 4, Bulma, Foundation, Tachyons or TailwindWebpack & Laravel MixWebpack & Laravel MixWebpack, Sass & PostCSS
Page Builder✔︎
Custom Meta Fields✔︎
ADVANCED
DI Container✔︎PSR-11✔︎Laravel✔︎✔︎Pimple
Service Providers✔︎✔︎✔︎✔︎
Database Migrations✔︎✔︎
CLI✔︎Hatchet [4]✔︎Node Based✔︎✔︎Node Based [4]✔︎Galaxy✔︎
Test Coverage✔︎89%✔︎✔︎94%✔︎✔︎92%

Was this helpful?

0 / 0

发表回复 0