tempest-tools/scribe
Composer 安装命令:
composer require tempest-tools/scribe
包简介
Tools for building restful apis with Laravel and Doctrine 2
README 文档
README
This package is the centerpiece of Tempest Tools. Scribe provides a robust set of features for rapid building of RESTful APIs without limiting the developer in terms of the functionality they can implement on top of what the package does out of the box.
A key insight of Scribe is that a RESTful API can be defined as a set of configurations with closures and event listeners providing extension beyond base functionality. This saves time and provides a clear predictable structure to your code.
Key features
Some of the key features of Scribe are as follows:
- Batching and Chaining -- Whole object graphs for multiple resources and their associations can be passed to Scribe instead of dealing with only a single resource at a time.
- Filterable Index Actions -- Index requests can be filtered with a powerful filtering language passed from the frontend.
- Contextual Extendable Configurations -- Scribe uses configurations that respond to designated contexts placed on your web applications routes. These configurations are extendable and leverage many other innovative features to maximize control while minimizing the amount of work required.
- Extendable Queries -- Along with extendable configurations, Scribe offers extendable queries so when multiple queries share common functionality they can extend each other for easier and faster building / maintaining of the queries in the system.
- Simplified Data Transport Between Components -- Scribe passes data from all levels of your application in objects that store normalized information related to the request. This makes it very easy to access the data you need at any place in your code.
- Event Driven Design -- Everything Scribe does fires an event. These events exist at the Controller, Repository and Entity level and let developers easily add their own custom code to implement new functionality or augment existing functionality with minimal hassle.
- Closures, Closures, Closures -- Scribe configs allow you to place closures everywhere, giving you complete customizable control of everything Scribe does in every context.
- Security -- Scribe has a robust permission / validation system built into its configuration structure to give developers fine grain control over every action that can be requested in every context.
- Rapid Prototyping -- Build fully working end points in minutes so your frontend team can begin prototyping right away.
- Deep Control Over your ORM -- If Doctrine does it, Scribe has a configuration option to leverage it.
- Control over what is returned from your requests -- Powerful configuration features for built-in transformers lets you return just the data you want from every request with minimal configuration required.
- Portability -- Scribe is built to be easily ported to other frameworks.
- Construction -- Scribe is built with best practices held firmly in mind.
- Execution Speed -- Even more than best practices, Scribe is built to run as quickly as possible, and using it will prevent many common mistakes that can grind a web application to a halt.
- Test Cases For Everything -- Everything Scribe does is included in a test case for easy reference on how to implement the feature.
- Learning and Documentation -- We are in the process of providing fully detailed docs for all features of Scribe to make learning easier.
More On The Way
The features in the first release of Scribe are just the tip of the iceberg. Here is a peak at what is coming next:
- Integration with Quill for easy cache invalidation via Scribe configs.
- Integration with Raven for easy notification configurations.
- Query Blocks. A future version of Scribe will support the designation of blocks of query logic that are able to be switched on and off via the flags passed from the front end. The blocks can lead to other blocks stored in queries in other repository classes can require placeholders, and will be fully controlled by permissions. Blocks can be as simple as just showing a new field in the return, or as complex as you can imagine; the choice is up to the developer.
- Configuration Builders. A future version of Scribe will include configuration builder classes -- for users who prefer to build their configuration files by using builder classes instead of manually constructing arrays.
- Events inside built-in transformers to add another way to modify the data returned by the transformers.
- Array transformers for array hydrated returns, as opposed to entity hydrated returns.
- Enhanced controller configuration options, to allow users to have the same level of built-in control over validation and rules enforcement at the controller level that is currently available for Repositories and Entities.
- Improved convenience features for implementing HATEOAS.
- Unlimited fall back contexts can be specified for Scribe configs.
- Options in a controller to assign different transformers in different contexts, and also dependant on hydration types of returns.
- Built-in support for Fractal transformers.
- Integration with Maester for easy full-text search.
More Info
Please see the wiki for additional documentation.
Tempest Tools Scribe can be seen in action in the Tempest Tools Skeleton: https://github.com/tempestwf/tempest-tools-skeleton
Requirements
-
PHP >= 7.1.0
-
laravel/framework = 5.3.*
-
laravel-doctrine/orm = 1.2.*
-
tempest-tools/common = 1.0.*
tempest-tools/scribe 适用场景与选型建议
tempest-tools/scribe 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 11 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「orm」 「rest」 「doctrine」 「middleware」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tempest-tools/scribe 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tempest-tools/scribe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tempest-tools/scribe 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Kinikit - PHP Application development framework MVC component
Store your language lines in the database, yaml or other sources
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-04