3 ms·
First time I tried doing a web startup, we used Rails, Sinatra for testing, and no real client-side JS. Ruby provided a fairly familiar way of thinking about cl
by angersock 10y ago
First time I tried doing a web startup, we used Rails, Sinatra for testing, and no real client-side JS. Ruby provided a fairly familiar way of thinking about classes and objects, and had enough sugar and utilities and great libraries to get a project up in reasonable time.
The second web/healthtech startup I was an early engineer and engineering lead on, and we used Node and C/C++. I initially wanted to backport practices from Ruby and Rails--and did so making some view helpers and other things--but eventually I came around to really enjoying Javascript as a functional-C-with-closures-and-associative-arrays. Almost all of my subsequent hacks and prototypes were in JS, going as far as Angular until it was rolled back for simpler-to-maintain pure JS.
Nowadays I wouldn't bother doing any server-side stuff not in Erlang or Elixir, because the community is a bit mature and conservative and because the languages don't have a lot of magic and are still quite performant. My best-tested web application would probably be an Elixir message board.
- avitzurel 10y agoWhat lead you to "ditch" ruby the second time? (if it was your decision). Would you choose Ruby again today starting fresh? If not, what would you choose?
- angersock 10y agoThe second time was a result of my inability to get the CTO to move off of an ancient version (0.10) of NodeJS--our web frontend could've been quite happy as a Rails or Sinatra app and we could've made great use of ActiveRecord for some of the early problems we tried to solve. However, the realtime component of the system (streaming data to the browser) was implemented using websockets through Node and even if we had Rails for that we still would've kept that part in Node. I would've loved to have kept Ruby around just for scripting and munging, but since it was also a Windows shop (uggggh) I found it more expedient to just move things over to Javascript. The things that I did manage to take from Rails were view helpers for things like generating links, certain types of buttons and forms, and that sort of thing. We ended up doing a lot of reporting and that ended up in boring old SQL, but that would've been the case with Rails too. Today, I'm still a bit faster hacking in JS than I would be getting the rust off of my Ruby...so if I needed to do a spike, I'd do it in Node/Express/pg-node--again, that's just personal skill and speed, your mileage may vary. From a testability standpoint, I think the two ecosystems are about on par (finally), with a slight edge for Ruby. Either one is a fine choice, but if you don't need realtime (websockets) stuff, I think you'll probably just enjoy Ruby more. That said: For starting a new project today, I would use Elixir. I value the already-reasonable testing story. I value the general quality of the ecosystem packages and conservatism (good taste, sorely lacking in Node). I especially value that, as a compiled language, it can catch a lot more of my stupid. I also value that it is conservatively 10x using Phoenix than Rails ( https://github.com/mroth/phoenix-showdown https://github.com/mroth/phoenix-showdown ), and does so while having a much more compelling functional and reliability story than I see in Ruby without slowness-inducing metaprogramming tricks. For the prototype architecture I favor, monolith + a few microservices, that efficiency means I don't have to worry about ops stuff as much at the start. At the end of the day, though, go to war with the framework that you are most comfortable with or the one that most clearly matches the problem space of your domain. For me, that used to be Ruby. For you or somebody else, it still might be--and that's a great thing!