front-controller-php-example:前端控制器 PHP 示例 - 音乐播放器

时间:2021-06-23 18:16:14
【文件属性】:
文件名称:front-controller-php-example:前端控制器 PHP 示例 - 音乐播放器
文件大小:76KB
文件格式:ZIP
更新时间:2021-06-23 18:16:14
PHP 前端控制器 PHP 示例 - 音乐播放器 演示项目,展示了实现前端控制器模式和为 API 创建自己的微框架是多么容易。 当前项目模仿音乐播放器和 Spotify API 提供的音乐搜索。 技术决策 我决定实现前端控制器模式来封装典型的请求 -> 路由 -> 调度 -> 响应周期。 我相信我可以称之为简单的 API CRUD 微框架,用于在 PHP 上创建小型服务。 音乐播放器应用分为两部分: Frontend(前端)应用程序(AngularJS 和 Bootstrap); 带有我用 PHP 编写的自定义微服务的 API 服务器(后端)。 通过这种方式,我们可以讨论处理严重负载,通过提供多个前端和后端服务器之间的负载平衡(HTTP 缓存服务器和另一个中间件)。 由于在这种情况下数据存储不是很重要我选择了 SQLite,对于生产应用程序当然应该改为更严重的东西。 为了不使用现有
【文件预览】:
front-controller-php-example-master
----.gitignore(54B)
----README.md(20KB)
----App()
--------BaseController.php(894B)
--------Containers()
--------BaseContainer.php(854B)
--------Response.php(3KB)
--------Singleton.php(1KB)
--------ServiceContainer.php(1KB)
--------Exceptions()
--------Router.php(2KB)
--------Route.php(4KB)
--------Request.php(6KB)
--------FrontController.php(2KB)
--------Services()
--------DataLayer()
--------Dispatcher.php(624B)
--------GetterSetter.php(2KB)
--------Interfaces()
----public()
--------app()
--------index.html(3KB)
--------style()
----.bowerrc(40B)
----tests()
--------Tests()
--------bootstrap.php(1KB)
----phpunit.xml.travis.dist(921B)
----LICENSE(1KB)
----composer.json(912B)
----server()
--------index.php(1KB)
--------.htaccess(94B)
----bower.json(308B)
----phpunit.xml.dist(922B)
----src()
--------.htaccess(142B)
--------MusicPlayer()
----config()
--------routes.php(2KB)
--------migration()
--------config.php(849B)
----tmp()
--------.gitignore(1B)
----.travis.yml(202B)

网友评论