php-kitchen / yii2-domain

DDD for Yii2 [In active development - early alpha]
MIT License
35 stars 6 forks source link

More detailed documentation #3

Open StalkAlex opened 7 years ago

StalkAlex commented 7 years ago

Hello, thank you for such promising library. It's a big pain to implement ddd on yii2. You did a great kindness releasing this library:) I understand basic ideas like entities, repositories, but your library consists bigger potential, some concrete ideas, maybe you could share more code examples, more complex using your library?

prowwid commented 7 years ago

Hello @StalkAlex ,

thanks for your reply.

I know that library lacks documentation right now. It is because the library right now is in early stages and has API changes from time to time.

I was mostly working on CodeSpecs module for Codeception and PHP Tester for the past months and wasn't working on this library.

I have following plans right now:

Then I would work on documentation.

I would try to prepare some samples

With best regards, Dmitry

StalkAlex commented 7 years ago

Thanks for response. Feature with value objects would be very useful. Looking forward to see much development activity here :) Hope there won't be much hard breaks of compatibility with previous versions) we're going to use it in production. Maybe I can help with PRs after better understanding library internals. Good luck with other projects!

prowwid commented 7 years ago

Hello @StalkAlex

right now I'm thinking of few things that might break BC

  1. Increase PHP version to PHP 7.1 (PHP 5.6 must die :smiling_imp:)
  2. Think that better to separate Mapping and Record classes. Because right now Records being used as mapping objects but can easily be used in Yii style. I wish to use more strict rules: use records only with records repository but with entities use records only as mapping to DB without an ability to use records directly. But I haven't made my mind about this one as neither this or current approach can't be called good enough. PHPDoc annotations could have solved the issue with mapping but would also affect performance in a bad way.
  3. Thinking of introducing proxy for Yii query object or some kind of extended query that would smoothly replace current query realization for entities.
  4. Major BC break - this library would be moved to another organization and namespaces would be changed in upper camel case format - like all normal people do nowadays:smiley:

I use this library in production systems because I have control over the code base and the library but I didn't expect that someone would begin to use this library (because I wouldn't have:satisfied:) at such early stage (I would say early alpha). So sorry if changes for the next release would cause troubles.

StalkAlex commented 7 years ago

Ok, no problem 👌 , anyway don't see much troubles with those changes. Keep us up to date! 👍 😄
About not using at such early stage, there is not much of a choice either making all this by myself or use Doctrine.

prowwid commented 7 years ago

@StalkAlex ,

you can check the future version of this library at Yii2Domain new home

Soon I would update readme's and packagis telling that libraries are abandoned and moved to another location

prowwid commented 7 years ago

@StalkAlex ,

I've just created Discord server for communication with anyone who wants to discuss libraries in the new organization( PHP Kitchen). Here is an invitation

StalkAlex commented 7 years ago

@prowwid thanks! I'll join.