Posts: 251
Threads: 151
Joined: Sep 2014
Reputation:
97
Should CI4 provide built-in support for RESTful services?
This would imply handling data format translations (JSON, XML, text...) as well as providing a base REST_Controller to extend in an app.
--------------------------------
Disclaimer: Putting forward an idea without implying any endorsement of it.
James Parry
Project Lead
Posts: 421
Threads: 24
Joined: Oct 2014
Reputation:
18
Those days REST is a must as its common used api solution by many systems.
Just I am not sure if REST_Controller is a good idea.
Perhaps Trait or Interface will be better solution than making different type of controllers..
Posts: 1
Threads: 0
Joined: Apr 2015
Reputation:
1
Yes, REST is required, but REST_Controller is not.
How about a core Formatter? It can serialize the input in Input and deserialize the output in Output by the specified Content-Type.
Posts: 6
Threads: 1
Joined: Apr 2015
Reputation:
0
Yes, REST is required, but REST_Controller is not.
Posts: 1,101
Threads: 4
Joined: Nov 2014
Reputation:
95
I think setting up the routing for REST should be easier than it currently is, and that formatting options should be available for different response types. However, I don't think it's necessary for either of these to be tied to the controller, nor is it necessary to implement both.
I think 3rd party routing solutions are currently more commonly available than response types/output formatters. I also think it will take some careful planning to implement response types/output formatters in a manner which will be useful to a wide developer base and easily extended.
Posts: 421
Threads: 24
Joined: Oct 2014
Reputation:
18
I think that rest will be hard with the current db models which we have ..
It requires orm base objects matching table scheme and auto validation which is not as form validating.
If we want such suppport in ci 4 we need and new model types, and perhaps validation must not be form validation but a validation..
Just thoughts. ..
Posts: 421
Threads: 24
Joined: Oct 2014
Reputation:
18
Yes but it will be pointless to make anything more than an Interface and a rest router definition as all methods has to be covered 1 by 1 by devs.
How ever I already am not sure that anything from those things should be directly at the framework..
May be we have to think for CI extension support and half of the ci4 ideas to be extensions instead of build in features