Re: class? package?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 10, 2008 at 6:32 PM, Iv Ray <pobox@xxxxxxxxxxxxx> wrote:

> If you are designing with OO principles, could you give an explanation of
>> what is the difference classes and packages?
>>
>
> A class is a language construct, classes are processed/executed by php.
>
> A package is an architectural approach - this is how you combine your
> code/classes.

Yeah, I can guess that.

Probably you have noticed this:
The classes in a package are reused together. If you reuse one of the
classes in a package, you reuse them all.

If that's the case, then why not just use one class as one package?
What's the point of splitting a package into several classes? :-(

>
>
>  When I was summarizing the OO principles, that question confused me:
>>
>> http://phparch.cn/index.php/php/43-php-advanced-programming/170-principles-of-object-oriented-design
>>
>
> If you try to follow all these principles, it might take very long before
> you write even a line of code ;)
>
True.

>
> Take what you understand and leave the rest for later. You will become
> better, but will never be perfect ;)
>
You will never be perfect, but you will become better. ;)

>
> Iv
>
> --
>
Thank you any way.


-- 
Regards,
Shelley

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux