Lurker News
I am still frustrated with the amount of incidental complexity required whenever I want to do this. My latest attempt was to use a Digital Ocean droplet with Django pre-installed. I guess the biggest issue there was setting up something so that I could easily deploy my local version to the droplet (ended up using git/Github), and ensuring those two environments were in sync. I looked into Docker in some detail about a year ago, and I think it's the only pretty good solution for this I've come across—but there's a steep up front cost in learning/setup etc. (or so it seems).

What services and technologies do you use when you'd like to quickly build a web app which may never be more than a prototype, but may also turn into something real? A big aspect of what I'm wondering is about automatically setting something up for keeping local/production environments in sync, quickly deploying to production, and not having to mess with a bunch of server configuration things, user accounts, security, etc.

Comments (558) 189 threads

Show all comments

Showing thread 2 of 189

nooyurrsdey16 replies#
For some reason people seem to constant doubt Ruby-ists and Rails Devs.

I completely get that other languages have huge benefits over Ruby. Golang being compiled or Java running anywhere, etc... And ruby is slow, totally understood.
But if youre talking about getting a functioning webapp up and running quickly... no way anyone is beating a Rails dev in setting one up. The piping and scaffolding are all built in and the gem ecosystem (for web apps specifically) is so well maintained and robust that you can drop it in to your app and get a functioning product with ease.
I know that's a loaded statement bc Rails becomes not so great in other cases like building speedy backend jobs. But for a small user-facing web app it's hands down the best.

tty73 replies#
I looked into rails in some detail about a year ago, and I think it's the only pretty good solution for this I've come across—but there's a steep up front cost in learning/setup etc. (or so it seems).
sampl2 replies#
Yeah, I never found Rails as easy to learn as others did. Maybe it’s because I was younger and less experienced than now.

Or maybe I’m dumb.

Shank#
There is definitely a learning curve. For me, Rails was unapproachable until I started to give up the idea that I needed a ton of custom stuff in my stack. The "allure" I saw of pulling together a basic routing system and hooking things up by hand completely disappeared after building a pretty substantial web app in _Sinatra_.

Rails makes a lot of decisions for you, but the decisions it makes are the _right_ ones. It's like having a "best practices" box that you can just shove your custom system into, rather than trying to build them in yourself. It's really quite something.
For context: I basically learned Rails by way of building a proof of concept election management system in Rails in about three weeks (more like 1.5 in actual programming time). It also stored votes on a blockchain (ethereum). Even with a relatively complex storage system and interaction model, the Rails best practices left me with a really satisfactory application in no time flat. Perfect for a fast PoC.

ethbro#
Depending on how long ago, I've noticed that the comprehensiveness of third party documentation (i.e. googling "how do I x?") can really change the experience.

My memories of trying to install Linux circa 2000? Not favorable. Though to be fair I was a lot younger then too.

Shank1 reply#
It's best to pick a project and try to build it, rather than learn things from the outside. In isolation, Ruby can be annoying to learn because it's syntactic sugar seems unnecessary. In context of an app, though, it's great. The sugar makes sense.

Rails has a bit of a learning curve, but that learning curve is well rationalized. To borrow a Steve Jobs-ism: you're starting on the 10th floor, when everyone else is starting on the 2nd floor. Out of the box, you get a killer asset pipeline and complete MVC system that's standardized and conventional.
You can throw together a well built webapp without cutting corners in a fraction of the time doing it by hand. Things like a solid REST API practically come free with Rails. That's really valuable.

modernerd5 replies#
What are the best resources to learn Ruby/Rails these days?

Continue this thread — 5 replies

jypepin#
The community is so big, and so focused on conventions over configurations, usually googling "rails " returns a LOT of links to stack overflows and blogs that clearly explains everything. Rails offer so much syntactic sugar/plug and play gem systems that usually things are setup in fewer lines of code than anywhere else.

The downside is that it's easy to build something while barely having any idea how it works, but if you want something up quickly (or if you already know how things work) then it's perfect.

PostOnce2 replies#
Are you aware that Flask exists for Python? I might take that bet about no one being able to go quicker than a Rails dev.
figgis2 replies#
Agreed. Flask or Aiohttp + templating engine of choice + flask-login or aiohttp-security is extremely fast and simple.
djd20#
Pyramid - https://trypyramid.com/ - lightweight like flask but with that little extra that makes life easier (authentication, sqlalchemy integration). Not as heavy/opinionated as django. In fact, would argue, not opinionated at all.. just the right balance.
dempseye#
You left out persistence, which is the most annoying bit of setting up a Flask project, imo.
pjonesdotca#
From the Ruby side Sinatra is just as fast as flask to get something going. Having supported all three ( Rails, flask, Sinatra ) if it's going to be an API. I usually start with Sinatra.
wybiral1 reply#
The benefit of Golang isn't that it's compiled. It's that it has a good IO and concurrency model and the language is strict enough to force certain good practices on developers.

