Re: ASP.NET VS PHP OOP
From: Andy Harris (aharris_at_cs.iupui.edu)
Date: 04/05/04
- Next message: Andy Hassall: "Re: validate username"
- Previous message: Martin Lucas-Smith: "Object delegation possible in PHP4?"
- In reply to: Savut: "ASP.NET VS PHP OOP"
- Next in thread: Andy Harris: "Re: ASP.NET VS PHP OOP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Apr 2004 11:26:26 -0700
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...
- Next message: Andy Hassall: "Re: validate username"
- Previous message: Martin Lucas-Smith: "Object delegation possible in PHP4?"
- In reply to: Savut: "ASP.NET VS PHP OOP"
- Next in thread: Andy Harris: "Re: ASP.NET VS PHP OOP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|