Skip to content
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

Takes design doesn't work with REST architectural style #1106

Open
piotrkot opened this issue Jun 25, 2021 · 0 comments
Open

Takes design doesn't work with REST architectural style #1106

piotrkot opened this issue Jun 25, 2021 · 0 comments

Comments

@piotrkot
Copy link
Contributor

According to the RESTful API design web services should be specialized around resources and their granularization e.g.
PUT /companies/{id}/locations/{id}/employees/{id}

Building RESTful API services using Takes have problems:

  • One has to heavily use TkRegex, which cannot be passed to TkAuth, TkSecure, TkMethods, etc. (just to name a few). TkRegex can currently be only used in FkRegex, drastically limiting the flexibility of use.
    Do you think adding (many) new constructors containing TkRegex is a good design?
  • There is a class RqHref which let access all query parameters. One could create a similar class, say, RqPath which could let access all the path parameters with a matcher (similarly to RqRegex). But then we expose ourselves to the errors with class compositions, i.e. assuming the path /companies/{id}/locations/{id}/employees/{id}, a class TkCrudEmployees would only work if it's inside the TkCrudLocations which is inside the TkCrudCompanies. Do you think it's a good design?
  • Or maybe you believe the RESTful API design being a state transfer and close to CRUD operations is not aligned with the object-oriented paradigm of the proper web services' design? In such case it would be nice to share new ideas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants