-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Gii accessible via Restful API #15
Comments
What would API look like? |
Well the same information that Gii sends as form but in JSON format. Am not sure what is going to change in Gii with Yii3, but whatever is sent via the form should be possible with JSON payload |
Not much conceptually. Gii is a very well done part of Yii 2. |
I think It will be JSON Payload of what is send as form-data right now. I'm not sure how to not duplicate the backend so that the form-data and JSON Payload will share same backend |
That could be done if frontend is using REST API. |
Currently, we are already using the REST API to generate the code. The requirement for this issue is resolved. FYI: @samdark |
@ahmadasjad can you explain how? I have not dived too much into Yii3 yet, but would love to check how it currently works |
Thanks, @ahmadasjad |
Right now you have to use Forms to submit information in Gii. That is good, but it would be better if we could do code generation via an API. That will remove the need for Tools (IDEs et al) to be able to generate things using their own “forms” and just POST to API, than now when you have to use ./yii for generating codes automatically.
Using ./yii in code generation is difficult (you have to manage the launched process on different thread to avoid blocking the UI which adds overhead). Also managing response message especially in case of error is difficult.
My Proposal is:
1. Move all Gii functionalities to REST API
2. The current UI should be only a front end to that API
The Topic was discussed here before this issue was opened
The text was updated successfully, but these errors were encountered: