CREATE MVC PLUGINS FOR WORDPRESS
- The Framework of Choice of Mad Sciencists -
Simple to install and update
After installing the framework you can start using it by just typing two lines of code. To customize it just add a config file in the root folder of your Plugin. Complex? Just use the SCI WP Starter Template.
A Couple of Things About SCi WP
MVC Pattern
The MVC Pattern allows you to organize better your code by creating a logical separation among models, controllers and views, including the bussiness logic withing services.
SCI WP extends WordPress including most of the functionalities and tools you can find in modern PHP frameworks, like Autoloading and Dependency Injection.
Improved Router
Create routes in the same way you do it with Laravel. SCI WP Framework includes a brand new HTTP router which allows you to directly link a closure function, a class method, a view or a file.
The bundled API router also provides an easier way of creating API routes for WordPress.
Easy to use ORM
SCI WP integrates an easy to use ORM. You can map database tables to models by just creating a class. You can then customize table tames, default attributes, timestamps and more.
You can then create database queries against the models in order to get one or many records which will be mapped to create model instances with the retrieved attributes. The included Query Builder allows to create queries from the database and also from any model.
Service Providers
Service providers allow to configure the plugin and to execute sets of tasks when the framework is loaded.
This is where you should configure services, define singletons or even routes. It's also the best place to bind things into the service container, which is in charge of injecting dependencies.
Asset Manager
In WordPress you need to create several functions to add a simple CSS or JS file into the website header.
SCI WP Framework you can just register scripts and styles with one line of code, or define them in the config file of each plugin using the framework.
Use WordPress Standards
Instead for providing a different way of doing things which WordPress already does, SCI WP extends WordPress functionalities so you can continue to use the WordPress standards you are used to.
Bundle Sci WP With your Plugin
You can include the framework with your plugin by just using three lines of code. Namespace in the framework code will be replaced for you when you enable your plugin. It's also possible for any plugin which may extend yours to use the framework.
Who built SCI WP
" Built this framework to better organize code in my plugins, also in the hope it's useful for more people. "
" I will make a new robot with laser eyes and a rocket launcher. I will have such a good time. "