guitarpoet / clips-tool

The command line tool for data processing using php-clips
2 stars 0 forks source link

Refactor the Widget design #23

Open guitarpoet opened 9 years ago

guitarpoet commented 9 years ago

The widget system in 1.0 is pretty simple.

There are some drawbacks in this design:

  1. All widgets can only have 1 version exists for load(Can't handle the same widget of different version)
  2. Loading widgets from 3rd party is not as smooth as the loading of widgets Application and Clips tools
  3. Widget loading still consumes most of the execution time of framework
  4. Just using in_array to test for dependencies

The widget in system 1.1 will:

  1. Have a better dependency management
  2. Should compile the dependencies and initialise functions into 1 cached php file for speedup(some thoughts from composer)
  3. Should have a widgets configuration item in the configuration, honour the 3rd party widgets as Application or Clips own
  4. Move most of the widgets out of Clips Tool to ease the dependency and move them into composer projects, so fetching them will be quite easy.
guitarpoet commented 9 years ago

Added the customise loading and widget cache.