procedural-programming


PHP: One large file or several small files


I self taught myself PHP, so I don't know many of the advantages and disadvantages in programming styles. Recently, I have been looking at large PHP projects, like webERP, Wordpress, Drupal, etc and I have notices they all have a main PHP page that is very large (1000+ lines of code) performing many different functions. Whereas, my projects' pages all seem to be very specific in function and are usually less than 1000 lines. What is the reasoning behind the large page, and are there any advantages over smaller more specific pages?
Thanks for the information.
It's partly about style and partly about readability/relationships. Ideally everything in a single file is related (ex. a class, related operation functions etc.) and unrelated items belong in another file.
Obviously if you are writing something to be included by others making a single file can have its advantages. Such as a condensed version of jQuery, etc.

Related Links

PHP: One large file or several small files
Procedural Programming and data exposure
Difference between Declarative and Procedural Programming?

Categories

HOME
asp.net-web-api
rdbms
battery
tivoli
jquery-ui
trac
modal-dialog
drop-down-menu
resultset
rtf
spring-social
cumulocity
docx
mathprog
forgot-password
apache2.4
sar
lilypond
blade
ksh
imagemap
php-mysqlidb
event-store
dapper-extensions
itunes
google-cloud-print
angularjs-components
firebase-analytics
user-defined-functions
mobx
utorrent
simplecv
joomla2.5
google-knowledge-graph
xv6
glm-math
claims
builder
podscms
video-conferencing
edit
skin
boo
cmp
shinobi
pocketsphinx-android
cudd
simplepie
meteor-packages
vorpal.js
stream-processing
riot
libav
halcon
ascii-art
assertion
dllimport
vigenere
xvim
fuelcms
rubaxa-sortable
page.js
uncompress
wso2greg
branch-and-bound
ansi
canvg
typeconverter
boost-program-options
ssis-data-flow
deform
trdion2011
matrix-inverse
tinyxml
dot42
vsx
gae-quotas
clickbank
windows-phone-8-sdk
http-status-code-410
web-farm
objectquery
kqueue
procedures
clrstoredprocedure
cdonts
updatesourcetrigger
openfaces
application-verifier
dsl-tools
fail-fast-fail-early

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile