caoym / Phpboot
Licence: mit
☕️ 🚀 tiny & fast PHP framework for building Microservices/RESTful APIs, with useful features: IOC, Hook, ORM, RPC, Swagger, Annotation, Parameters binding, Validation, etc.
Stars: ✭ 638
Projects that are alternatives of or similar to Phpboot
Go Api Boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
Stars: ✭ 373 (-41.54%)
Mutual labels: microservices, rpc, restful
Restana
Super fast and minimalist framework for building REST micro-services.
Stars: ✭ 341 (-46.55%)
Mutual labels: microservices, restful, framework
Servicetalk
A networking framework that evolves with your application
Stars: ✭ 656 (+2.82%)
Mutual labels: microservices, rpc, framework
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-76.96%)
Mutual labels: microservices, swagger, rpc
Microservices Framework Benchmark
Raw benchmarks on throughput, latency and transfer of Hello World on popular microservices frameworks
Stars: ✭ 615 (-3.61%)
Mutual labels: microservices, framework
Connexion
Swagger/OpenAPI First framework for Python on top of Flask with automatic endpoint validation & OAuth2 support
Stars: ✭ 3,869 (+506.43%)
Mutual labels: microservices, swagger
Framework
.NET Core Extensions and Helper NuGet packages.
Stars: ✭ 399 (-37.46%)
Mutual labels: swagger, framework
Koa Rest Api Boilerplate
💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Stars: ✭ 420 (-34.17%)
Mutual labels: swagger, restful
Lin Cms Dotnetcore
😃A simple and practical CMS implemented by .NET 5 + FreeSql;前后端分离、Docker部署、OAtuh2授权登录、自动化部署DevOps、自动同步至Gitee、代码生成器、仿掘金专栏
Stars: ✭ 401 (-37.15%)
Mutual labels: swagger, restful
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (-33.7%)
Mutual labels: rpc, framework
Deep Framework
Full-stack JavaScript Framework for Cloud-Native Web Applications (perfect for Serverless use cases)
Stars: ✭ 533 (-16.46%)
Mutual labels: microservices, framework
Jeddict
Jakarta EE 8 (Java EE) & MicroProfile 3.2 application generator and modeler
Stars: ✭ 358 (-43.89%)
Mutual labels: microservices, orm
Loopback Next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 3,972 (+522.57%)
Mutual labels: swagger, framework
Eventhus
Go - CQRS / Event Sourcing made easy - Go
Stars: ✭ 350 (-45.14%)
Mutual labels: microservices, framework
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+918.97%)
Mutual labels: orm, framework
Nameko
Python framework for building microservices
Stars: ✭ 4,182 (+555.49%)
Mutual labels: microservices, framework
Typhon
A wrapper around Go's net/http to provide safety and convenience. At Monzo, Typhon forms the basis of most clients and servers in our microservices platform.
Stars: ✭ 580 (-9.09%)
Mutual labels: microservices, rpc
Tarsjava
Java language framework rpc source code implementation
Stars: ✭ 321 (-49.69%)
Mutual labels: microservices, rpc
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (-48.43%)
Mutual labels: swagger, framework
PhpBoot
phprs-restful 2.x is renamed to PhpBoot, and incompatible with 1.x. You can get the old version from phprs-restful v1.x
PhpBoot is an easy and powerful PHP framework for building RESTful/Microservices APIs.
Specialities
PhpBoot provides mainstream features, such as IOC, HOOK, ORM, Validation, etc. But the most striking features are:
1. Designing object-oriented APIs
WITHOUT PhpBoot:
class BookController
{
public function findBooks(Request $request)
{
$name = $request->get('name');
$offset = $request->get('offset', 0);
$limit = $request->get('limit', 10);
...
return new Response(['total'=>$total, 'data'=>$books]);
}
public function createBook(Request $request)
...
}
WITH PhpBoot:
/**
* @path /books/
*/
class Books
{
/**
* @route GET /
* @return Book[]
*/
public function findBooks($name, &$total=null, $offset=0, $limit=10)
{
$total = ...
...
return $books;
}
/**
* @route POST /
* @param Book $book {@bind request.request} bind $book with http body
* @return string id of created book
*/
public function createBook(Book $book)
{
$id = ...
return $id;
}
}
Read more: phpboot-example。
2. Swagger
PhpBoot can automatically generate Swagger JSON,which can be rendered as document by Swagger UI like this:
Read more: Online Demo
3. RPC
Call the remote Books with RPC:
$books = $app->make(RpcProxy::class, [
'interface'=>Books::class,
'prefix'=>'http://x.x.x.x/'
]);
$books->findBooks(...);
Concurrent call RPC:
$res = MultiRpc::run([
function()use($service1){
return $service1->doSomething();
},
function()use($service2){
return $service2->doSomething();
},
]);
Read more: RPC
4. IDE friendly
Features
Installation
-
Install composer
curl -s http://getcomposer.org/installer | php
-
Install PhpBoot
composer require "caoym/phpboot"
-
index.php
<?php require __DIR__.'/vendor/autoload.php'; $app = \PhpBoot\Application::createByDefault(__DIR__.'/config/config.php'); $app->loadRoutesFromPath(__DIR__.'/App/Controllers'); $app->dispatch();
Help & Documentation
- Documentation
- 中文文档
- Email: [email protected]
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].