By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,748 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,748 IT Pros & Developers. It's quick & easy.

ASP.NET VS PHP OOP

P: n/a
I know there is a lot o people asking me if PHP5 is fully OOP, I said no,
but nobody trust me and I dont care as I have no time to explain you all.
But I find this from ORACLE and so I decided to post it to prove what I
said. ASP.NET is OOP not PHP (not yet).

http://otn.oracle.com/pub/articles/hull_asp.html

I program 80% of my projects in php, so dont tell me I'm a MS ASP lover, but
what I want to said is we have to admit PHP is not enough mature yet, and
still lack in OOP, and this is so important for programmer, because It just
make not sense that this is almost the last language not yet OOP. Can you
imagine how many programmers we loss just because of it.

Savut

Jul 17 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
I program 80% of my projects in php, so dont tell me I'm a MS
ASP lover, but what I want to said is we have to admit PHP is
not enough mature yet, and still lack in OOP, and this is so
important for programmer, because It just make not sense that
this is almost the last language not yet OOP. Can you imagine
how many programmers we loss just because of it.


I dare you to define what "not OO enough" actually *means*.

It seems that every time I hear that sentence it always boils down
to "Well yeah, PHP5 may have objects, classes, abstract classes,
interfaces, full member variable and method access control,
exceptions, object type hinting, proper object dereferencing,
destructors and all that. But it's not proper OO yet."

"Whys that?"

"Erm... erm... erm... it doesn't have a FINALLY keyword!! Yeah!
Thats why... yeah.... Urm... and you can't do $string->length();
and stuff..."

There is no such thing as "proper" OO. Even Smalltalk (the daddy of
OO languages) doesn't have some of the features people regard as
necessary for the OO classification.

--
Phil Roberts | Dork Pretending To Be Hard | http://www.flatnet.net/
Jul 17 '05 #2

P: n/a

"Phil Roberts" <ph*****@HOLYflatnetSHIT.net> wrote in message
news:Xn*************************@216.196.97.132...
With total disregard for any kind of safety measures "Savut"
<we***@hotmail.com> leapt forth and uttered:
I program 80% of my projects in php, so dont tell me I'm a MS
ASP lover, but what I want to said is we have to admit PHP is
not enough mature yet, and still lack in OOP, and this is so
important for programmer, because It just make not sense that
this is almost the last language not yet OOP. Can you imagine
how many programmers we loss just because of it.


I dare you to define what "not OO enough" actually *means*.

It seems that every time I hear that sentence it always boils down
to "Well yeah, PHP5 may have objects, classes, abstract classes,
interfaces, full member variable and method access control,
exceptions, object type hinting, proper object dereferencing,
destructors and all that. But it's not proper OO yet."

"Whys that?"

"Erm... erm... erm... it doesn't have a FINALLY keyword!! Yeah!
Thats why... yeah.... Urm... and you can't do $string->length();
and stuff..."

There is no such thing as "proper" OO. Even Smalltalk (the daddy of
OO languages) doesn't have some of the features people regard as
necessary for the OO classification.


To add to that, even Java does not have multiple inheritance.

Any programmer who says that he cannot use PHP because it is not a "proper"
OO language is talking out of the wrong end of his alimentary canal. Such
people are not "proper" programmers (IMHO). PHP enables the programmer to
mix procedural code with OO code, so it gives you the best of both worlds.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #3

P: n/a
Phil Roberts schrieb:
"Erm... erm... erm... it doesn't have a FINALLY keyword!! Yeah!
Thats why... yeah.... Urm... and you can't do $string->length();
and stuff..."


http://www.php.net/zend-engine-2.php :

[...]
PHP 5 introduces the "final" keyword to declare final members and
methods. Methods and members declared final cannot be overridden by
sub-classes.
[...]

:-)

Regards,
Matthias
Jul 17 '05 #4

