Comments (11)
There are certainly some interesting capabilities on this point. I've
captured a note into Pivotal. There are a number of higher items on my
priority list than conforming to the letter with the definition of REST. If
you are interested in contributing some work in pursuit of this goal, I'm
happy to talk design. Otherwise I think this is likely a post-1.0 TODO.
On Mon, Apr 4, 2011 at 9:25 AM, andrashatvani <
[email protected]>wrote:
According to Roy Fielding:
"REST is defined by four interface constraints: identification of
resources; manipulation of resources through representations;
self-descriptive messages; and, hypermedia as the engine of application
state." [1]The first three are incorporated by RestKit (although it seems to couple
REST to HTTP), but the latter one is missing. Namely, there is no built-in
support for links representing possible state transitions or resource
relationships, but rather the related entities need to be embedded or to be
asked for with isolated queries based on id's."...if the engine of application state (and hence the API) is not being
driven by hypertext, then it cannot be RESTful and cannot be a REST API.
Period. " [2]I think most people entirely miss the HATEOAS constraint, because most
frameworks neither enforce, nor support the usage of them. Changing this for
RestKit could improve the quality of and finally enable REST for
wannabe-rest-systems.Reply to this email directly or view it on GitHub:
https://github.com/twotoasters/RestKit/issues/39
Blake Watters
Two Toasters | CTO
[email protected]
(919) 926-8537
from restkit.
I understand that the stability and reliability of the infrastructural components and layers of RestKit is at the moment more important than this constraint. Even JAX-RS will support HATEOAS with version 2.0 at the earliest.
But I'll happily contribute as time allows, because I think that really the frameworks are which should enforce true RESTfulness. Should the Google group be used for the related discussion or is there any other preferred way?
from restkit.
Google Group is the best place for discussion. I'd love to pick this back up on list to discuss possible designs for implementation. Pivotal and Github Issues seem to only be monitored by me.
from restkit.
This is important and we should add it now that OM 2.0 is done.
from restkit.
@blakewatters I've look on google group but I couldn't find any recent discussion about this. Is any development/analysis going on on this topic?
from restkit.
I have done some thinking and design work on what's remaining for this to
really be considered 'done' but there is not an active discussion.
On Mon, May 20, 2013 at 4:21 PM, Fabio [email protected] wrote:
@blakewatters https://github.com/blakewatters I've look on google group
but I couldn't find any recent discussion about this. Is any
development/analysis going on on this topic?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/39#issuecomment-18170137
.
To stay sane & productive, I don't live in e-mail. If you need to reach me
quickly, try this link: https://awayfind.com/blakewatters
from restkit.
Hi @blakewatters what's up about RKPaginator with links ?
We plan to make a REST Api wich returns HATEOAS payloads looking like :
{
"Pagination": {
"per_page": 10,
"total_objects": 250,
"total_page": 25,
},
"MyOjectCollection": [...]
"Links": {
"current": "http:…………….",
"next": "http:…………….",
"previous": "http:…………….",
"last": "http:…………….",
}
}
So, do you think it's already possible with actual RKPaginator or that it's time to contribute to RestKit to support this kind of feature ?
from restkit.
This is definitely where I have been planning to take things. The metadata mapping was another step in this direction -- enabling the use of headers to send down rel links for traversal.
Another major piece for this that I have been working on the design for is to ditch the custom pathPattern
notion in favor of the URI Template emerging standard.
Where I want to wind up for 1.0 is that you can send down complete URLs or templates as headers or values within the payload and use them to discover/load related resources without requiring router configuration.
I would certainly accept a patch that enables the paginator to use server-provided URL's in addition to the pattern based system it currently supports.
In general, I think the paginator needs to see another refresh during the 1.0 development cycle.
from restkit.
@blakewatters ok I imagine you're talking about link in http header the github fashion: http://developer.github.com/v3/#pagination
I think we can manage that and try to implement it, I'll probably soon have some more questions to make things the right way. I'll take a look at metadata mapping internal 1st.
Btw RKPaginator interface don't need to much changes I think. Maybe the init? Maybe you can tell me what kind of RK object I can pass to use header link value for example?
- (id)initWithRequest:(NSURLRequest *)request paginationMapping:(RKObjectMapping *)paginationMapping responseDescriptors:(NSArray *)responseDescriptors
I've seen the - (void)setMappingMetadata:(NSDictionary *)mappingMetadata
method in RKResponseMapperOperation
but I don't know atm how to exploit that kind of meta.
from restkit.
I'm ready to work on paginator improvements to support HATEOAS.
So could you take few minutes to answer my questions in the previous comment & help me bootstrapping my contribution? ping @blakewatters
from restkit.
What's the status of HATEOAS support here? In my mind, this is the most important part of "REST", especially given that using HTTP gives you most of the constraints for free, and I was disappointed to find that a library called "RestKit" doesn't support some of the core concepts of REST.
I'd like to explore adding support for Hypermedia controls, but I've never used RestKit before. Would anyone be interested in helping out with this?
from restkit.
Related Issues (20)
- Not getting response using Restkit 0.27.2 HOT 2
- iOS 12 crash HOT 1
- iOS 12 RKManagedObjectRequestOperation Hangs HOT 1
- App crashes when calling "refreshAllObjects" in iOS 8 HOT 1
- DeadLock iOS 12 HOT 2
- Does not support NSdate to json HOT 1
- Thanks for your patience. And is it possible to update AFNetworking to 3.x? HOT 2
- What's the max capacity of response?
- Context save responses with invalid boolean value
- Cannot use RestKit 0.27.x for Siri Shortcut intents
- Replace NSURLConnection with NSURLSession. HOT 1
- How to Tell the Version of RestKit Included in Project HOT 1
- RestKit is missing to save one record in core-data
- Mapping boolean response
- [RKObjectMapping .cxx_destruct]
- App Crash , Xcode 12.5 this class is not key value coding-compliant for the key HOT 2
- Xcode 12.5 / Xcode 13 Issues
- CoreData: this class is not key value coding-compliant for the key @count. at
- Need support for iOS 17 & Xcode 15 and above with the new URL string parsing changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restkit.