php-fig/fig-standards — Issue #5: modules ala nodejs/commonJS
Author: outbounder
Created: 2011-10-25 11:33:33+00:00
State: open

Hi there again,
As I've not been able to join the mail list, will open up here this question:
"what do you think to have an optional brief on creating php 'modules' based on other 'modules' as been used in nodejs" ?

I'm working on various technologies (php,nodejs,ruby/rails) and mix and match good stuff from one to the others and vise versa. And I really think php should have what currently nodejs has implemented as "modules concept". It is briefly described with the following single application structure:

- MyApp
|- node_modules
|- moduleA
|- classA_v1.js
|- moduleB
|- classB.js
|- node_modules
|- moduleA
|- classA_v0.9.js
|- node_modules

I won't fall into pros and cons about the used method, but would like to hear your thoughs on having similar for php standards... for example we could have "php_modules"?

We are working on providing php5boilerplate(https://github.com/ActiveUnits/php5boilerplate) and it is more than needed to have 'standard' and lightweight solution for modules as well as for modules/package management like npm, gem & etc. to get things moving faster than currently is supported with PEAR & old ways of dealing with the above situation.