471,624 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

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
Sep 3 '08 #1
5 1295
NC
On Sep 3, 1:22 pm, Animesh K <animesh1...@gmail.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
Sep 4 '08 #2
NC wrote:
On Sep 3, 1:22 pm, Animesh K <animesh1...@gmail.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
Sep 4 '08 #3
NC
On Sep 4, 11:36 am, Animesh K <animesh1...@gmail.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
Sep 4 '08 #4
NC wrote:
On Sep 4, 11:36 am, Animesh K <animesh1...@gmail.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
Sep 8 '08 #5
Jensen Somers wrote:
Animesh K wrote:
>NC wrote:
>>On Sep 4, 11:36 am, Animesh K <animesh1...@gmail.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 "Professional 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

Sep 8 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Stephen | last post: by
13 posts views Thread by Joe Feldman | last post: by
reply views Thread by Cindy B | last post: by
17 posts views Thread by dingoatemydonut | last post: by
reply views Thread by ultradiv | last post: by
28 posts views Thread by Ian Davies | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.