Thanks for you reply.
Description is NOT a description of the photo. It is a description of the user. It can be anything (a description of the user himself or services he offers) and a user can have 0 or more descriptions.
In another post, I was suggested to introduce in the system a...
Hi,
I would like to know if there's a way to avoid bad repetition like this one (I use PHP):
I have a User class:
class User{
private $conf;
private $photos = Array();
private $addresses = Array();
private $descriptions = Array();
...
public function...
Jason, I'm sorry for disturb you again, just a quick question:
do we use a photo repository for encapsulation purposes? I'm mean, what are the advantages to use a Photorepository?
Thank you very much for your help.
Jason, you helped me a lot. There's still another thing that comes from my unfamiliarity with java (I use PHP)
When you write statements like this one:
PhotoRepository.LoadPhotosFor(user);
What does exactly mean? Does it populate the "photos" array, by using internally a sort of for cycle...
Jason, sorry, just another quick question. I need to let the user upload the foto. The method upload, where should it be implemented ?
In the Photo Class or in the User class?
Thank you very much in advance!
Thank you!
The fact is that I really can't figure out, how the two classes are associated, I mean:
let's suppose that I give the user (it is so) the ability to add (upload) a photo and delete a photo.
Then, according to what you say, these methods should be part of the Photo Class.
which...
Sorry if I bother you with this, but I'm a OOP newbie and I would like to know your opinion about that.
I'm developing a site which requires registration and where users can upload their fotos. The question is this:
I created a user class
Code:
class User{
private $username;
private...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.