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

OOP: asp vs. php

P: n/a
What are the differences between ASP's OOP and Php's?

/Jacob

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


P: n/a
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the
version 5 is almost near. Hope the next version (PHP6 ?) will be more OOP.

Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
What are the differences between ASP's OOP and Php's?

/Jacob

Jul 17 '05 #2

P: n/a
"Savut" <we***@hotmail.com> wrote in message
news:Xc******************@news20.bellglobal.com...
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the
version 5 is almost near. Hope the next version (PHP6 ?) will be more OOP.

ASP is nothing of the sort, sir!

Asp can use JScript or VBScript as a server-side
scripting language. Both is what commonly refered
to as "OBject Based", but definitely not Object-Oriented.

As a matter of fact, ASP isn't a language at all,
it's a framework.

It can use several scripting-engines in adition to
the default VBScript or JScript. None of which have,
among other things, inheritance. One of the tree
cornerstones of OO.

--
Dag.


Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
What are the differences between ASP's OOP and Php's?

/Jacob


Jul 17 '05 #3

P: n/a
Dag Sunde wrote:
"Savut" <we***@hotmail.com> wrote in message
news:Xc******************@news20.bellglobal.com...
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the
version 5 is almost near. Hope the next version (PHP6 ?) will be more OOP.


ASP is nothing of the sort, sir!

Asp can use JScript or VBScript as a server-side
scripting language. Both is what commonly refered
to as "OBject Based", but definitely not Object-Oriented.

As a matter of fact, ASP isn't a language at all,
it's a framework.

It can use several scripting-engines in adition to
the default VBScript or JScript. None of which have,
among other things, inheritance. One of the tree
cornerstones of OO.


Hell, if you want to, you can use PHP syntax to do your ASP stuff as
well through the use of the supplied php4activescript.dll (or one of
those DLL files anyway).

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #4

P: n/a
You are wrong as in the fact, VBScript can create class, class metamorphis,
class inherance, and private / public variable, so it's full OOP. I'm not
again PHP as it'm my main web scripting language, but still ASP VBScript and
C# are more OOP than PHP for sure.

Savut

"Dag Sunde" <da******@orion.no.way> wrote in message
news:3f********@news.wineasy.se...
"Savut" <we***@hotmail.com> wrote in message
news:Xc******************@news20.bellglobal.com...
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the
version 5 is almost near. Hope the next version (PHP6 ?) will be more
OOP.

ASP is nothing of the sort, sir!

Asp can use JScript or VBScript as a server-side
scripting language. Both is what commonly refered
to as "OBject Based", but definitely not Object-Oriented.

As a matter of fact, ASP isn't a language at all,
it's a framework.

It can use several scripting-engines in adition to
the default VBScript or JScript. None of which have,
among other things, inheritance. One of the tree
cornerstones of OO.

--
Dag.


Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
What are the differences between ASP's OOP and Php's?

/Jacob



Jul 17 '05 #5

P: n/a
Savut wrote:
You are wrong as in the fact, VBScript can create class, class metamorphis,
class inherance, and private / public variable, so it's full OOP. I'm not
again PHP as it'm my main web scripting language, but still ASP VBScript and
C# are more OOP than PHP for sure.

Savut


Dude's (Savut) talking about asp.net

asp is a framework. .net is a framework. asp.net is the new asp
framework and is a subframework of the .net framework. everything is
made more confusing by asp, asp+ and asp3 -- which all came before
asp.net. Now to make things confusing (if it ain't confusing enough for
ya), they released versions of VBscript to co-incide with versions(?) of
the asp framework. Hence people confusing asp with VBscript in asp
(which makes sense really). Anyway, I haven't been keeping track of it
all (gave up a long time ago and just used PHP instead), but the version
of VBScript that came out with asp3 (prior to the current asp.net which
is completely different) could do classes (happy day) -- by which stage
PHP had been doing classes for years.

Neither PHP or the VBScript offered with asp3 have a "full feature set"
that is typically associated with OO. If you are hell-bent on OO for OO
sake, then you will probably get advised to use somthing with a "full
feature set" (like Java or .net).