P: n/a
On 2004-04-01, Savut wrote:
I know there is a lot o people asking me if PHP5 is fully OOP, I said no,
but nobody trust me and I dont care as I have no time to explain you all.
But I find this from ORACLE and so I decided to post it to prove what I
said. ASP.NET is OOP not PHP (not yet).

http://otn.oracle.com/pub/articles/hull_asp.html
Did you even read the article? It completely contradicts what you say.
I program 80% of my projects in php, so dont tell me I'm a MS ASP lover, but
what I want to said is we have to admit PHP is not enough mature yet, and
still lack in OOP, and this is so important for programmer, because It just
make not sense that this is almost the last language not yet OOP. Can you
imagine how many programmers we loss just because of it.

We all know PHP4 is lacking in OOP terms but PHP5 addresses most of the
problems, a view strongly emphasized in the article you pointed to.

One critisizm of the article itself though is that it quite comically
contradicts itself:

Of PHP's Strengths and Weaknesses, the article states:
As of beta version 4, PHP 5 still has a few shortcomings, including its
lack of exceptions,

Several paragraphs later we read:
PHP 5's major new achievements come in the area of its exception
handling

Hmm...
--
Mike Peters
mike [-AT-] ice2o [-DOT-] com
http://www.ice2o.com
Jul 17 '05 #5

P: n/a
Also,

I would say that article would be very biased as well, coming from Oracle.
Not that I have read it, but i've read things like this in the past.

Thanks
Hayden Kirk

"Savut" <we***@hotmail.com> wrote in message
news:X3****************@news20.bellglobal.com...
I know there is a lot o people asking me if PHP5 is fully OOP, I said no,
but nobody trust me and I dont care as I have no time to explain you all.
But I find this from ORACLE and so I decided to post it to prove what I
said. ASP.NET is OOP not PHP (not yet).

http://otn.oracle.com/pub/articles/hull_asp.html

I program 80% of my projects in php, so dont tell me I'm a MS ASP lover, but what I want to said is we have to admit PHP is not enough mature yet, and
still lack in OOP, and this is so important for programmer, because It just make not sense that this is almost the last language not yet OOP. Can you
imagine how many programmers we loss just because of it.

Savut

Jul 17 '05 #6

P: n/a
"Hayden Kirk" <sp**@spam.com> wrote in message
news:IF*******************@news02.tsnz.net...
Also,

I would say that article would be very biased as well, coming from Oracle.
Not that I have read it, but i've read things like this in the past.


The article give such a superficial treatment to both languages it's hardly
worth reading. I mean how can you assess PHP's strength without mentioning
its API? And I don't know how he justifies calling ASP.Net slow, when ASP
pages backed by a compiled module run circles around PHP.
Jul 17 '05 #7

P: n/a
final has different meaning to finally.

final means the class/methdo can not be extended/overiiden.

finally is used in try catch statements:

try
{
// somethig
}
catch (SomeException e)
{
throw e;
}
finally
{
// will always run
}
"Matthias Esken" <mu******************@usenetverwaltung.org> wrote in
message news:c4**********@usenet.esken.de...
Phil Roberts schrieb:
"Erm... erm... erm... it doesn't have a FINALLY keyword!! Yeah!
Thats why... yeah.... Urm... and you can't do $string->length();
and stuff..."


http://www.php.net/zend-engine-2.php :

[...]
PHP 5 introduces the "final" keyword to declare final members and
methods. Methods and members declared final cannot be overridden by
sub-classes.
[...]

:-)

Regards,
Matthias

Jul 17 '05 #8

P: n/a
go back to your cave, because neither the PHP community, nor ASP community
want you to participate in them.
"Savut" <we***@hotmail.com> wrote in message
news:X3****************@news20.bellglobal.com...
I know there is a lot o people asking me if PHP5 is fully OOP, I said no,
but nobody trust me and I dont care as I have no time to explain you all.
But I find this from ORACLE and so I decided to post it to prove what I
said. ASP.NET is OOP not PHP (not yet).

