473,562 Members | 2,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 3456
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.
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

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 "undocument ed". 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!


Henk Verhoeven,

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Tom | last post by:
Hey ho, The release of PHP5 seemed like a good reason to try to learn it once more... I'm reading through the O'Reilly PHP/MySQL book and right now, I'm fiddling with objects. I just discovered the proper way to clone objects is *not* "$b = $a->__clone();", as it reads in the book, but "$b = clone $a". Right?
by: NotGiven | last post by:
Please recommend books or web sites to learn more about how to do complex queries using MySQL. A potential client needs lots of summarizations and sub-queries. Many thanks.
by: Sean McCourt | last post by:
Hi I am doing a JavaScript course and learning from the recommed book (JavaScript 3rd Edition by Don Gosslin) Below is one of the exercises from the book. I get this error message when I try to use the calculator. "document.Calculate.Input is null or not an object" Can someone please tell me why this is?
by: scorpion53061 | last post by:
Hi, I am a vb.net guy......(I know boo hiss LOL) I was thinking of learning C# as well. Can I expect a hard road of it as far as a learning curve? As as side note, what made you choose C# over vb.net?
by: Mark Reed | last post by:
Im just learning C#, and am trying to get a button click to generate and display the total plus 10%. I am doing the following, and it works, but does not display to two decimal places, it goes out to many more. I thought by using DOUBLE, it would limit it to two places. Any ideas what I am doing wrong?
by: Christian Blackburn | last post by:
Hi Gang, I saw this for sale online: Microsoft Visual Basic.NET Deluxe Learning Edition Version 2003. I'm wondering is the CD that's bundled with the learning edition just a digitized version of the book or is it an interactive tutorial? Thanks, Christian Blackburn
by: RSH | last post by:
I am exploring OOP and I am trying to get a grasp on the basics. Below is the code that creates a basic Person with basic properties. I also have an Orders Class where Orders are made by Persons. I am having trouble figuring out how to "connect" the two so that when a new Order is created I can specify the Person that it belongs to. ...
by: Morten Snedker | last post by:
After getting to know VB.NET, I'm now about to learn ASP.NET, since customer requests points in this direction. Naturally, I wish to start up in a proper way. As mentioned I'm familiar with VB.NET. But I know very little about creating homepages. What I wan't to know is, if getting to know HTML will be an advantage in regards to learning...
by: AbrahamLincolnIllinois | last post by:
Hello all. On page 479, the 2nd edition of the "Learning Python" book, this code appears class Derived(Base): def __init__(self, arg, *args, **kw): self.__init__(self, *args, **kw) Surely self.__init__ should be
by: wickwire | last post by:
I have created a class and used it to further overload ostream: class drum { ... friend ostream& operator<< ( ostream&, drum const& ); } ostream& operator<< ( ostream& out, drum const& od ) {
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.