Skip to content

Latest commit

 

History

History
149 lines (116 loc) · 9.17 KB

README.md

File metadata and controls

149 lines (116 loc) · 9.17 KB

Full documentation is available at the following website:

https://microsign.ir/en/products/wpcrudrest

English Version|نسخه فارسی

WPCrudRest : A WordPress plugin creator (plugin code generator) tool

A Powerful Wordpress CRUD & RESTful plugin Generator framework

Introduction

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.

In short, the generated plugin has the following features:

  1. Multilingual translation support (translatable with Loco Translate).
  2. Support for left-to-right and right-to-left languages.
  3. Automatic creation of required tables in the database.
  4. Providing a web service to perform CRUD operations on defined entities.
  5. Providing a web service to perform CRUD operations related to pages.
  6. Provide custom web service structure.
  7. Create defined menus and link them to the relevant pages.
  8. Create entity list pages.
  9. Create entity form page to create, display, or update an entity.
  10. The possibility of managing the access control of web services users to perform CRUD operations on entities.
  11. The ability to control the access control of management panel users to perform CRUD operations on entities.
  12. The ability to manage access control for custom web services users.
  13. Using Vue.js to create web user interfaces.
  14. Ability to add more custom fields to the visual editor and plugin code.

WPCrudRest Demo

WPCrudRest Framework and created WordPress plugin demo:

WPCrudRest WordPress plugin creator

Please participate in the evaluation

You can participate in the evaluation of the WPCrudRest framework through the following links:

Test environment:

This tool deployed and tested successfully on:

Guidance Videos

  1. Download Eclipse modeling tools and Install (extract) it -> Watch video in: Youtube - Aparat
  2. Download and deploy WPCrudRest as Eclipse plugin -> Watch video in: Youtube - Aparat
  3. Install Acceleo as Eclipse plugin -> Youtube - Aparat
  4. Start modeling (Create new modeling project) -> Youtube - Aparat
  5. Model a simple library manager plugin (example) -> Youtube - Aparat
  6. Deploy WordPress (on Windows OS) - Install XAMPP -> Youtube - Aparat
  7. Deploy WordPress (on Windows OS) - Deploy (Install) WordPress -> Youtube - Aparat
  8. Generate and deploy WordPress plugin -> Youtube - Aparat

You can also access full list of tutorial videos by this links:

Installation and use instructions:

You can follow the steps below to deploy and use the framework:

Note: You can follow this link to deploy WordPress on your personal computer if you are unfamiliar with WordPress!

A. Install Eclipse

  1. Download Eclipse Modeling Tools
  2. Install (unzip) downloaded Eclipse package

B. Configure Eclipse and Install required plugins

  1. Download latest WPCrudRest package
  2. Unzip downloaded package and copy dropins directory to eclipse installation path (e.g C:\Program Files\eclipse)
  3. Execute Eclipse
  4. Install Acceleo plugin
  5. Install Sirius plugin if it is not installed (preinstall in newer versions)
  6. Restart Eclipse

C. Create a new Modeling Project

  1. Click on "File" menu item
  2. Choose "New" ->" Other" item from "File" menu
  3. In "Select a wizard" window, search for "Sirius" group and expand it by clicking
  4. Choose "Modeling Project" and click "Next"
  5. Select a name for project and type it in "Project name" field
  6. Click on "Finish" button to create modeling project

D. Create "Crudrest Model"

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!

  1. Copy FieldTypeRepo.crudrest from models directory to project model (or root) directory
  2. You can simply copy one of the sample models from the models repository directory and jump to the next step
  3. Right click on project root in Eclipse Project (or Model) explorer
  4. Choose "New" ->" Other" item from popup menu
  5. In "Select a wizard" window, search for "Crudrest Model" an choose it
  6. Click next and choose directory and a name (with .crudrest extension) to create model file and click "Next" button
  7. Choose "Plugin Creator" from "Model Object" drop-down list
  8. Click Finish to create model file

E. Open WordPress Crudrest Plugin Model in graphical editor

  1. Double click on representations.aird file
  2. Enable CrudRestWPP from Presentation part
  3. Double click on CrudRestWPP to open Sirius visual model editor
  4. Edit model
  5. Save it!

F. Generate WordPress Plugin Code

  1. If you want to deploy the plugin directly on your local WordPress, set WP_HOME path as Wordpress root directory in system environment

     Windows OS:
                 setx WP_HOME WORDPRESS_PATH /M
     Example: 
                 setx WP_HOME C:\xampp7.1\htdocs\projects\crudrest /M
    

    Click here for more help

  2. Right click on model

  3. Choose "WP Crud-Rest" -> "Generate WordPress Plugin" from popup menu

  4. Plugin code will be generated in "generated WPP" directory on project root directory

Screenshots

Graphical modeling editor screenshot:

Graphical modeling editor screenshot

Generate WordPress plugin code from model screenshot:

Generate WordPress plugin code from model screenshot

Generated WordPress plugin code screenshot (zip this directory and install it on Wordpress as plugin or just copy it to WordPress plugin directory):

Generated WordPress plugin code screenshot Generated WordPress plugin code screenshotGenerated WordPress plugin code screenshot


WordPress plugin pages:

WordPress plugin pages

WordPress plugin access controll (AC) page:

WordPress plugin access controll (AC) page

WordPress plugin list item page:

WordPress plugin list item page

WordPress plugin create (or edit) item page:

WordPress plugin create (or edit) item page

WordPress plugin RESTful webservice tested by RESTClient:

WordPress plugin RESTful webservice tested by RESTClient WordPress plugin RESTful webservice tested by RESTClient