You are here: Re: Object Oriented PHP « PHP Programming Language « IT news, forums, messages
Re: Object Oriented PHP

Posted by Angelos on 11/24/05 12:02

> Errrr, stop pretending that you have an OOP design?

I don't pretend to have an OOP design... I know that it is close but not
OO !

> One of the tenets of OOP is encapsulation--codes deal with a different
> concerns should be independent and self-contained. When you have one
> class that does one thing (say validation) directly dependent on
> another class, doing something quite unrelated (say logging), the
> design is rubbish.

Why do you say that the design is rubbish ? In OO everything can relate
to anything ... Who says that a logging Class should not relate with a
Validation Class...

>For the situation you described, you would want some
> kind of slot/socket mechanism. In a typical PHP script though, such
> complexity is really an overkill.

I don't even know how you went into socket programming...
/***********************************************************************/
First of all... I am not going to write a complete OO script because
full OO support in PHP was added in version 5 and my server doesn't
support Ver 5.

Second the only reason that I am using Classes and try to apply OO
concepts in my script is that I want to write reusable code.

I want to have modular program that its module is independent and can be
installed or uninstalled in any time.

I used to program in JAVA and I was really used to Analysis Design and
Implementation process but the last year I started learning PHP and got
lazy...

Anyway thanks for the replies, the "extend" of a class is a solution but
not the best ... I am going to start re-designing something that makes
more sense ...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация