473,396 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP.NET VS PHP OOP

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
13 2083
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

"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
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
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
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
"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
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
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
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
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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.