没有合适的资源?快使用搜索试试~ 我知道了~
front-controller-php-example:前端控制器 PHP 示例 - 音乐播放器
共89个文件
php:62个
js:10个
html:3个
需积分: 9 0 下载量 76 浏览量
2021-06-23
18:16:14
上传
评论
收藏 76KB ZIP 举报
温馨提示
前端控制器 PHP 示例 - 音乐播放器 演示项目,展示了实现前端控制器模式和为 API 创建自己的微框架是多么容易。 当前项目模仿音乐播放器和 Spotify API 提供的音乐搜索。 技术决策 我决定实现前端控制器模式来封装典型的请求 -> 路由 -> 调度 -> 响应周期。 我相信我可以称之为简单的 API CRUD 微框架,用于在 PHP 上创建小型服务。 音乐播放器应用分为两部分: Frontend(前端)应用程序(AngularJS 和 Bootstrap); 带有我用 PHP 编写的自定义微服务的 API 服务器(后端)。 通过这种方式,我们可以讨论处理严重负载,通过提供多个前端和后端服务器之间的负载平衡(HTTP 缓存服务器和另一个中间件)。 由于在这种情况下数据存储不是很重要我选择了 SQLite,对于生产应用程序当然应该改为更严重的东西。 为了不使用现有
资源推荐
资源详情
资源评论
收起资源包目录
front-controller-php-example-master.zip (89个子文件)
front-controller-php-example-master
.gitignore 54B
README.md 20KB
App
BaseController.php 894B
Containers
CacheDataContainer.php 2KB
SpotifySearchResultContainer.php 1KB
SpotifySearchTrackContainer.php 2KB
UserDataContainer.php 517B
SpotifySearchAlbumContainer.php 686B
SpotifyAuthContainer.php 989B
SpotifySearchArtistContainer.php 691B
SpotifySearchResponseContainer.php 2KB
BaseContainer.php 854B
Response.php 3KB
Singleton.php 1KB
ServiceContainer.php 1KB
Exceptions
NotAcceptableException.php 222B
BadRequestException.php 210B
UnauthorizedException.php 223B
NotFoundException.php 207B
Router.php 2KB
Route.php 4KB
Request.php 6KB
FrontController.php 2KB
Services
Curl.php 4KB
Cache.php 3KB
DB.php 2KB
SpotifyAPI.php 8KB
DataLayer
BaseEntity.php 6KB
Param.php 673B
BaseModel.php 2KB
Dispatcher.php 624B
GetterSetter.php 2KB
Interfaces
CacheInterface.php 1KB
CurlInterface.php 2KB
SpotifyAPIInterface.php 994B
ResponseInterface.php 868B
CacheContainerInterface.php 372B
ServiceInterface.php 597B
RouteInterface.php 914B
SpotifySearchEntityInterface.php 318B
ContainerInterface.php 486B
PDOInterface.php 708B
RequestInterface.php 1KB
public
app
services
userAuth.js 277B
playlist.js 763B
user.js 569B
search.js 383B
route.js 349B
app.js 227B
init.js 253B
templates
search.html 4KB
playlist.html 3KB
controllers
playlist.js 4KB
search.js 3KB
index.js 766B
index.html 3KB
style
css
style.css 151B
.bowerrc 40B
tests
Tests
PreTest.php 806B
BaseWebTestClass.php 880B
Base
WebServerTest.php 886B
MusicPlayer
PlaylistBehaviourTest.php 25KB
SearchBehaviourTest.php 4KB
UsersBehaviourTest.php 1KB
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
MusicPlayerAuthController.php 3KB
Entities
PlaylistEntity.php 4KB
SongsEntity.php 5KB
UsersEntity.php 1KB
Models
PlaylistModel.php 4KB
SongsModel.php 5KB
UsersModel.php 1KB
SearchModel.php 2KB
Controllers
SearchController.php 1KB
UsersController.php 1KB
PlaylistController.php 8KB
config
routes.php 2KB
migration
base.sql 374B
config.php 849B
tmp
.gitignore 1B
.travis.yml 202B
共 89 条
- 1
资源评论
薯条说影
- 粉丝: 33
- 资源: 4689
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功