Chizzoz / mtn-momo-developer-basics

MTN MoMo Developer Basics is a repository aimed at giving developers a head start in interacting with the MTN MoMo API's. Disclaimer: This repository is not affiliated with MTN
https://momodeveloper.mtn.com/
MIT License
40 stars 25 forks source link

What is the difference between the PHP and the newly created PHP-cURL #19

Closed zakaria16 closed 3 years ago

zakaria16 commented 3 years ago

I returned back to the code only to find a new branch for PHP has been created what is the key difference between the old PHP and the new PHP-cURL branch? The old php branch API's uses cURL. Can you explain the difference to me?

Chizzoz commented 3 years ago

Hi @Zakaria16! Welcome back! From the look of it, there isn't much difference, just presentation I guess and layout or approach. Anyhow, this repo is aimed at having as many MoMo implementations as possible. Any programming language and even different perspectives in the same language.

zakaria16 commented 3 years ago

Hello @Chizzoz i get it i just wanted to know the reason for it, so i know which one to work on, however, I think creating different branches for same programming language to me is not a good idea

Chizzoz commented 3 years ago

If there was one approach to do it, for a specific language, it would make sense to only have one. I have come across different PHP implementations, some which even use dependencies. To be specific on the use cases for PHP and PHP-cURL branches. I reckon if you have a programming background with understanding of classes and instantiation (OOP) or you want to "include" functions from other files, you could go with PHP. If you have a single file where you want initiate and complete the transactions with existing code, you could use PHP-cURL. Same objective, different file structure. There are also some differences in error handling.

But, inline with your concern, I will say it is not a very good idea to have different programming languages in one GitHub repository as branches. I would be better to have each implementation as it's own repository. Maintaining the structure as is could be quite a headache, but I was avoiding having too many repo's. Maybe at some point, each branch can be migrated to it's own repo, with different people maintaining them.

zakaria16 commented 3 years ago

Alright. I think we can close this issue

Chizzoz commented 3 years ago

Alright chief!