August 1st, 2011 11:25 am (UTC)
How many hours would it take you to design and implement a custom protocol that does the same job? Document it? Debug it? And if you want your software to have a lifetime beyond your initial contribution, how long will it take for each new developer to learn your protocol?
When you write "JSON REST API" you are still developing a custom protocol. You can re-use a parser that uses JSON, server that implements HTTP as underlying transport, and you can adopt design principle known as REST, however the protocol you have developed is your own, and you are responsible for it working properly. You still have to document it. You still can have terrible bugs in it if you do anything wrong. And sure as Hell, you are supposed to support it.
And finally, what would you have gained by doing so? A small decrease in resource usage. If you're lucky.
Where did I ever mention resource usage? Where did I support lack of layering? Did you really read anything I wrote as if I recommend everyone to write his own server, parser, and state machine implementation for everything? Or did you skim it over and decide "Oh, this is some old-school programmer complaining about people not using assembly language anymore -- let's respond to that!"?
I am talking about software design, and you seem to have no understanding of what software design involves. When you do it, you still fail to distinguish between design decisions that you make, and use of existing components, designed by others already.
The only explanation for this is ignorance -- you do not recognize when you make a design decision because you do not recognize any possible decisions other than one you instinctively made. It's "obvious" because nothing else comes into your mind as an alternative. You are one of those people who decade ago claimed "It's in XML, so it's standardized" -- apparently the only progress they made is switching from XML to JSON.
The most dangerous result of such ignorance is that "obvious" decision can be wrong. Seriously wrong. And you will not understand how wrong it is because it's "obvious" and nothing else can be used in its place, so it must be right, right?
Standards exist for a reason.
Standards exist to allow modular and inter-operable design. They exist so interfaces can be re-implemented without use, or knowledge, of existing implementations, and still be inter-operable.
They do not exist so a person with no understanding of protocol design can pick up a few buzzwords, call a standard parser, and produce something that he believes, is not broken because "it uses standards".
In other words, standards are written for smart people.