133
kiki
6y

You know who sucks at developing APIs?

Facebook.

I mean, how are so high paid guys with so great ideas manage to come up with apis THAT shitty?

Let's have a look. They took MVC and invented flux. It was so complicated that there were so many overhyped articles that stated "Flux is just X", "Flux is just Y", and exactly when Redux comes to the stage, flux is forgotten. Nobody uses it anymore.

They took declarative cursors and created Relay, but again, Apollo GraphQL comes and relay just goes away. When i tried just to get started with relay, it seemed so complicated that i just closed the tab. I mean, i get the idea, it's simple yet brilliant, but the api...

Immutable.js. Shitload of fuck. Explain WHY should i mess with shit like getIn(path: Iterable<string | number>): any and class List<T> { push(value: T): this }? Clojurescript offers Om, the React wrapper that works about three times faster! How is it even possible? Clojure's immutable data structures! They're even opensourced as standalone library, Mori js, and api is great! Just use it! Why reinvent the wheel?

It seems like when i just need to develop a simple react app, i should configure webpack (huge fuckload of work by itself) to get hot reload, modern es and jsx to work, then add redux, redux-saga, redux-thunk, react-redux and immutable.js, and if i just want my simple component to communicate with state, i need to define a component, a container, fucking mapStateToProps and mapDispatchToProps, and that's all just for "hello world" to pop out. And make sure you didn't forget to type that this.handler = this.handler.bind(this) for every handler function. Or use ev closure fucked up hack that requires just a bit more webpack tweaks. We haven't even started to communicate to the server! Fuck!

I bet there is savage ass overengineer sitting there at facebook, and he of course knows everything about how good api should look, and he also has huge ass ego and he just allowed to ban everything that he doesn't like. And he just bans everything with good simple api because it "isn't flexible enough".

"React is heavier than preact because we offer isomorphic multiple rendering targets", oh, how hard want i to slap your face, you fuckface. You know what i offered your mom and she agreed?

They even created create-react-app, but state management is still up to you. And react-boierplate is just too complicated.

When i need web app, i type "lein new re-frame", then "lein dev", and boom, live reload server started. No config. Every action is just (dispatch) away, works from any component. State subscription? (subscribe). Isolated side-effects? (reg-fx). Organize files as you want. File size? Around 30k, maybe 60 if you use some clojure libs.

If you don't care about massive market support, just use hyperapp. It's way simpler.

Dear developers, PLEASE, don't forget about api. Take it serious, it's very important. You may even design api first, and only then implement the actual logic. That's even better.

And facebook, sincerelly,

Fuck you.

Comments
  • 7
    Could not agree more
  • 2
    @AndSoWeCode your google api thingy!
  • 8
    @uyouthe "[...] You know what i offered your mom and she agreed? "
  • 25
    I am a simple man. I see a rant against react's over-complicated ecosystem. I handout ++.
  • 4
    Go the way of Netflix and drop that shit, increase your performance and decrease your load times.
  • 0
  • 2
    I'd ++ this a million more times if I could
  • 0
    Is React finished? How will Facebook ever recover
  • 2
    Go and try to pull an event from a Facebook page you own... Good luck with that, it just won’t let you do it without designing your own complex backend
  • 0
    Hmmm...
  • 2
    I agree with the fact that Facebook doesn't design APIs properly and so does Google.
    At least Facebook is giving them for free.
  • 1
    Eh, I love React minus some of the lifecycle methods
  • 1
    This is why I noped the fuck out of React Native when I first tried it. It's overcomplicated for no reason.

    Sadly I have to use Fresco because behind the scenes it works pretty well, but the API...
  • 0
    Praise your new saviour ReasonML/ReasonReact, for thou shalt not stay on a framework for too long.

    Just kidding, this is evolution happening. Seems the final plan (as if there was one) is to merge all the things into ReasonML which is build upon OCaml but with clearer syntax (more brackets).

    Then you don't need immutableJs, Reason is immutable by default. Also no need for flowtype, types get wonderfully inferred like magic. Ditch redux and redux-saga/redux-thunk, because reducers and side effects are a thing in the ReasonReact implementation.

    Also you need no create-react-app, only write

    bsb -init "iHateFacebookApp" -theme basic-reason

    and you created your first app in Reason.

    Sounds... reasonable, eh?
  • 1
    So .... Vue?
  • 1
    @Cyanide so re-frame
  • 0
    Completly agree.

    I don't want to be that guy but I think VueJS and its ecosystem are superior, like in as powerful, more flexible and simpler to use.

    I'm a web developer for many years now but for someone that starts today they are going to have a rough time with such complicated APIs.
Add Comment