http://otn.oracle.com/pub/articles/hull_asp.html

I program 80% of my projects in php, so dont tell me I'm a MS ASP lover, but what I want to said is we have to admit PHP is not enough mature yet, and
still lack in OOP, and this is so important for programmer, because It just make not sense that this is almost the last language not yet OOP. Can you
imagine how many programmers we loss just because of it.

Savut

Jul 17 '05 #9

P: n/a
Chung Leong wrote:
"Hayden Kirk" <sp**@spam.com> wrote in message
news:IF*******************@news02.tsnz.net...
Also,

I would say that article would be very biased as well, coming from
Oracle. Not that I have read it, but i've read things like this in
the past.


The article give such a superficial treatment to both languages it's
hardly worth reading. I mean how can you assess PHP's strength
without mentioning its API? And I don't know how he justifies calling
ASP.Net slow, when ASP pages backed by a compiled module run circles
around PHP.


Comparing ASP.NET to PHP is like comparing cars to engines. ASP.NET is (as
the article states correctly) not a programming language, but a framework
which can be utilised using several languages, some of which are OO and some
are not. I see nothing that prevents PHP from being included into .NET
platform.

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.
Jul 17 '05 #10

P: n/a
Sean Malloy schrieb:
final has different meaning to finally.


When I wrote my posting I had some strange feeling that something was
wrong. Thanks for the correction.

Regards,
Matthias
Jul 17 '05 #11

P: n/a
"Berislav Lopac" <be************@dimedia.hr> wrote in message
news:c4**********@ls219.htnet.hr...
Comparing ASP.NET to PHP is like comparing cars to engines. ASP.NET is (as
the article states correctly) not a programming language, but a framework
which can be utilised using several languages, some of which are OO and some are not. I see nothing that prevents PHP from being included into .NET
platform.


True, but PHP is also a product, a development platform. If you're
developing a site with ASP.Net, you're not developing in PHP. So to simply
say that they aren't comparable is, frankly, to dodge the question.

I have only done ASP.Net in C#, but I dare say that code written in any of
the supported languages is faster than that written in PHP because of the
efficiency of the Common Language Runtime.

I would like to see the author of the article to back up his claims with
some actual tests. On identical mid-range handware, let us compare a ASP +
MSSQL setup with a PHP + Oracle setup. My money is on former.
Jul 17 '05 #12

P: n/a
This is a PHP board, so expect a biased response. However, I've
played with both environments (in fact written books on both) so I
feel somewhat comfortable wading into this minefield.

Tiger Woods carries a whole bagfull of clubs (Ok, his caddy does)
because each club does a different job well. Professional contract
programmers are allowed to have favorite languages, but my current
favorite language is the one paying my bills.

What makes a particular application object oriented or not is really
the programmer and the design of the algorithms, not simply the
language. Some languages (did I hear 'Java?') require you to think in
an OOP format, so you don't get the choice to be procedural. Some
environments do not offer any possibility of OOP. Other environments,
including .NET and PHP, allow you to choose. For a lot of simpler
programs, the overhead of designing in an OOP format isn't worth the
software engineering payoff, because there simply won't be that much
formal software engineering on simple one-programmer jobs.

For certain kinds of problems, especially those requiring multiple
programmers and a complex object hierarchy, OOP makes a lot of sense.
Of course, the .NET framework itself is exactly that sort of complex
hierarchy, so if you're working in .NET, you're using OOP whether your
own code is OOP-based or not.

Strangely enough, because C#.NET and VB.NET use the same .NET OOP
framework, programming in these two langauges is 90% identical.
However, you'll see that VB.NET programmers (who usually come from a
VB6 background) tend to write code that's object based, and not as
strictly OOP, where C# programmers (who often come from a Java
background) write almost the same code with the stricter Java
stylings.

Having said all this, PHP is one of my favorite languages, because I
can decide how formal I want to get. I frankly don't use a lot of OOP
stuff in my PHP work because I don't need it and it doesn't save me a
lot of time. I'm glad to be using a language that gives me the
flexibility to choose.

