Live data from Hacker News

ROCA: Resource-oriented Client Architecture – an alternative to SPAs

roca-style.org

1–10 of 25 posts

Re: ROCA: Resource-oriented Client Architecture – an alternative to SPAs

#5
I don’t think a server should serve the same content in xml and json.

1. Why cater to this preference - you must ultimately force the consumer to do certain things to consume your data. Where do you stop? If some prefer the data in excel97 should you cater to that as well?

2. Do you want to have the liability of the possibility of the format’s data not being fully synchronized? Serve it one way and it will not happen.

Re: ROCA: Resource-oriented Client Architecture – an alternative to SPAs

#6
post #5

I don’t think a server should serve the same content in xml and json. 1. Why cater to this preference - you must ultimately force the consumer to do certain things to consume your data. Where do you stop? If some prefer the data in excel97 should you cater to that as well? 2. Do you want to have the liability of the possibility of the format’s data not being fully synchronized? Serve it one way and it will not happen…

Virtually every editor, programming language, database system, etc., can deal with json and/or xml. So it's not much of a constraint. And there's nothing stopping you from providing additional streams if they're desired for any reason.

Re: ROCA: Resource-oriented Client Architecture – an alternative to SPAs

#7
post #5

I don’t think a server should serve the same content in xml and json. 1. Why cater to this preference - you must ultimately force the consumer to do certain things to consume your data. Where do you stop? If some prefer the data in excel97 should you cater to that as well? 2. Do you want to have the liability of the possibility of the format’s data not being fully synchronized? Serve it one way and it will not happen…

Most of our REST endpoints can generate HTML, JSON and some of them text/csv. It's been working really well for us since 2016.

Re: ROCA: Resource-oriented Client Architecture – an alternative to SPAs

#10
post #5

I don’t think a server should serve the same content in xml and json. 1. Why cater to this preference - you must ultimately force the consumer to do certain things to consume your data. Where do you stop? If some prefer the data in excel97 should you cater to that as well? 2. Do you want to have the liability of the possibility of the format’s data not being fully synchronized? Serve it one way and it will not happen…

[deleted]
Post reply on HN