This tool is the result of a master's thesis in MDSE research group at Isfahan University and contains a set of Eclipse plugins that enable you to generate a WordPress plugin by graphical modelling. We use a Model-Driven approach to generate codes from the model.
WPCrudRest framework is currently only available as a plugin for Eclipse. It used Sirius to provide a graphical modelling environment and Acceleo to transform models to code.
WPCrudRest Framework and created WordPress plugin demo:
You can participate in the evaluation of the WPCrudRest framework through the following links:
This tool deployed and tested successfully on:
- Windows 10 64X
- Eclipse Modeling Tools 2022-06
- Java 11 (jdk11)
- XAMPP 7.1.2 (PHP 7.1.2)
- WordPress 5.6.1 and 6.0.2
- Download Eclipse modeling tools and Install (extract) it -> Watch video in: Youtube - Aparat
- Download and deploy WPCrudRest as Eclipse plugin -> Watch video in: Youtube - Aparat
- Install Acceleo as Eclipse plugin -> Youtube - Aparat
- Start modeling (Create new modeling project) -> Youtube - Aparat
- Model a simple library manager plugin (example) -> Youtube - Aparat
- Deploy WordPress (on Windows OS) - Install XAMPP -> Youtube - Aparat
- Deploy WordPress (on Windows OS) - Deploy (Install) WordPress -> Youtube - Aparat
- Generate and deploy WordPress plugin -> Youtube - Aparat
Note: You can follow this link to deploy WordPress on your personal computer if you are unfamiliar with WordPress!
- Download Eclipse Modeling Tools
- Install (unzip) downloaded Eclipse package
- Download latest WPCrudRest package
- Unzip downloaded package and copy dropins directory to eclipse installation path (e.g C:\Program Files\eclipse)
- Execute Eclipse
- Install Acceleo plugin
- Install Sirius plugin if it is not installed (preinstall in newer versions)
- Restart Eclipse
- Click on "File" menu item
- Choose "New" ->" Other" item from "File" menu
- In "Select a wizard" window, search for "Sirius" group and expand it by clicking
- Choose "Modeling Project" and click "Next"
- Select a name for project and type it in "Project name" field
- Click on "Finish" button to create modeling project
Note: The field type repository model is used to define entities' field types and if dosn't exist, modelling and generating code is not possible! This is recommended to use exist pre-built field repository model!
- Copy FieldTypeRepo.crudrest from models directory to project model (or root) directory
- You can simply copy one of the sample models from the models repository directory and jump to the next step
- Right click on project root in Eclipse Project (or Model) explorer
- Choose "New" ->" Other" item from popup menu
- In "Select a wizard" window, search for "Crudrest Model" an choose it
- Click next and choose directory and a name (with .crudrest extension) to create model file and click "Next" button
- Choose "Plugin Creator" from "Model Object" drop-down list
- Click Finish to create model file
- Double click on representations.aird file
- Enable CrudRestWPP from Presentation part
- Double click on CrudRestWPP to open Sirius visual model editor
- Edit model
- Save it!
-
If you want to deploy the plugin directly on your local WordPress, set
WP_HOME
path as Wordpress root directory in system environmentWindows OS: setx WP_HOME WORDPRESS_PATH /M Example: setx WP_HOME C:\xampp7.1\htdocs\projects\crudrest /M
-
Right click on model
-
Choose "WP Crud-Rest" -> "Generate WordPress Plugin" from popup menu
-
Plugin code will be generated in "generated WPP" directory on project root directory