472,096 Members | 2,226 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

learning object-oriented programming w/ PHP - any good example projects?

ggg
I'm looking for a complete project/application done with heavy use of of
object-oriented programming & design.

Preferably something well documented and/or commented so that I can pick
it apart and learn how/why they designed it they way they did.

Any suggestions?
Jul 17 '05 #1
2 3348
gg*@gg.com wrote:
I'm looking for a complete project/application done with heavy use of of
object-oriented programming & design.

Preferably something well documented and/or commented so that I can pick
it apart and learn how/why they designed it they way they did.

Any suggestions?


ezPublish is a content Management System which is written completely oo.
As its full of Design Patterns i would recommend what you also studie them.
www.ez.no
Jul 17 '05 #2
gg*@gg.com wrote:
I'm looking for a complete project/application done with heavy use of of
object-oriented programming & design.

Preferably something well documented and/or commented so that I can pick
it apart and learn how/why they designed it they way they did.

Any suggestions?


phpPeanuts is an OOP framework that comes with a tutorial and examples.
It is the third generation of a framework i started to develop because i
when i started with OOP i had just done a self study on knowledge based
systems and was very interested in the use of abstraction. When my
experience with real world applications grew i learnt that smart use of
abstraction was not only the key to software reuse, but also to
object-oriented design (OOD) for maintainable and flexible systems. The
fact that the framework has been rewritten twice from the bottom up has
substantially improved its design.

The design documentation is limited to some essential principles (MVC,
user interface compostion), class diagrams and the 'what is' section of
the website. This is because the focus is to help you get started in
practical application development. If you need theory, there are good
books on system development methods, design patterns, algotithms,
refactoring, test driven development, etc. Read them! But they will not
do much good if you do not find ways to apply the theories. You need
ways to make choices between the many design options. You need
experience with how bad design bites you when you have to maintain and
extend real life software.

When you build a substantial application and refactor relentlessly
(improve its design by the elimination of repetitive code and patterns)
you will probably end up with a framework. Therfore frameworks offer a
practice oriented aproach to learning more about OOP and OOD. With
phpPeanuts you can start off with converting a simple application design
allmost 1 to a domain model in php. PhpPeanuts will take care of
storing and retrieving your objects to/from the database and give you a
default user interface. From then on building an application in
phpPeanuts is essentially a matter of selectively extending and
overriding the default behavior of the framework and extending and
refactoring. By constantly looking at phpPeanuts from the perspective of
extension and specialization we hope you develop a habit of looking at
your own code too with the question: how can i make it extendable and
flexible?

See it like a city: It is one thing to read a traveling guide and seem
some tourist attractions, but really living there is a different matter.
By doing so you get to know it from the bottom up. PhpPeanuts essentally
offers you a map, a starters guide with some examples, some practical
adivice and off you go. It is immanent that there will be times that you
will feel lost in the big city. To help you with that there are the
Hypercode Browsers on the website will help you to learn about the
framework by allowing you to searching for polymorphisms, with wildcards
and scope control. Yes, you will have to read code. Much of the details
are "undocumented". The "why" is usually not explained either. But the
code consists of small methods with explanatory names. With the
hypercode browsers you can move around through the code following method
calls in both directions, and quickly find inherited and overiding
methods. Every time you find a way to get your application do what you
want it to do by just overriding the smallest possible pieces of
framework behavior, you know another "why".

Nowadays most developers work in teams, on applications that have a
history, and therefore a legacy. Learning to find your way in other
peoples code is probably just as usefull as learning design principles.
Only once you know how effective ill-written code can hide a design (and
how you can by tricked by that into hopelessly wrong directions) you
will be really motivated to make your own code communicate its design. I
guess by then you are a skilled OO Developer.

Of course you will also run into limitations of phpPeanuts. Some of them
are introduced deliberately to keep te framwork simple and learnable.
Others are only there becuase i could not figure out how to build it
better at the time it was built. Software is never finished. Please
inform me if you find design limitations that really limit the ways in
which you can override and extend the framework!

Greetings,

Henk Verhoeven,
www.phpPeanuts.org.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Tom | last post: by
3 posts views Thread by Sean McCourt | last post: by
8 posts views Thread by scorpion53061 | last post: by
4 posts views Thread by Christian Blackburn | last post: by
14 posts views Thread by RSH | last post: by
1 post views Thread by Morten Snedker | last post: by
4 posts views Thread by AbrahamLincolnIllinois | last post: by
12 posts views Thread by wickwire | 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.