RestyaPlatform/board
GitHub で見るMigrate legacy web service API code base to framework based stack
Open
#1,250 opened on 2017年7月14日
enhancementhelp wanted
説明
Expected Behavior
Migrate current web service API to framework based.. so that it will be easy for others to contribute
Current Behavior
Current web service code is directly tied to PostgreSQL's JSON support. Original idea was that heavy lifting is handled in PostgreSQL level (less PHP handling codes) for high performance.
Possible Solution
Need suggestion to choose the right web service stack (for PHP). Current "possible" options are:
1. API Platform https://github.com/api-platform/api-platform
Pros
- Easy (?) schema.org and Swagger support
- Test case support
- Supports https://github.com/marmelab/admin-on-rest
Cons
- Poor documentation for edge cases:
- Authentication handling. Especially how to add login & register endpoints in API doc
- oAuth support
- Handling file upload https://github.com/api-platform/core/issues/1242
- How to save related fields?
- Symfony based (Performance concerns ?)
- No easy options to generate quick CRUD for database tables with relations (?)
2. Rester https://github.com/moddity/Rester
Pros
- Direct database to API generation
- Swagger support
- Support for custom endpoints
Cons
- No updates since 2015
- Not sure about relations handling
3. PHP-CRUD-API https://github.com/mevdschee/php-crud-api
Pros
- Direct database to API generation
- Swagger support
- Active development
Cons
- Relations handling
- Custom endpoint handling is a pain
- Code is more tight and not component based. For example, Swagger API generation
4. DreamFactory https://github.com/dreamfactorysoftware/dreamfactory
Pros
- Easy API generation admin interface (Apigility like)
- Swagger support
- Active
Pros/Cons
- Laravel based (Composer based, but usually huge lib size)
Cons
- Relations handling (Or, how?)
- Adoption or lock-in (?)
- Performance & security (Or, how to hide endpoints or rename URLs?)
5. Apigility https://github.com/zfcampus/zf-apigility
Pros
- Easy API generation admin interface. First of its kind
- Awesome coding standard
- Extensive documentation
- Has skeleton https://github.com/zfcampus/zf-apigility-skeleton
Cons
- ZF based
- Not very active now
6. Dingo API https://github.com/dingo/api
Pros
- Basic good skeleton
- Slim like easy syntax
- Test case support
Pros/Cons
- Lumen (Laravel) based
Cons
- Relationship handling (?)
- Too much coding for database CRUD
- Active fork? https://github.com/dingo/api/network
Wishlist
- Quick CRUD from database, without code generation. PHP-CRUD-API a la
- Relations support (save & read)
- Swagger support
- Test case support
- oAuth support
- Rate limit handling
- Roles, ACL and security - easy handling. Don't expose all fields to everyone
- Quick code generation for custom endpoints (meaning, other than those are from database) from swagger yml https://swagger.io/swagger-editor/ (Preferably in Slim)
- Quick automated test from Swagger doc. Some available (or misunderstood) options:
- https://github.com/whq731/swagger-mock-file-generator *
- https://www.npmjs.com/package/swagger-mock
- https://www.npmjs.com/package/swaggest-test
- https://github.com/earldouglas/swagger-test
- https://github.com/dzdrazil/swagger-mock-api
- https://www.npmjs.com/package/swagger-mock-file-generator
- https://github.com/cybertk/abao *
- https://github.com/swagger-api/swagger-node