By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,889 Members | 1,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,889 IT Pros & Developers. It's quick & easy.

Tut needed on PHP + OOP

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.