Personally, the principle is more important than the implementation. All
my applications are 100% object oriented and they use PHP which
apparently doesn't have 100% of the object-oriented feature set -- who
cares? I don't, my apps are still architected well using and object
orientation and many associated design patterns. At the end of the day,
that's what matters.

Oh, and choice matters. Choice of operating system, choice of web
server, choice of unlimited seats (in terms of licencing) choice of
technology extensions... PHP can integrate with Java as well as COM. I
don't have time for vendor specific technologies which don't have my
interests in first place.

At the end of the day, you have to decide what "really" matters to you.
That may or may not involve a technology that supports abstract classes
and interfaces or not (for example).
Jul 17 '05 #6

P: n/a
Yes, VBScript can create classes and be polymorphic,
but is does NOT support inheritance!

And if you're talking about the .NET platform, you should
have said so, because that is a completely different
animal.

--
Dag.
"Savut" <we***@hotmail.com> wrote in message
news:SY*****************@news20.bellglobal.com...
You are wrong as in the fact, VBScript can create class, class metamorphis, class inherance, and private / public variable, so it's full OOP. I'm not
again PHP as it'm my main web scripting language, but still ASP VBScript and C# are more OOP than PHP for sure.

Savut

"Dag Sunde" <da******@orion.no.way> wrote in message
news:3f********@news.wineasy.se...
"Savut" <we***@hotmail.com> wrote in message
news:Xc******************@news20.bellglobal.com...
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the version 5 is almost near. Hope the next version (PHP6 ?) will be more

OOP.


ASP is nothing of the sort, sir!

Asp can use JScript or VBScript as a server-side
scripting language. Both is what commonly refered
to as "OBject Based", but definitely not Object-Oriented.

As a matter of fact, ASP isn't a language at all,
it's a framework.

It can use several scripting-engines in adition to
the default VBScript or JScript. None of which have,
among other things, inheritance. One of the tree
cornerstones of OO.

--
Dag.


Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
> What are the differences between ASP's OOP and Php's?
>
> /Jacob
>



Jul 17 '05 #7

P: n/a
Jacob Larsen wrote:
What are the differences between ASP's OOP and Php's?


ASP-VBScript has private members/ methods (variables/ functions). I
missed that in PHP. ASP-VBS also doesn't need any this-> keyword. What
ASP-VBS lacks are optional parameters in functions, which is a not so
nice thing, especially for later refactoring of bigger web apps. PHP of
course has optional parameters. ASP-VBS has a "let" syntax which even
OOP languages like Java don't have (not in any easy way, e.g. operator
overloading). This means it can be shielded from someone accessing the
class whether something is a public function or a public variable, and
this also can be changed later on without changing code accessing the
class. This is not available in ASP-JS AFAIK.

Overall I would say ASP-VBS has better OOP than PHP simply for the lack
of private members/ methods. ASP-VBS however does not have any
inheritance. But object composition (vs object inheritance -- "has a"
or "is a kind of" can test which is appropriate*) should be preferred
in most cases anyway, and that's possible in both PHP and ASP-VBS.

* A car _has a_ tire -> object composition, useful for most cases
An employee _is a kind of_ person -> inheritance, sometimes useful,
can easily add complexity of its own
Jul 17 '05 #8

P: n/a
Just add, Jacob, you dont really need to know about OOP of each, you make
your choice of what language you use, and you code how you can with it...
Live with it or throw it. Anyway, they all tend to be fully OOP soon. For
last post, sorry I was talking about ASP.NET and didn't mention it.

Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
What are the differences between ASP's OOP and Php's?

/Jacob

Jul 17 '05 #9

P: n/a
In ASP, and ASP.NET especially, OOP is almost mandatory, whereas in PHP you
can do OOP if you feel like it, or not use it if you don't.

