Reply to Re: [PHP] Re: Suggestions for class design

Your name:

Reply:


Posted by Manuel Lemos on 10/08/88 11:27

Hello,

on 09/20/2005 01:51 PM Murray @ PlanetThoughtful said the following:
>> I do not understand why this could bother you or anybody else. If you
>> have a better solution, nothing stops you to make your recommendations.
>
> Hi Manuel,
>
> I did make my recommendation. To you. It went something like (and I'm
> paraphrasing), "Your proposed solution doesn't solve the original poster's
> conceptual problem with abstracting classes that deal with collections of
> objects in conjunction with classes that abstract single objects."
>
> In other words, and I realize I'm stretching out on a limb with this
> metaphor, I saw in your post an attempt to treat the symptoms without
> offering a cure for the disease.

That is your impression because you really do not know how Metastorage
generated code works.

It provides several types of functions that retrieve and manipulate
collection. Retrieval is done by storing all collection objects in an
array that is returned by those functions. There is no need for a
separate class to abstract collections.


> And your perception of bias may or may not be accurate. I don't recall
> delivering wrath-of-god denunciation of your suggestion to use a project you
> developed, just acknowledged a desire to promote a project you're probably
> (and perhaps justifiably) proud of. You say that wasn't a component of your
> recommendation. I'm willing to accept that, not that I expect you to be
> losing any sleep over whether or not I believe you.


The problem is that I am not promoting Metastorage because I am proud of
it. Actually I do not promote any of my projects because of pride or any
other ego related reasons. I wish some people did not guess that wrong,
but I admit that sometimes it is hard to make certain intentions clear.

I let others know about my projects because that helps maximizing the
chance of getting valuable feedback from potential users like bug
reports and feature suggestions. This is good for me because ultimately
I also benefit from any improvements done on my projects due to user
feedback.

Anyway, it would be pointless for me to let other people know about
projects of mine that do not address their needs, as that would not
raise their interest.

What I am trying to tell you is that while I may not be clear enough, I
was trying to tell the original poster how Metastorage solves the
problem he wants to solve. That does not mean he will be interested to
use Metastorage, but at least it may raise his interest in studying how
Metastorage solve his problem. If he will become interested in
Metastorage later, I am not concerned. If he will, fine, if he doesn't,
no problem either.



> Thank you for the extra explanation. I still don't understand the comment's
> relevancy to the actual question being asked by the original poster, but I
> will explain, in case it's of interest, why that comment caused me some
> confusion:
>
> - The original poster outlined that he had created a class that represented
> a customer.
>
> - He told the list he was having difficulties with the concept of
> abstracting a collection of customers
>
> - He received some helpful suggestions from the list about how to approach
> that task
>
> - None of which would have meant he was 'trying to retrieve objects into
> memory before they exist.' I don't know about anyone else, but what that
> comment implied to me was that the original poster was attempting to
> instantiate a class as an object before including the file that contained
> the class definition.

No, that was not my point. My point is that if you want to get a
collection of customers, you want a list of objects that may contain
more than one. Therefore what represents better a list of objects of
some class, is not an object of a class, but rather an array eventually
created by a factory object.

I do not think it does not make much sense that the factory object be of
the same class of the list of objects that you want to retrieve. So,
first you create the factory class object and then it will retrieve the
customer objects into an array. What he was doing is to make the
customer class a factory for a collection of its own objects.

I am not sure if my comment is clearer now.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

[Back to original 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

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