3 ms·
Everything just takes too damn long. You gotta trawl through tutorials and connect a bunch of libraries just to get a simple CRUD app with user auth set up. In
by hardwaregeek 6y ago
Everything just takes too damn long. You gotta trawl through tutorials and connect a bunch of libraries just to get a simple CRUD app with user auth set up. In a couple years, hopefully we'll have a mature default library for most usecases and they'll play nice with each other.
For instance, there's exactly one JWT library. To get a simple auth setup going, I'd need to connect this JWT library to my password setup, which I'm gonna need to design too, since I'm using a barebones password hashing lib. Now I need to write the token exchange and validation logic. Then manually put the token in the header/response, etc.
Compare that to Rails where I can install devise_token_auth and just have tokens out of the box. No fuss.
- lostcolony 6y agoOkay, so you're looking for batteries included. What Javascript framework are you using? Or did you just mean on the frontend? I figured from your including it you meant something backend, like Express, which is probably the most popular in that space, and fairly minimal, but super easy to grab the middleware pieces you want. As, yeah, if you're looking for one giant "does all the things" framework, I don't know of any. Even the ones that started that way, reconfigured their projects to keep them optional (i.e., https://github.com/actix/actix-extras https://github.com/actix/actix-extras ) ...and honestly, I feel like most frameworks are moving in that direction. Even ones that want to be like Rails (i.e., Phoenix for Elixir) tend to be very intentional in making the included pieces fit the middleware pattern so you can swap them out easily. So you may be staying with Rails for a while if that's important to you. I will say, comparing when I had to learn enough Rails to get something done, and having worked with Express, and Phoenix, and Gin, it's generally no harder to learn the pieces you need than it is picking up any new batteries included framework. Oftentimes the same web search that would turn up the one bit of syntax you need for the batteries included framework (i.e., "actix-web auth token") will turn up the most obvious choice of middleware you'd need for the middleware approach. And the usage will be of similar effort, once you've installed one.