Skip to content

WPCrudRest is WordPress CRUD and RESTful Plugin generator tools that enable you to create WordPress Plugins by simply design (modeling) theirs structure graphically

Notifications You must be signed in to change notification settings

asadidebuger/WPCrudRest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Home Webpage

WPCrudRest

A Powerful Wordpress CRUD & RESTful plugin Generator (Eclipse plugin)

Introduction

This artifact is the result of a master's thesis in Isfahan University and contains set of Eclipse plugins that enable you to generate a WordPress plugin by graphical modelling. We use Model-Driven approach to generate codes from model.
WPCrudRest is currently only available as a plugin for Eclipse. It used Sirius to provide a graphical modelling environment and use Acceleo to transform models to code.

Please participate in the evaluation

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

Installation

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 (preinstall in newer versions)
  6. Restart Eclipse

C. Create 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 click
  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: Field type repository model use to define entities field types and if not 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 sample models from models repository directory) and jump to 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

Guidance Videos

  1. Download Eclipse modeling tools -> Watch video
  2. Install (extract) Eclipse modeling tools package -> Watch video
  3. Download WPCrudRest -> Watch video
  4. Install Acceleo as Eclipse plugin -> Watch video
  5. Deploy (install) WPCrudRest as Eclipse plugin -> Watch video
  6. Create new modeling project -> Watch video
  7. Start modeling using graphical editor -> Watch video

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