3 ms·
Do you think RoR is a good choice when all you really want is a service with a REST API? I prototyped something in a couple of days with Python and Flask and
by criddell 9y ago
Do you think RoR is a good choice when all you really want is a service with a REST API?
I prototyped something in a couple of days with Python and Flask and it made a good enough impression that we are thinking about fully developing the idea. I'm open to just about any tech and am thinking about continuing with Flask (and Flask-restful), using Go, or Ruby on Rails. I have almost no experience with any of these and that's part of the reason they appeal to me.
- trcollinson 9y agoI’ve built rails api only applications for a long time and I find it to be a great experience. Now, to be fair, I pick it because I know Rails very well. But it’s worth taking a look at for sure.
- and0 9y agoAgreed. My latest project has a Vue front-end (it's a small tool) and Rails does a wonderful job just dumping JSON for the front-end to render. Even if it is a little excessive (which I don't think it is), I have features planned in the future where having an ORM like ActiveRecord+Ruby will make things very simple.
- bpicolo 9y agoI'm using Vue + Rails atm as well. Terrific stack, very productive. I still lean on pure-rails for pages that aren't the main, interactive app.
- stevenwoo 9y agoI'm just learning Flask myself - are you using a database for storage? That's my next step. I've done full apps with RoR and this would not be a question at all with RoR, it's already built in, just toying with Python/Flask to learn stuff.
- criddell 9y agoFor the prototype, I just put my data into some json files. Connecting to some kind of database would be my next step if I continue on with it. Probably would use SQLAlchemy. I'm a bit of a REST newbie and so some concepts (esp HATEOAS) are still a bit blurry. I would probably take a little time to dig into just what goes into a well-structured REST service.
- mctx 9y agoCheck out Django Rest Framework - it uses Django’s ORM and adds some really nice features for building a decent sized API
- jfaucett 9y ago> Do you think RoR is a good choice when all you really want is a service with a REST API? I'm going to be honest with you. I love building pure REST apis in rails. The experience is so clean and effortless. That being said there is at least one caveat to using RoR for the first time, and thats that the learning curve is probably going to be a little steeper than a rest lib like flask where things are more explicit, since there is a lot of convention over configuration in RoR. Once you learn the conventions, the development speed is ridiculously fast, but until then things can be pretty opaque and take some time to get used to, especially for people who don't understand well how the ruby runtime works. I've witnessed this on multiple occasions with multiple projects, if there are more advanced/not-stack-overflowable things that need to be done, devs who are working in RoR and ruby for the first time, will run into a lot of roadblocks. This has little if anything to do with their particular skills as a programmer and more to do with the dynamic nature of ruby and a lot of very tricky hacks rails does under the surface to make the end-user api clean and succinct.
- pdkl95 9y agoOne note about RoR: it's very opinionated about using convention over configuration. It's very efficient if you generally work with it's convention. However, if you design and/or goals are regularly in conflict with those conventions, RoR might not be the best tool to use for that project.