Question

I'm new to Zend Framework 2 and I'm trying to build an application for (so far, moderate) "fun" and I need some hints to know how should I structure my application.

I have a existing module that allows me to display some web pages with 2 controllers and a database access.

My application is aimed to use Git's system commands or the GitHub API or the BitBucket API depending on the situation.

I thought of making a interface that "prototype" my methods and make 3 classes that implements it but I don't know if it is possible with the framework, if it is the best way to do it, if I should create a entirely new module to do so, if I should write those methods in diffrerents controllers or if I would be able to call those methods in my current module.

I would really appreciate if you could either answer my questions or provide my a ressource that could help or at least give me some hints.

Thank you

Was it helpful?

Solution

Your thoughts on using an interface sound like the right approach, assuming you want system/Github/BitBucket to be interchangeable.

The rest of your questions relate to organising your app code, to which there is no 'correct' answer, and you are in the best position to judge this; so do what seems most sensible to you. The only thing I'd say is that if you can forsee wanting to use part of the functionality in another application, or wanting to let other people use it, it might make sense to split that part out into its own module.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top