0

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

Theresa
  • 3,515
  • 10
  • 42
  • 47
aldbk
  • 1
  • 3

1 Answers1

0

I used MVC pattern and it really create solution.

Thanks this posts:

Community
  • 1
  • 1
aldbk
  • 1
  • 3