You are here: Re: PHP 5 & OO « PHP Programming Language « IT news, forums, messages
Re: PHP 5 & OO

Posted by Colin McKinnon on 08/24/05 11:25

Ramon wrote:

> Hello all,
>
> Over the last couple of month, since the release of PHP 5 I have been
> involved in a number of heated discussions which sometimes reduced them
> selves to blatant name calling and an occasional deodorant throw, which
> if I mad add, was precisily aimed at my head.

Sounds like you deserved it Ramon ;)

>
> The only mechanic in PHP to transcend this problem at the moment is with
> the use of Sessions,

No. An object can be treated as a piece of data. Since you're using PHP5,
you don't even have to worry about ensuring the class is loaded before
de-serializing the object. The object can be stored in a file, in a
database, in a form field....just about anywhere (except maybe a cookie -
'cos of the size).

> which are just regular files.

No. The default session handler uses files. You can use any store PHP can
interface with - DBs, shared memory, files, cluster shared memory....

> I could only imagine
> the performance hit involved in finding out if another user on the
> system had a certain object loaded into a SESSION...

Very little in the grand scheme of things. Why not measure it?

> and what if this
> PHP application had thousands of concurrent users? Would you have to
> iterate though all the *session* files to find the one with that object
> open? Yes, you would.

Whoa - you mean you have a class which can onlybe instantiated by a single
user? And you want to access other peoples sessions from within your code?
Where's my deoderant can - no, make that a brick.

> So what is the point of OO in PHP?
> To make the code appear neater?
No, although, in principle anything done with OO can be acheived using
procedural or even functional code. The former just makes it much simpler
(particularly if interfaces are inportant).

> To allow greater maintainability?
See prev answer.

> Why are people talking about PHP6 & Name spacing? :)

Never written a large PHP application Ramon?

> Oh yeah, and my question:
> How are 2 users able to share a run-time object in memory?
> Is it even possible?
> How do you get around the problem? EZPDO? DB::DataObject?

This is damn tricky to do with Java/C++ etc. That's why there's Corba, COM,
DCOP, ORBit, D-BUS....
One wonders what problem causes you to think this is the solution.


Hey man your post sucks!

C.

 

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

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