I don't understand why people think a more OOP language is somehow better.
Yes, you can better manage complexity using OOP principles, but my question
is, how much complexity should there be in a web application? At the end of
the day all it does is scrible something in the database and produce some
HTML code. It shouldn't be that complicated. When it is, you're probably
overdesigning the thing.

The real measure of a computer language is the amount of functionality you
get for the amount of complexity you have to deal with. In this regard PHP
beats ASP hands down.

Uzytkownik "Jacob Larsen" <po**@jfl.dk> napisal w wiadomosci
news:3f***********************@dread15.news.tele.d k...
What are the differences between ASP's OOP and Php's?

/Jacob

Jul 17 '05 #10

P: n/a
Yeah, in PHP we don't have things like

System.Object
System.Web.UI.Control
System.Web.UI.HtmlControls.HtmlControl
System.Web.UI.HtmlControls.HtmlContainerControl
System.Web.UI.HtmlControls.HtmlGenericControl

Such tragedy to program without polymorphic, namespace-segregated <p> tags!

Uzytkownik "Savut" <we***@hotmail.com> napisal w wiadomosci
news:SY*****************@news20.bellglobal.com...
You are wrong as in the fact, VBScript can create class, class metamorphis, class inherance, and private / public variable, so it's full OOP. I'm not
again PHP as it'm my main web scripting language, but still ASP VBScript and C# are more OOP than PHP for sure.

Savut

"Dag Sunde" <da******@orion.no.way> wrote in message
news:3f********@news.wineasy.se...
"Savut" <we***@hotmail.com> wrote in message
news:Xc******************@news20.bellglobal.com...
ASP is full OOP with all the feature of OOP, PHP is not yet OOP but the version 5 is almost near. Hope the next version (PHP6 ?) will be more

OOP.


ASP is nothing of the sort, sir!

Asp can use JScript or VBScript as a server-side
scripting language. Both is what commonly refered
to as "OBject Based", but definitely not Object-Oriented.

As a matter of fact, ASP isn't a language at all,
it's a framework.

It can use several scripting-engines in adition to
the default VBScript or JScript. None of which have,
among other things, inheritance. One of the tree
cornerstones of OO.

--
Dag.


Savut

"Jacob Larsen" <po**@jfl.dk> wrote in message
news:3f***********************@dread15.news.tele.d k...
> What are the differences between ASP's OOP and Php's?
>
> /Jacob
>



Jul 17 '05 #11

P: n/a
> ASP-VBScript has private members/ methods (variables/ functions). I
missed that in PHP. Smalltalk has no private methods, not in the C++ sense that you can not call
them from outside the class. And though all 'fields' are effectively
'protected' there still is a backdoor for getting and setting their values.
Now do you mean that Smalltalk is not 100% OOP?

Henk Verhoeven,
www.metaclass.nl

"Philipp Lenssen" <in**@outer-court.com> wrote in message
news:bq*************@ID-203055.news.uni-berlin.de... Jacob Larsen wrote:
What are the differences between ASP's OOP and Php's?


ASP-VBScript has private members/ methods (variables/ functions). I
missed that in PHP. ASP-VBS also doesn't need any this-> keyword. What
ASP-VBS lacks are optional parameters in functions, which is a not so
nice thing, especially for later refactoring of bigger web apps. PHP of
course has optional parameters. ASP-VBS has a "let" syntax which even
OOP languages like Java don't have (not in any easy way, e.g. operator
overloading). This means it can be shielded from someone accessing the
class whether something is a public function or a public variable, and
this also can be changed later on without changing code accessing the
class. This is not available in ASP-JS AFAIK.

Overall I would say ASP-VBS has better OOP than PHP simply for the lack
of private members/ methods. ASP-VBS however does not have any
inheritance. But object composition (vs object inheritance -- "has a"
or "is a kind of" can test which is appropriate*) should be preferred
in most cases anyway, and that's possible in both PHP and ASP-VBS.

* A car _has a_ tire -> object composition, useful for most cases
An employee _is a kind of_ person -> inheritance, sometimes useful,
can easily add complexity of its own


Jul 17 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.