apex-enterprise-patterns / fflib-apex-common-samplecode

Samples application illustrating the Apex Enterprise Patterns library
BSD 3-Clause "New" or "Revised" License
205 stars 105 forks source link

Initial steps to separate Opportunities into domain and trigger handler #27

Closed wimvelzeboer closed 3 years ago

wimvelzeboer commented 3 years ago

(Work in Progress) Initial steps to separate Domain from TriggerHandler in Opportunities domain


This change is Reviewable

ImJohnMDaniel commented 3 years ago

@wimvelzeboer -- Why was this PR closed?

PeterLin888 commented 3 years ago

@ImJohnMDaniel It seemed to me that @wimvelzeboer has created #31 which may replace this PR when testing is passed. After that you may want to update the link from #27 to #31 on https://github.com/apex-enterprise-patterns/fflib-apex-common/discussions/323 .

wimvelzeboer commented 3 years ago

@ImJohnMDaniel yeah, I am working on a new PR. That one has a few commits that are more clear. I am still trying to find the best way of implementing it, as there is a big difference in interface structure of these examples compared to the examples in Andrews book "Force.com Enterprise Architecutre". Here the domains have interfaces starting with an 'I' while Andrews domains don't.. Can you please advise what is the best approach?

PeterLin888 commented 3 years ago

@afawcett I wonder whether you may have some minutes to look into #31 which was related to https://github.com/apex-enterprise-patterns/fflib-apex-common/discussions/323 .

I have implemented Service Layer, Domain (TriggerHandler part) Layer and Selector Layer in my org while learning from your excellent 3rd edition book and https://github.com/PacktPublishing/Salesforce-Lightning-Platform-Enterprise-Architecture-Third-Edition .

Now I am about to learn from #31 to implement the Domain (non-TriggerHandler) Layer.

Thanks again for your book and your work at https://github.com/apex-enterprise-patterns and force-di!

And thanks @wimvelzeboer and the AEP team for the https://github.com/apex-enterprise-patterns/fflib-apex-common/pull/300 !

ImJohnMDaniel commented 3 years ago

@ImJohnMDaniel yeah, I am working on a new PR. That one has a few commits that are more clear. I am still trying to find the best way of implementing it, as there is a big difference in interface structure of these examples compared to the examples in Andrews book "Force.com Enterprise Architecutre". Here the domains have interfaces starting with an 'I' while Andrews domains don't.. Can you please advise what is the best approach?

@wimvelzeboer -- understood. Yeah, stay with the convention that you see in this project as well as the fflib-apex-common-samplecode project. When @afawcett wrote his book, he had to copy the Apex Common framework as it was then and make some minor adjustments. Later on we were able to standardize that work in this main repo. As you have noted, there are a few differences between Andy's book repo and this main one. If there is a specific example that you need input on, please just let me know.