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

Thread: PHP 5 and OOP

  1. #11
    CodeJunkie is offline Newbie
    Join Date
    Jul 2008
    Posts
    4
    Rep Power
    0

    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 04:29 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #12
    Join Date
    Sep 2008
    Posts
    20
    Rep Power
    0

    Re: PHP 5 and OOP

    why < 1% ?

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Bookmarks

Posting Permissions

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