IMO it would be almost as good even if the code execution were as slow as Python or Ruby.

matt20001 reply#
I hear this a lot about Go, but doesn't the webserver handle concurrency for you in most cases? I don't do a whole lot of explicit threading work when I write webservers in Java for example. Or is there something I'm missing that you use the Go primitives for in these cases?
wybiral#
I'm not as familiar with Java but It's more about concurrency than threads. I have more familiarity with Python, so using that as an example...

There are Tornado and asyncio libraries for Python that give you asynchronous networking. But you have to totally rework how you write Python code within those request handlers to factor out blocking IO which makes using existing libraries for DB and such a pain.
Go is built from the ground up to handle IO like that asynchronously so all of your libraries and stuff will just work in that context.
NodeJS is similar to Go in that regard, but the JS language has baggage that gives you weird blends of callback asynchronicity mixed with async/await and it generally just doesn't feel as nature as Go.
Sometimes a simple request/response model isn't enough. Maybe you need a streamed (chunked encoding) API or WebSockets where the performance for massive numbers of connections using threaded servers is going to tank quickly compared to a language like Go that handles the IO and concurrency better from the ground up.

vvanders1 reply#
If backend speed/scale is your concern I'd also throw a vote in for Phoenix. Lots of similar heritage to Rails but built on Elixir/Erlang instead.
strken2 replies#
Phoenix loses my vote for being quick to set up for a web application, because last time I used it, it didn't have a good authentication framework that worked with JSON APIs. What took ten minutes to set up using Devise in Rails took me two days using Coherence in Phoenix.

Unless that's changed since I last tried Phoenix, I'd be hesitant to use it in the same niche as Rails.

mercer1 reply#
I'm a huge fan of Phoenix, in part because it addresses the main issue I had with Rails (too much magic).

But I do agree that losing the huge ecosystem of gems is a significant downside. Hopefully that'll change over time, because other than that, Phoenix really feels like the next iteration of Rails to me.

Continue this thread — 1 reply

arrel#
Guardian has worked great for us for JWT auth
fyfy185 replies#
I’d say the slowness of Ruby is really over exaggerated. For most web applications it’s good enough, and the speed of development (how fast you can ship) almost always outweighs any costs from it being slow.

You can always replace the endpoints that are slow with something written in a more performant language like Golang or Erlang later.
I’ve worked on all sorts of applications from corporate CRUD to mobile billing gateways written in Ruby (usually Rails), and in very few cases has Ruby itself been the bottleneck.

meesterdude#
iirc, the ruby 3x3 benchmark project is getting a ruby game (i think mario) to run at 60fps, and ruby 2.5 already hit that target.

even if it's slow today; the runtime is being improved regularly and making a lot of code just faster with a version bump.

technion1 reply#
I think the rise of Mastodon is really pouring some hot water on that meme. Lots of really small VPSs are running some fairly big instances. Although I'm only personally using one of them, it's very fast, and the general view is that isn't unusual.

I get that it won't hit Twitter scale but that matches the majority of "how do I build a prototype" use cases.

busterarm3 replies#
"Twitter scale" wasn't so much a Ruby/Rails problem as it was an RDBMS (write-many + read-many = road to fail) and writing their own in-house message queue problem. Starling performed worse than just about everything else out there (and their Scala replacement Kestrel isn't much better).

One really insipid blog post and thousands of mindless followers later and the damage to Rails has been done.
That's not to say Rails doesn't/didn't have other issues -- it did. It's just telling that Twitter is the first example people reach for instead of anything else.

Continue this thread — 3 replies

Perseids#
I second that resources consumption with Rails on the production system is only a problem in specific settings (e.g. when your business model depends on many cheap transactions, or when you are running on diverse sets of hosts outside of your control… I'm looking at you, GitLab).

Nonetheless, as a junior Rails developer coming into a 5 people team on a mid-sized project, I saw a diverse set of performance problems during the development phase. E.g. asset pipelines that take ages to compile so that rapid development cycles become impossible or a test suite that took heroic efforts to get down to 15 minutes despite not really doing much computationally-wise. I'm open to alternative interpretations, but I've got the impression that in more performance oriented frameworks the best practice would not turn out to be setting up and tearing down half your server stack before and after each controller test, but instead we would have chosen abstractions that can be plugged together more efficiently.

Continue this thread — 2 more replies

Continue this thread — 11 more replies