More and more parts of the API ecosystem require JSONPath, and just saying "you should write code instead" doesn't actually help anyone write OpenAPI Overlays, so whats the point?
-4 karma · joined January 27, 2013
More and more parts of the API ecosystem require JSONPath, and just saying "you should write code instead" doesn't actually help anyone write OpenAPI Overlays, so whats the point?
This is about using JSONPath for OpenAPI Overlays and automated API Style Guides like Spectral.
You cannot use jq for either of those things.
Notbing against jq, just a different discussion.
https://blog.runscope.com/posts/you-might-not-need-graphql
tl;dr: maybe you want OData, JSON-API, or one of the many other standards or practices that solve this simple problem as their super-set of functionality on top of the networking principles of REST.
Using GraphQL for this alone is rather nuclear, as you gain a lot with GraphQL but lose other stuff.
After 10 years of writing PHP I took a look at Python. I was confused for about 10 minutes, until I read about lists and dictionaries and saw they were different things.
Who are these people who are just trying to write other languages without looking at the "getting started with data structures" page in the guide, or reading a single book?
And why is learning something flexible and easy before learning something more advanced a problem?
> So I request every one who is passionate about programming and wants a career in programming to keep away from the php language and community as much as possible.
I was writing PHP for a living for a decade. I did a bit of Ruby along the way because it's all the same and who cares. I was then invited to CTO at a tech startup in NY, giving me a visa and moving me from the UK.
I replaced their shittily built Rails API with a PHP one which was 3x faster, did 10x more and was actually tested properly. Very handy.
Now I work for another company, Ride.com. We're building an API in Rails and it feels just like the one I built in PHP using Laravel. Almost identical.
This comapny got me a visa known as "The Alien of Extraordinary Ability" in which my PHP code was used as the basis of my skills.
All of this leads me to think: What the fuck are you talking about.
1. Languages rarely matter. 2. PHP is just fine. 3. PHP will not fuck up your career. 4. PHP will not ruin your ability to learn new languages. 5. You are an actual idiot.
Stop preaching ignorance and get on with writing software.
Quelle f'ing surprise.
Oh and I know Go, so I must be super intelligent, because only super intelligent people use Go.
If you want a data store that exposes your database over HTTP then use on of the billion data stores that is designed to do that. None of those are meant to be a public API, and doing this is so incredibly wreckless and short sighted I could write at least a chapter in a book about it.
Actually, I did write a chapter in a book about it.
https://leanpub.com/build-apis-you-wont-hate
A RESTful API is about so many more things than just shoving a generic CRUD interface on top of your data schema.
https://philsturgeon.uk/markdown/2014/11/30/state-of-markdow...
A lot of implementations in various languages go with static regex approaches, which is a bit shit. This uses an AST which helps out a lot.
By adding the customization elements, people can write "GitHub Tables" or any sort of other extra syntax in.
And by keeping the HTML Rendering separate from the parsing process, other PDF renderers or whatever else could be added.
Somebody could make a [Maruka](http://markua.org/) extension for example, which is just CommonMark + Extra tags + PDF / eBook / etc.
It's not madness, and it will be optimized over time. Fear not. :)
The point was that NodeJS and PHP were pretty close, and I posted (before the update) that I'm sure Node could go quicker.
You run either of them in suicide mode to RUN ALL THE CONNECTIONS and you'll get a speed up. The point is that NodeJS is not magically 4 or 5 times faster than PHP, they're about the same when you the packages you use support the async approach. This update proves they're exactly the same, but similarity is all I was going for.
A lot of the components are in production already, it was built by the original developers to be used in production. It's on 0.3.0 for many parts, which is no further behind where Node was when people started flapping about it :)
NodeJS v0.10.21 + Cheerio
real 0m47.986s user 0m7.252s sys 0m1.080s
NodeJS v0.10.21 + Cheerio + 64 connections
real 0m14.475s user 0m8.853s sys 0m1.696s
PHP 5.5.5 + ReactPHP + phpQuery
real 0m15.989s user 0m11.125s sys 0m1.668s
Considerably quicker! As I said I was sure NodeJS could go faster, but the point of the article was that PHP itself is not just magically 4 times slower, it is in fact almost identical when you use almost identical approaches. :)
That's not an excuse, thats logic. It's very possible that so few people get involved in core development because there is very little motivation to do so. "I can work really hard on something that I feel really passionate about, then have it totally ignored by a bunch of people who think PHP should just remain a cluster-fuck of inconsistent PHP functions." Yaaaay!
See the issue? It's very easy to say "Well why don't you do more?" but when people see those that try being met with negativity in such a big way it REALLY doesn't make me want to even try to help.