+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 11 to 12 of 12

Thread: PHP 5 and OOP

  1. #11
    Newbie CodeJunkie is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    4

    Re: PHP 5 and OOP

    I agree with jordan in that he can localise the DB connection

    For example I like to create an instance of a DB object that handles the SQL connection this in turn can handle a generic mySQL query and return the results.

    I can then pass the instaniated object reference as an argument to another instance of something else I need, giving the new object control of the database.

    This enables me to localise values and encapasulate common routines.

    myCart = new Ecom(new DB());
    pageLayout = new Page(new DB());

    etc

    I dont know if anybody else agree`s or not? but I believe because of the way PHP functions and MySql cohabits, I cant see true OOP akin to Java being in widespread use, I find within PHP it can actually be as much of a hinderance aswell a saviour

    So regarding OOP and linear programming, I guess its just a question of the right tool for the right job...at the right time.. I just use what`s needed
    Last edited by CodeJunkie; 08-22-2008 at 06:29 AM.

  2. #12
    Newbie adserverexpert is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    20

    Re: PHP 5 and OOP

    why < 1% ?

+ Reply to Thread
Page 2 of 2
FirstFirst 1 2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts