OOP: asp vs. php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jacob Larsen

    OOP: asp vs. php

    What are the differences between ASP's OOP and Php's?

    /Jacob

  • Savut

    #2
    Re: asp vs. php

    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" <post@jfl.dk> wrote in message
    news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...[color=blue]
    > What are the differences between ASP's OOP and Php's?
    >
    > /Jacob
    >[/color]


    Comment

    • Dag Sunde

      #3
      Re: asp vs. php

      "Savut" <webki@hotmail. com> wrote in message
      news:Xc5zb.5187 $yd.990114@news 20.bellglobal.c om...[color=blue]
      > 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.[/color]


      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.

      [color=blue]
      >
      > Savut
      >
      > "Jacob Larsen" <post@jfl.dk> wrote in message
      > news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...[color=green]
      > > What are the differences between ASP's OOP and Php's?
      > >
      > > /Jacob
      > >[/color]
      >
      >[/color]


      Comment

      • Justin Koivisto

        #4
        Re: asp vs. php

        Dag Sunde wrote:
        [color=blue]
        > "Savut" <webki@hotmail. com> wrote in message
        > news:Xc5zb.5187 $yd.990114@news 20.bellglobal.c om...
        >[color=green]
        >>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.[/color]
        >
        > 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.[/color]

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

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

        Comment

        • Savut

          #5
          Re: asp vs. php

          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" <dag.nope@orion .no.way> wrote in message
          news:3fccf288$1 @news.wineasy.s e...[color=blue]
          > "Savut" <webki@hotmail. com> wrote in message
          > news:Xc5zb.5187 $yd.990114@news 20.bellglobal.c om...[color=green]
          > > 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[/color][/color]
          OOP.[color=blue]
          >
          >
          > 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.
          >
          >[color=green]
          > >
          > > Savut
          > >
          > > "Jacob Larsen" <post@jfl.dk> wrote in message
          > > news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...[color=darkred]
          > > > What are the differences between ASP's OOP and Php's?
          > > >
          > > > /Jacob
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Terence

            #6
            Re: asp vs. php

            Savut wrote:
            [color=blue]
            > 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
            >[/color]

            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).


            Comment

            • Dag Sunde

              #7
              Re: asp vs. php

              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" <webki@hotmail. com> wrote in message
              news:SY6zb.172$ %i5.10734@news2 0.bellglobal.co m...[color=blue]
              > You are wrong as in the fact, VBScript can create class, class[/color]
              metamorphis,[color=blue]
              > 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[/color]
              and[color=blue]
              > C# are more OOP than PHP for sure.
              >
              > Savut
              >
              > "Dag Sunde" <dag.nope@orion .no.way> wrote in message
              > news:3fccf288$1 @news.wineasy.s e...[color=green]
              > > "Savut" <webki@hotmail. com> wrote in message
              > > news:Xc5zb.5187 $yd.990114@news 20.bellglobal.c om...[color=darkred]
              > > > ASP is full OOP with all the feature of OOP, PHP is not yet OOP but[/color][/color][/color]
              the[color=blue][color=green][color=darkred]
              > > > version 5 is almost near. Hope the next version (PHP6 ?) will be more[/color][/color]
              > OOP.[color=green]
              > >
              > >
              > > 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.
              > >
              > >[color=darkred]
              > > >
              > > > Savut
              > > >
              > > > "Jacob Larsen" <post@jfl.dk> wrote in message
              > > > news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...
              > > > > What are the differences between ASP's OOP and Php's?
              > > > >
              > > > > /Jacob
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Philipp Lenssen

                #8
                Re: OOP: asp vs. php

                Jacob Larsen wrote:
                [color=blue]
                > What are the differences between ASP's OOP and Php's?
                >[/color]

                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

                Comment

                • Savut

                  #9
                  Re: asp vs. php

                  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" <post@jfl.dk> wrote in message
                  news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...[color=blue]
                  > What are the differences between ASP's OOP and Php's?
                  >
                  > /Jacob
                  >[/color]


                  Comment

                  • Chung Leong

                    #10
                    Re: asp vs. php

                    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" <post@jfl.dk> napisal w wiadomosci
                    news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...[color=blue]
                    > What are the differences between ASP's OOP and Php's?
                    >
                    > /Jacob
                    >[/color]


                    Comment

                    • Chung Leong

                      #11
                      Re: asp vs. php

                      Yeah, in PHP we don't have things like

                      System.Object
                      System.Web.UI.C ontrol
                      System.Web.UI.H tmlControls.Htm lControl
                      System.Web.UI.H tmlControls.Htm lContainerContr ol
                      System.Web.UI.H tmlControls.Htm lGenericControl

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

                      Uzytkownik "Savut" <webki@hotmail. com> napisal w wiadomosci
                      news:SY6zb.172$ %i5.10734@news2 0.bellglobal.co m...[color=blue]
                      > You are wrong as in the fact, VBScript can create class, class[/color]
                      metamorphis,[color=blue]
                      > 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[/color]
                      and[color=blue]
                      > C# are more OOP than PHP for sure.
                      >
                      > Savut
                      >
                      > "Dag Sunde" <dag.nope@orion .no.way> wrote in message
                      > news:3fccf288$1 @news.wineasy.s e...[color=green]
                      > > "Savut" <webki@hotmail. com> wrote in message
                      > > news:Xc5zb.5187 $yd.990114@news 20.bellglobal.c om...[color=darkred]
                      > > > ASP is full OOP with all the feature of OOP, PHP is not yet OOP but[/color][/color][/color]
                      the[color=blue][color=green][color=darkred]
                      > > > version 5 is almost near. Hope the next version (PHP6 ?) will be more[/color][/color]
                      > OOP.[color=green]
                      > >
                      > >
                      > > 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.
                      > >
                      > >[color=darkred]
                      > > >
                      > > > Savut
                      > > >
                      > > > "Jacob Larsen" <post@jfl.dk> wrote in message
                      > > > news:3fccdd44$0 $29414$edfadb0f @dread15.news.t ele.dk...
                      > > > > What are the differences between ASP's OOP and Php's?
                      > > > >
                      > > > > /Jacob
                      > > > >
                      > > >
                      > > >[/color]
                      > >
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      • Henk Verhoeven

                        #12
                        Re: OOP: asp vs. php

                        > ASP-VBScript has private members/ methods (variables/ functions). I[color=blue]
                        > missed that in PHP.[/color]
                        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,


                        "Philipp Lenssen" <info@outer-court.com> wrote in message
                        news:bqkahi$24a pv0$1@ID-203055.news.uni-berlin.de...[color=blue]
                        > Jacob Larsen wrote:
                        >[color=green]
                        > > What are the differences between ASP's OOP and Php's?
                        > >[/color]
                        >
                        > 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[/color]



                        Comment

                        Working...