TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Implementing REST APIs with Embedded Privacy

10 pointsby stanleytangover 11 years ago

3 comments

SoCoolover 11 years ago
I think, the approach is right but the implementation can be more elegant. Keeping scalability and readability in mind, I would use more declarative/DSL syntax to fine control your resources. Django uses the metaclass to achieve something similar.
hack37over 11 years ago
In software development we call it abstraction. Privacy is for real people.
评论 #6510456 未加载
thibautsover 11 years ago
Why not use one resource and return different fields depending on the type of the requesting user ? I have the same problem to solve right now and not sure yet which way to go.
评论 #6511583 未加载