php - ZF2 architecture. modules or separate projects for api, admin, client ect -


i developing project witch has console logic, restfull api, admin , client websites.

i have started building of them in single zf2 application. using application module client website , console logic, api module api , admin module admin website. , have started writing unit tests realized calling part of code every module being loaded (for example when calling console script witch works emails via imap api documentation tool swagger printing warnings no server name).

i think should decrease app performance , changing 1 part can break another. , parts diferent(console, restfull, , html output. different plugins, vendors ect.).

and think how can solve problem. keep structure:http://mysite/api api, http://mysite/admin admin, http://mysite/ client site , php index.php action console scripts.

how should solve problem? should split parts separate zf2 applications, or should use same project but, different autoloader. or maybe there other practices?

don't rearchitect whole application fix performance problem think might exist. module bootstrap overhead zf2 quite low. if modules have no dependencies on each other @ all, try benchmarking application baseline, try disabling 1 module see difference makes. if doesn't make difference, i'd keep is.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -