« first day (2657 days earlier)      last day (2309 days later) » 

11:03 PM
@Wes There we go. That makes a lot more sense.
 
Wes
are you sure they are divisible?
 
Yes. A person can exist independently from an account.
A person HAS an account.
They are not AN account.
 
Wes
great, that makes sense
now Name, that doesn't :P
 
I still think Name makes sense.
A name has multiple parts...a person has a name and that name has multiple parts.
 
Wes
maybe but why does it have an id?
 
11:07 PM
No. The person should have an account ID. Forgot that part. One sec.
 
Wes
a person has an id, not a name
 
Ahhh. Now I see what you mean! Okay. I'll change that too.
 
Wes
@Allenph you sure? a person can exist without an account, but an account can't exist without a person
therefore the personid is a dependency on account
unless well you are planning something else
 
@Wes That makes sense, but then why can't post have a person?! You told me to change that...
 
Wes
aggregates reference other aggregates by id
$personID not $person
 
11:15 PM
Oh, I see.
You're just saying the account should have the person, not the other way around. That makes sense.
@Wes Done.
 
Wes
why are you indenting all the things? :P
	namespace Domain\Aggregate\Account;
namespace Domain\Aggregate\Account;
 
@Wes I like the indent after the PHP tag. Easier to read for me.
 
Wes
that's not important, what's important is conformity to what others do :D
it's just matter of habit
 
Noted. This time not important.
 
Wes
:D
String $ownerPersonId should be int, also you are missing the $this->setOwner ... calls
 
11:23 PM
Fixed. Pushed.
 
Wes
ok now consider this
why would you have Comment::setPostDate() ? once a comment is created, why would it be changed to another date?
also, once it's created, why would you change its author?
setauthorPersonId, setPostDate must go
you don't need them
 
How will they be set then? It's either I use setters and getters or it's a public property...which is worse.
 
Wes
they are set in the constructor only
 
Ahhh.
Nead to leave setId though, right?
That's an optional dependency since it won't always be persisted.
 
Wes
i was about to tell you about that
no, id is not a persistence thing
id is how you reference other aggregates, and you need that regardless you are going to persist it
so the id is also a dependency
and once the comment is created you don't want the id to change
so you need to get rid of setId as well
start by doing this, there's more
 
11:31 PM
Okay...
setPassword also needs to be removed.
 
Wes
why, user may want to change password
 
@Wes Because the passwordHash object is on that property.
They should not change that object...they should use that object to change the password.
 
Wes
that could be a value object, but ignore it for now
do the obvious ones
 
Done. Pushed.
 
Wes
missing getcreationdate in account
function setauthorPersonId and setComments delete them in Post
also setAuthorPersonId in Comment must be removed
that looks about right
sorry if i don't push myself @Allenph i'm doing other stuff
 
11:47 PM
That's all right.
 
here ya go, people: github.com/teresko/blank
 
Done. Pushed @Wes.
 
Wes
nice @tereško
 
I still need to clean up some unused code
 
@Wes you're not online
 
11:50 PM
@tereško That looks much better than my structure for sure.
 
to run it from PHP built in server, you call: php -S localhost:8000 ./public/built-in.php
 
Wes
$this->setAuthorPersonId($author);
in Comment's __construct is not defined @Allenph this is why you need to get phpstorm :P
@Tiffany sorry left because i didn't get reply from you :D
 
@Wes I know that constructor is not defined.
 
@Wes I was sitting at my desk at work playing a game on my phone :S just got home
 
I don't know how to do the collections.
 
Oh, now I see what you meant.
 
Wes
@Allenph $post->getComments()->add(....)
 
@Wes Right...but how do you do that in the mapper?
 
Wes
you do you do
 
I come home, I am serenaded with meows.
 
11:55 PM
hmm .. forgot to commit a class
 
Wes
what's your nick @Tiffany ?
i'm bobo
 
@Wes orcishtylae
 
Wes
i always pick ridiculous names
 
I coudln't think of anything random
 
@Tiffany you might also find that thing useful, since it contains a lot of "thing", like working DIC setup, autoloading, factories ... things
 
Wes
11:57 PM
ready @Tiffany
 
yeah, sorry, was sticking pizza in oven
@tereško the git repo you posted? started looking at it :)
 
What do you put in the ID field on construction of a new row?
 
@Tiffany just do a pull
I forgot to commit some bits
 

« first day (2657 days earlier)      last day (2309 days later) »