As for speed, I think the comparisons are a bit spurious. Certainly a
compiled (or half-compiled) language will be faster than an
interpreted one. However, it's important to recognize that it's no
longer 1964, nor are client-server programs frequently called upon to
do 3D rendering or other computationally intensive work. The economy
of client/server programs is actually in _development time_ more than
_processor time_. An environment that creates less efficient code but
more efficient programmers can be very desirable.

Nor is it 1990. While the execution speed of a server-side app
matters, the delay caused waiting for the program to execute is
minimal compared to the potential communication bottlenecks inherent
in the n-tiered design strategy.You can often get a lot more bang for
the buck improving the communication aspects than worrying about your
execution time.

So I'm ok with somebody suggesting that PHP isn't truly OOP. It
doesn't MAKE me think in an OOP style, but provides (finally) a good
enough implementation of OOP that I can go there if I want to.

and - It's pretty easy to write
and - I don't have to buy lots of stuff from MS to work it
and - It really works on multiple platforms
and - It's free

-just my thoughts...
Jul 17 '05 #13

P: n/a
This is a PHP board, so expect a biased response. However, I've
played with both environments (in fact written books on each) so I
feel somewhat comfortable wading into this minefield.

Tiger Woods carries a whole bagfull of clubs (Ok, his caddy does)
because each club does a different job well. Professional contract
programmers are allowed to have favorite languages, but my current
favorite language is the one paying my bills.

What makes a particular application object oriented or not is really
the programmer and the design of the algorithms, not simply the
language. Some languages (did I hear 'Java?') require you to think in
an OOP format, so you don't get the choice to be procedural. Some
environments do not offer any possibility of OOP. Other environments,
including .NET and PHP, allow you to choose. For a lot of simpler
programs, the overhead of designing in an OOP format isn't worth the
software engineering payoff, because there simply won't be that much
formal software engineering on simple one-programmer jobs.

For certain kinds of problems, especially those requiring multiple
programmers and a complex object hierarchy, OOP makes a lot of sense.
Of course, the .NET framework itself is exactly that sort of complex
hierarchy, so if you're working in .NET, you're using OOP whether your
own code is OOP-based or not.

Strangely enough, because C#.NET and VB.NET use the same .NET OOP
framework, programming in these two langauges is 90% identical.
However, you'll see that VB.NET programmers (who usually come from a
VB6 background) tend to write code that's object based, and not as
strictly OOP, where C# programmers (who often come from a Java
background) write almost the same code with the stricter Java
stylings.

Having said all this, PHP is one of my favorite languages, because I
can decide how formal I want to get. I frankly don't use a lot of OOP
stuff in my PHP work because I don't need it and it doesn't save me a
lot of time. I'm glad to be using a language that gives me the
flexibility to choose.

As for speed, I think the comparisons are a bit spurious. Certainly a
compiled (or half-compiled) language will be faster than an
interpreted one. However, it's important to recognize that it's no
longer 1964, nor are client-server programs frequently called upon to
do 3D rendering or other computationally intensive work. The economy
of client/server programs is actually in _development time_ more than
_processor time_. An environment that creates less efficient code but
more efficient programmers can be very desirable.

Nor is it 1990. While the execution speed of a server-side app
matters, the delay caused waiting for the program to execute is
minimal compared to the potential communication bottlenecks inherent
in the n-tiered design strategy.You can often get a lot more bang for
the buck improving the communication aspects than worrying about your
execution time.

So I'm ok with somebody suggesting that PHP isn't truly OOP. It
doesn't MAKE me think in an OOP style, but provides (finally) a good
enough implementation of OOP that I can go there if I want to.

and - It's pretty easy to write
and - I don't have to buy lots of stuff from MS to work it
and - It really works on multiple platforms
and - It's free

-just my thoughts...
Jul 17 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.