I need to develop a script to work with an API service (RESTfull) class library. The final product should be a module with some user interface. This module I should import into a work project. So I searched design patterns to create my file structure.
The first option pattern Gateway with files structure like here:
--/Classes ----/libApiClasses -------(files Class API service here) ----Gateway.php - work with libApiClasses ----Log.php --/Html - html templates for response ----template1.html ----template1.html ----.... --index.php - work with class Gateway.php & Log.php
The second idea uses a default MVC pattern, with thin controller & model and components folder to work with library API Classes:
--/Controller ----CMain.php --/Components ----(files Class API service here) --/Model ----MGateway.php ----MLog.php --/View ----template1.html ----template1.html --index.php
The real plus MVC, it's very popular. Everybody know it. p.s Sorry for my English