Git Product home page Git Product logo

module_skeleton_generator's Introduction

OXID Module Skeleton Generator


Folders structure, empty classes and metadata generation for new OXID eShop modules.

Concentrate only on features - let OXID Module Skeleton Generator create all the rest!

  • Enter Your copyright data in the module settings
  • Open an easy to use Module Generator Wizard
  • Enter new module name and optional components
  • Press "Generate New Module" and its done - new module is now ready to be activated and filled with features!

OXID Module Skeleton Generator features

  • Fully configurable vendor/author parameters for new modules creation
  • Vendor folder and vendor metadata automatic creation
  • Standard module folders structure creation
  • Completely filled module medatada file generation
  • Naming based on vendor data and module name
  • Created modules follow OXID standards
  • Automatic creation of pre-filled README file
  • Generation of PHP files comments with all vendor and module data
  • Main module class is included in each generated module
    • It contains activation/deactivation events
    • Support automatic SQL execution on the events
    • The class "knows" about its module and provides useful methods
  • Generation of skeleton files for...
    • Overloaded (extend) classes
    • New controllers (also templates are created)
    • Model classes
    • List model classes (linked with item model classes)
    • Widgets (also with templates)
  • Smarty blocks metadata and templates generation
  • Module settings metadata and translations generation
  • Translation files creation
  • Module version
  • Automatic checkout of tests folder
    • And generation of pre-filled tests classes for each new module class
    • Configurable GIT repository URL to get tests folder from
  • Learning mode
    • Creation of hints and to do tasks inside generated files to help proceed with development
    • Sample source code generation to give a hint what each class could/should contain
  • Generated module is immediately working
    • Activate it and events, settings, blocks, controllers, etc. will already be in action!

Installation

  • Copy the content of copy_this/ folder to OXID eShop root folder
  • Activate the module in administration area
  • Set eShop modules/ folder writable while generating new modules

Usage

  • Make sure eShop modules/ folder (and also Your vendor sub-folder, if it exists) is writable
  • Log in to eShop administration area
  • (for first run) Go to Extensions -> Modules -> OXID Module Skeleton Generator -> Settings -> Vendor and Copyright Settings and enter Your vendor, copyright and author data
  • Open Module Generator -> Wizard (refresh page if it did not appear after module activation)
  • Enter a name for a new module in "UpperCamelCase" format, e.g. "MyModule"
  • (optionally) Enter any other options required in a new module (refer to help hints for more info)
  • Press "Generate New Module" button
  • The module skeleton source is now available in Your vendor sub-folder
  • And the module could be activated already in Extensions -> Modules

To do and nice to have features for future releases

  • Refactor longer classes to move some methods elsewhere
  • Extend blocks definition validation and blocks templates naming
  • EDIT mode feature: for existing modules, generate/add extra stuff
  • Create nice looking generation form with JS/AJAX events to validate and help enter proper values (auto-complete)
  • Admin interface presets generation, also with menu.xml
  • Generate picture with PNG text overlay with real module name
  • PHPStorm style schemes (or some code beautifier) integration - after generation do code formatting
  • Copy not all folders, but only required ones (Refactor copyDir by providing "copy scenario" array)
  • dbEvent fail on multi-shops and multi-lang in real life projects - need PHP based DB installation

module_skeleton_generator's People

Contributors

druteika avatar mantasvaitkunas avatar oxid-admin avatar robertblank avatar sieg avatar svenbrunk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

module_skeleton_generator's Issues

Semicolon breaks query execution

The _dbEvent function does separate queries by simply using explode based on ;. If there is any semicolon inside your query, for example let's say a description containing " ", the query will fail and module activation does not throw any error.

I would suggest replacing
$aSql = (array) explode(';', $sSql);

with a regular expression like
$aSql = (array) preg_split("/;\n/", $sSql);

and include a comment that queries must be separated with newlines.

Feel free to improve.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.