Alright, this is a controvercial question for my fellow gurus: Why do
we bother with Object-Oriented programming in a web environment?
The web, by nature, is a stateless environment. Web-based applications
are, on the whole, fairly uncomplicated things. Objects are, generally,
conceptually thought of as entities that have a lifespan. Having an
object survive for longer than the execution of a single page can be a
pain. Having an object only survive for one page hardly seems worth the
trouble.
Encapsulation, the grouping of like concepts, can be done with a well
thought-out library, or even file naming structure.
I don't think I have ever used inhertiance or true polymorphism in any
web project, ever.
So what gives? Why are people using mysql_fetch_obj ect instead of
mysql_fetch_arr ay? Is it habit? Is it what we're taught? Do we percieve
some additional value?
~D
we bother with Object-Oriented programming in a web environment?
The web, by nature, is a stateless environment. Web-based applications
are, on the whole, fairly uncomplicated things. Objects are, generally,
conceptually thought of as entities that have a lifespan. Having an
object survive for longer than the execution of a single page can be a
pain. Having an object only survive for one page hardly seems worth the
trouble.
Encapsulation, the grouping of like concepts, can be done with a well
thought-out library, or even file naming structure.
I don't think I have ever used inhertiance or true polymorphism in any
web project, ever.
So what gives? Why are people using mysql_fetch_obj ect instead of
mysql_fetch_arr ay? Is it habit? Is it what we're taught? Do we percieve
some additional value?
~D
Comment