定制 carbontwelve/slim-skeleton 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

carbontwelve/slim-skeleton

Composer 安装命令:

composer require carbontwelve/slim-skeleton

包简介

An opinionated slim skeleton

README 文档

README

styleci Dependency Status Latest Version Software License ghit.me

A rather opinionated skeleton project for getting started with your slim applications. It is heavily inspired by Laravels directory structure, so if you have used Laravel 5 you should feel familiar with this.

Getting started

The easiest method for getting started developing with the Slim3 Skeleton is via the composer create-project command: composer create-project -s dev --prefer-dist carbontwelve/slim-skeleton app

Using npm install will pull in all the node requirements for the gulpfile to run, the gulpfile has serveral helper methods for building js and css from the resource folder as well as a file watcher to build on demand while you code.

Development

Once installed you can use the built in php server with the serve.php helper to run the app in your browser: php -S 127.0.0.1:8080 -t public serve.php

Basic page "router" usage

The Slim Skeleton extends the Slim3 \Slim\Handlers\NotFound handler class with App\Http\Handlers\NotFoundPageResolver which checks to see if the uri path can be resolved to a view inside the path resources\views\pages.

It will first check to see if the uri path is a directory and if so then check to see if there is a index.phtml within it; this means that http://example.com/item-one/item-two will first attempt to resolve to resources\views\pages\item-one\item-two\index.phtml.

If the first check fails it will then see if the view file exists directly, in the case of the previous example it would then attempt to resolve to resources\views\pages\item-one\item-two.phtml.

If both checks fail it passes through to the default Slim3 renderHtmlNotFoundOutput method.

With this simple functionality you can build quite complex websites without having to configure any granular routes!

Roadmap

I found myself needing a simple, yet opinionated, skeleton project to build out other applications using Slim3. For larger projects I tend to go for Laravel5 and so the folder structure is heavily inspired by that framework.

carbontwelve/slim-skeleton 适用场景与选型建议

carbontwelve/slim-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 02 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「mvc」 「slim」 「slim-starter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 carbontwelve/slim-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 carbontwelve/slim-skeleton 我们能提供哪些服务?
定制开发 / 二次开发

基于 carbontwelve/slim-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-16