php - Is an image display website better suited for procedural or OO programming? -


i have comics website, http://hittingtreeswithsticks.com, , guess i'm unclear style, procedural or oo, it's written in.

basically, there several "templates", homepage.php, viewall.php, viewfullsize.php, call upon various scripts... namely, templates include imagedisplay.php, has several scripts determine how query based on category, tag, or subsite selected.

i've read lot benefits of oo programming- when it's used , when it's not... still having trouble answering question.

the way understand difference between oop , procedural example standpoint is:

oop: if have website user can create object, such forum user can submit post... you'd want go oop because you'd want allow users create several instances of article class.

procedural: went think procedural because comics website displays comics out users. user can submit comment using disqus, or like/dislike. don't see i'd able fit oop paradigm simple image display site.

so, question is:

to use oop, need have several objects instantiated? or there other benefits i'm missing?

thanks

do both.

just call procedures "methods", or methods "procedures".

objects don't need correspond real world objects, it's modularization , moving code isolated (!) chunks "objects".

all in all, website not best understand oop. little inheritance happening.

instead, write simulation. example, road maybe crossroad , few drivers driving around.

start stupid driver, try allow subclassing different smarter drivers. or aggressive drivers. , see if can cause more traffic jams.

try start problem have natural objects share lot of traits, , differ in few.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -