I'd be curious to see the side-by-side PROS and CONS for this approach vs. the OOB Callable Interface pattern. What's the benefit of using one over the other? Thanks for the content!
Callable is not really suitable for this usecase. You will still need to implement everything using if/else etc. But if we pretend that it would suit it, then without the usage of the interfaces the code would be very complex and inefficient with lots of typecasing and map work. Callable shines better with microservices. In case your app should be completely unaware of the payment service implementation. So with callable you would be able to have payment service implementation in the separate repo and never setup this part for sandboxes that do not require payment functionality(and a ton of other cases :))
Ok I got it :) actually easy to implement with callable. But still , there will be way more runtime errors and all the casting will be less efficient with Callable then with predefined structure.
@Neel Kamal, You are right, it can be done easily via the callable interface too. Callable will make more loosely coupled and if you understand the implications of the design, then I suggest go for it!! For the purpose of creating content I wanted to keep it simple and let beginner/intermediate developers understand the principles of DI!
Hi Mohith, could you explain how you associate metadata fields called Default and Stripe in the manner to show implementaron of each Apex clases implemented (title:implementation Apex class) I build those fields at the metadata but I dont how to related to each class implemented as you show at minute 4.03 at your video.
I have used inner classes to make it easier for audience to follow through the content. Use a separate class and no inner classes if you are replicating.
If we really look at the different integration system of payment gateway, they have different way initiate payment with multiple setups , will this work practically for all payment gateway ?
I think this is the most concise and well demonstrated explanation of DI I have seen so far. Well done!
I'd be curious to see the side-by-side PROS and CONS for this approach vs. the OOB Callable Interface pattern. What's the benefit of using one over the other? Thanks for the content!
Callable is not really suitable for this usecase. You will still need to implement everything using if/else etc. But if we pretend that it would suit it, then without the usage of the interfaces the code would be very complex and inefficient with lots of typecasing and map work.
Callable shines better with microservices. In case your app should be completely unaware of the payment service implementation. So with callable you would be able to have payment service implementation in the separate repo and never setup this part for sandboxes that do not require payment functionality(and a ton of other cases :))
Ok I got it :) actually easy to implement with callable. But still , there will be way more runtime errors and all the casting will be less efficient with Callable then with predefined structure.
Thanks Mike! Looks like a good suggestion for upcoming content!!
@@valeryprokudin1499 fggghhjhjgjhjh
Thank you for knowledgeable video 😊
Same thing can be achieved by using out of box Callable interface .
@Neel Kamal, You are right, it can be done easily via the callable interface too. Callable will make more loosely coupled and if you understand the implications of the design, then I suggest go for it!! For the purpose of creating content I wanted to keep it simple and let beginner/intermediate developers understand the principles of DI!
@@msrivastav13 pat and
Good video. We recommend this.
Hi Mohith, could you explain how you associate metadata fields called Default and Stripe in the manner to show implementaron of each Apex clases implemented (title:implementation Apex class) I build those fields at the metadata but I dont how to related to each class implemented as you show at minute 4.03 at your video.
I have used inner classes to make it easier for audience to follow through the content.
Use a separate class and no inner classes if you are replicating.
If we really look at the different integration system of payment gateway, they have different way initiate payment with multiple setups , will this work practically for all payment gateway ?
I missed it. When recording will be available
This is a short quick take video and not a live stream! Appreciate you hanging around here and watching the content and sharing feedback!