Tut needed on PHP + OOP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Animesh K

    Tut needed on PHP + OOP

    Hello All:

    Is there a good tutorial/article on the web for Object oriented
    programming with PHP in the context of HTML (or XHTML)?

    I have looked around on Google, but perhaps with wrong keywords.

    Best regards,
    Animesh
  • NC

    #2
    Re: Tut needed on PHP + OOP

    On Sep 3, 1:22 pm, Animesh K <animesh1...@gm ail.comwrote:
    >
    Is there a good tutorial/article on the web for Object oriented
    programming with PHP in the context of HTML (or XHTML)?
    Have you tried the obvious:

    http://php.net/OOP (OOP in PHP 4)
    http://php.net/OOP5 (OOP in PHP 5)

    As to the "OOP in the context of HTML", you probably need to read up
    on DOM (Document Object Model) and its implementations in PHP:

    http://php.net/DOMXML (PHP 4)
    http://php.net/DOM (PHP 5)

    Cheers,
    NC

    Comment

    • Animesh K

      #3
      Re: Tut needed on PHP + OOP

      NC wrote:
      On Sep 3, 1:22 pm, Animesh K <animesh1...@gm ail.comwrote:
      >Is there a good tutorial/article on the web for Object oriented
      >programming with PHP in the context of HTML (or XHTML)?
      >
      Have you tried the obvious:
      >
      http://php.net/OOP (OOP in PHP 4)
      http://php.net/OOP5 (OOP in PHP 5)
      >
      As to the "OOP in the context of HTML", you probably need to read up
      on DOM (Document Object Model) and its implementations in PHP:
      >
      http://php.net/DOMXML (PHP 4)
      http://php.net/DOM (PHP 5)
      >

      Actually I did look at php.net; I was looking at some constructive
      example rather than principles and isolated examples of OOP. For
      example, an explanation of creating a blog with PHP + OOP.

      I can try to decipher some frameworks like Wordpress or Cake, but that
      will be cumbersome to understand.

      Thanks,
      Animesh

      Comment

      • NC

        #4
        Re: Tut needed on PHP + OOP

        On Sep 4, 11:36 am, Animesh K <animesh1...@gm ail.comwrote:
        >
        Actually I did look at php.net; I was looking at some constructive
        example rather than principles and isolated examples of OOP. For
        example, an explanation of creating a blog with PHP + OOP.
        >
        I can try to decipher some frameworks like Wordpress or Cake,
        If memory serves, Cake actually has a tutorial that describes creating
        a simple blog... WordPress, meanwhile, gets by with very little OOP;
        it does use some OOP internally, but its extension mechanism (hooks
        and filters) is purely procedural. Incidentally, so is Drupal's...

        Cheers,
        NC

        Comment

        • Animesh K

          #5
          Re: Tut needed on PHP + OOP

          NC wrote:
          On Sep 4, 11:36 am, Animesh K <animesh1...@gm ail.comwrote:
          >Actually I did look at php.net; I was looking at some constructive
          >example rather than principles and isolated examples of OOP. For
          >example, an explanation of creating a blog with PHP + OOP.
          >>
          >I can try to decipher some frameworks like Wordpress or Cake,
          >
          If memory serves, Cake actually has a tutorial that describes creating
          a simple blog... WordPress, meanwhile, gets by with very little OOP;
          it does use some OOP internally, but its extension mechanism (hooks
          and filters) is purely procedural. Incidentally, so is Drupal's...
          >

          You are right that CakePHP has a tutorial to get a working blog. But it
          does not serves as an example to understand "how to construct an OOP
          framework in PHP for html output."

          That's the goal I have in mind.

          Thanks,
          Animesh

          Cheers,
          NC

          Comment

          • Animesh K

            #6
            Re: Tut needed on PHP + OOP

            Jensen Somers wrote:
            Animesh K wrote:
            >NC wrote:
            >>On Sep 4, 11:36 am, Animesh K <animesh1...@gm ail.comwrote:
            >>>Actually I did look at php.net; I was looking at some constructive
            >>>example rather than principles and isolated examples of OOP. For
            >>>example, an explanation of creating a blog with PHP + OOP.
            >>>>
            >>>I can try to decipher some frameworks like Wordpress or Cake,
            >>If memory serves, Cake actually has a tutorial that describes creating
            >>a simple blog... WordPress, meanwhile, gets by with very little OOP;
            >>it does use some OOP internally, but its extension mechanism (hooks
            >>and filters) is purely procedural. Incidentally, so is Drupal's...
            >>>
            >>
            >You are right that CakePHP has a tutorial to get a working blog. But it
            >does not serves as an example to understand "how to construct an OOP
            >framework in PHP for html output."
            >>
            >That's the goal I have in mind.
            >>
            >Thanks,
            >Animesh
            >>
            >>
            >>Cheers,
            >>NC
            >
            Chances of finding such a tutorial or book are highly unlikely. You will
            need to learn the individual parts and combine them into one solid piece.
            >
            A few books I can recommend are "Advanced PHP Programming (Sams
            Publishing)" and "Profession al PHP5 (Wrox)"
            >
            On a side note: Why do you want to construct an OOP framework from the
            ground up? It's a lot of work on your own, it's hard to maintain and
            write new features at the same time. Like so many others I made an
            attempt to write one a few years ago but I realized in time that it was
            just too big and I should redirect myself towards using and contributing
            to an existing framework. CakePHP, Symphoni, even Drupal and Joomla
            (allthough not fully PHP5 OOP) have a very large community behind them
            which take care of 1001 tasks ranging from security issues, new features
            and support.
            >
            Thanks Jensen. May be my approach is wrong, but I want to build a _small
            one_ to understand the issues in making such a framework. I would love
            to contribute to cakePhp or symphony (provided I reach any level of
            expertise).

            Right now, even naming conditions are a mystery. Thanks for the names of
            pertinent books.

            Best,
            Animesh

            Comment

            Working...