10 ms·
Of course it is. The question is kind of silly. For basically any startup, my advice would be: unless and until you can credibly explain a genuine reason why yo
by sho 8y ago
Of course it is. The question is kind of silly. For basically any startup, my advice would be: unless and until you can credibly explain a genuine reason why you can't use Rails - use Rails.
I'm not some crazy fanboy but until someone can actually name a seriously competitive, batteries-included, all-in-one framework* which delivers everything, or even most of, what Rails does - it is very relevant and you ignore it to your serious disadvantage.
* your list of 30 random npm packages does not satisfy the requirement
- schizoidboy 8y ago> your list of 30 random npm packages does not satisfy the requirement I like Rails, but to be fair, doesn't Rails also require a list of 30 random gems? Unless things have changed, authorization and authentication aren't even built-in, so people have to navigate random third party gems, and remember, you don't want CanCan, but you want the fork, CanCanCan. Again, I like Rails, and maybe it's still the nearest to an all-in-one framework, but I think somebody who took the next step and created a truly all-in-one framework would win big. My current project: $ grep -c ^gem Gemfile 75
- trelliscoded 8y ago> doesn't Rails also require a list of 30 random gems? my-MacBook-Pro:production-web-site me$ grep ^gem Gemfile | wc -l 74 I have mixed feelings about this. On the one hand, the framework isn't strongly coupled, tested as a whole, and opinionated like in Java and .NET land. On the other hand, overriding the "default" Rails behavior for e.g. logging or SAML is pretty easy as long as you can find a gem compatible with the versions of all your other gems. This can easily spiral into out of control technical debt where you're stuck using gems from 6 years ago out of fear you'll tug on one of them and bring the entire house of cards tumbling down, but I've consistently been surprised at how little effort has been required to do gem upgrades as long as they're planned carefully.
- amarsahinovic 8y agoDjango fits that description.
- i_am_nomad 8y agoCame here to say the same thing, and add that with Django, you have access to the amazingly vast landscape of Python libraries. Just being able to spawn Celery jobs is a huge plus.
- joelbluminator 8y agoCouldn't see any advantage over Sidekiq, Resque and friends. Not saying it's bad but just that the Ruby community has got your back for any web development need you might have...when working with Django I didn't get the feeling I am working with superior libraries.
- bpicolo 8y agoAn advantage of Celery is that it doesn't require payment for an enterprise version to add things like scheduled tasks.
- joelbluminator 8y agoIf you're talking about Sidekiq there's free open source solutions for that in Rails world. https://github.com/moove-it/sidekiq-scheduler https://github.com/moove-it/sidekiq-scheduler https://github.com/ondrejbartas/sidekiq-cron https://github.com/ondrejbartas/sidekiq-cron Besides Sidekiq is just one out of many.
- bpicolo 8y agoGood to know, cheers
- ryanbrunner 8y agoAuthentication is built into Rails, albeit in a less "batteries included" way than something like Devise. You'll have to code your own user model, but `has_secure_password` will give you perfectly fine security around storing passwords. And while gems like CanCanCan are great, not every application needs them, and it's relatively straightforward to set up authorization logic directly for most simple cases (i.e. something like "users control their own things, admins control everything". You're right in the sense that I've very rarely seen sizeable apps that are mostly "stock" Rails outside of things literally developed by Basecamp.
- bdcravens 8y agoOne thing I'll say about Node is that the module names seem to be semantic for the most part, unlike the cute names gems seem to get. Walk into a Ruby developer's office and if you see a white board scribbled with random words, you don't know if they have reached the point of stress where their mind has started to break with reality, or if it's just a list of gems for their new project :-)
- Ajedi32 8y agoIt's not a matter of how many packages are required; that isn't the issue. The reason "30 random npm packages" doesn't satisfy the requirement while Rails does is that Rails provides a high-level framework for integrating those disparate packages into a single cohesive application, while with npm packages you have to write that framework yourself. Perhaps the best example I can give for this difference is Devise, an authentication plugin for Rails. Have a look at the instructions for setting up Devise on Rails: https://github.com/plataformatec/devise#getting-started https://github.com/plataformatec/devise#getting-started You just add the dependency and boom, you instantly get a database migration for storing authentication data in your database, automatic integration with Rails's email notification system, a single command you can run to generate all boilerplate files, and a single line of code you can add to your controllers to automatically enforce authentication for any particular action. With a similar authentication package in a Node application you'd most certainly have to set all that up manually.
- mosen 8y agoHow do you think .NET Core 2.0 MVC compares to Rails nowadays? I've been insanely productive with it. Willing to give Ruby/Rails a try, though.
- pjmlp 8y agoFaster in every sense. Go with Ruby/Rails if you don't need the JIT/AOT compilers and high performace GC algorithms.
- mrmondo 8y agoJust FYI - Ruby 2.6 has JIT, not far off being released: https://www.ruby-lang.org/en/news/2018/05/31/ruby-2-6-0-preview2-released/ https://www.ruby-lang.org/en/news/2018/05/31/ruby-2-6-0-prev...
- UK-Al05 8y agoI prefer .net core. But it's missing scaffolding and stuff like that.
- Jedi72 8y agoElixir/Phoenix is the spiritual successor to Rails. Same philosophy of batteries included, developer productivity focussed etc. But with lots of great new shiny things, for example websockets is built directly into the framework, its not an add-on. Its not a direct upgrade, but if you value Rails definitely check it out
- fishtoaster 8y agoElixir/Phoenix is great, and it's first-party support for websockets is an excellent selling point! That said, I feel compelled to mention that rails does have websockets built into the framework now too, as of Rails 5.
- karmajunkie 8y agoThere is no comparison between those two socket implementations. There's several orders of magnitude difference between what elixir and Ruby will support on a single server there.
- joelbluminator 8y agoThe Elixir community would LIKE it to be a spiritual successor for Rails, but it really isn't. If only because of the learning curve of understanding Elixir. Sorry to disappoint anyone but Phenoix is not going to be the new Rails/Django.
- nickjj 8y ago> If only because of the learning curve of understanding Elixir. Sorry to disappoint anyone but Phenoix is not going to be the new Rails/Django. The learning curve isn't too bad. I've been a Rails developer for quite some time and am picking up Elixir / Phoenix in my spare time while building a single side project. This is my first real attempt at picking up a functional language too. The project I'm building is an ambitious project (users, accepting stripe / paypal payments, lots of data modeling, real time aspects, decent amount of logic I haven't implemented in other more familiar frameworks, etc.) but thanks to the community and open source projects to look at I'm making reasonable progress. Of course I'm not as productive as I am in Rails but that's because I'm only putting in a few hours a week into this project (while learning Elixir / Phoenix as I go).
- erokar 8y agoI think Django comes close to Rails with regards to productivity. Granted, Django has slightly more overhead to get started, but Django also includes an admin interface and a built-in auth system, which Rails does not.
- 0xADEADBEE 8y agoI work in a lot of Django shops and my Ruby is nowhere near as good as my Python but I'll pick Rails every time if I'm working on a side project. Why? Because the development velocity when using it is unparalleled. I can have an MVP up orders of magnitude quicker than I can with Django/Flask/Twisted. You're absolutely right on the Admin interface and auth, but auth is a gem install away [1] and Django's admin won't fit my requirements more often than it helps; I can seldom justify exposing it to end users and it's a hideous undertaking to extend it meaningfully (I gather this is one of the reasons it is a bit of a laggard compared with the rest of the framework. We only got mobile support out the box in 2.0 for example [2]). Other reasons I enjoy Rails: - Scaffolds allow me to have CRUD support for any model I want with one command (combined with auth, I have Django's admin, more or less) - JSON views without a third party library (surely this is pretty standard for a web framework in 2018 in most cases?) Other reasons I don't enjoy Django so much: - I can't think of an eloquent way to phrase this but Rails values my time. With Django I'm doing menial minutiae like creating a directory for my app's templates before it'll serve a page. Why? I know 'magic' is anathema to the Python community but context switches like this shouldn't be there when I'm trying to get an app up and running at speed - I feel like it's stewardship is bordering on begrudging: Why are websockets (and JSON for that matter, but I've touched on that) not present in a 'kitchen-sink' web framework? I'm not sure why we're worrying about master/slave DB terminology [3] when there are axiomatically more pressing technical and adoption-related issues at hand. Django is a fine web framework, and perhaps the best-in-breed for Python, but it feels miles behind where it should be at this point and I'm not really sure why. [1] - https://github.com/plataformatec/devise https://github.com/plataformatec/devise [2] - https://docs.djangoproject.com/en/2.1/releases/2.0/#mobile-friendly-contrib-admin https://docs.djangoproject.com/en/2.1/releases/2.0/#mobile-f... [3] - https://github.com/django/django/pull/2692 https://github.com/django/django/pull/2692
- omnimus 8y agoNot saying that it is better but Laravel is mostly rails copy. And has huge active comunity.
- zaarn 8y agoRoR has always been rather impenetrable to me, more-so than some late-stage/terminal Node-based projects. I recently wanted to remove IP logging in a RoR application but I was unable to find the relevant code anywhere, the only hits that grep spat out where the migrations and I couldn't figure out how to rip all that out. In the end a project developer pointed me to the correct file and I had to change a single line (according to their guidance, I had no idea this line even related to IP logging) which fixed it. I don't think that this is something I want in my project, I think I'll keep with .NET and Go even if I don't get the "competitive batteries-included all-in-one framework" packaged in. (Well and there is always the issue that most larger RoR projects like to pull a lot of resources. And seriously the biggest three VMs on my host are an RoR application and the SQL Server which runs both MySQL and PG and the only node.js app I run)
- petepete 8y ago> I recently wanted to remove IP logging in a RoR application but I was unable to find the relevant code anywhere, the only hits that grep spat out where the migrations and I couldn't figure out how to rip all that out. Usually you'd just create a custom logger[0] and tell Rails to use it[1] [0] https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.... [1] https://guides.rubyonrails.org/configuring.html#rails-general-configuration https://guides.rubyonrails.org/configuring.html#rails-genera...
- zaarn 8y agoIt wasn't putting the IP in the log but in the database and along the username and session data, there is an open ticket about that behavior too. Since I'm in Europe/Germany, this kind of data storage would have been a no-go even before the GDPR.
- bshimmin 8y agoIt sounds like you had to remove the Trackable module from Devise - which would indeed be one line of code to change in a Rails app, but quite hard to figure out if you didn't know. However, Devise is a third party gem which is often used with Rails but isn't actually a part of Rails, so can you really blame Rails for this? (And, unless it's for a very specific string, is grepping a codebase that you have no understanding of ever really a successful strategy?)
- lmm 8y agoWhy do you think an all-in-one framework is an advantage? As soon as you want to switch something out you end up fighting the framework and the tutorials. Better to start with dedicated libraries that each do one thing - it's inevitably where you're going to end up. (Not that I'd consider an untyped ecosystem in the first place, especially one as fond of "magic" (e.g. monkeypatching) as rails. I have sympathy for just getting something working as quickly as possible, but there comes a point where you're storing up too much trouble even for the short term)
- M_Bakhtiari 8y agoWhat makes you think Ruby is untyped?
- ealhad 8y agoI think they meant “dynamically typed”.
- joelbluminator 8y agoI think the types argument is bullshit but it's just my opinion. Do python or ruby devs really feel they are less productive than java devs because they have no types? What I see happening is languages like java becoming more dynamic (var etc) and languages like ruby/python getting better IDEs (auto completion will continue to improve).
- IMTDb 8y agoI don't know about ruby and python but in JS there a significant number of projects that aim at adding a type system on top of the launguage
- joelbluminator 8y agoI don't think it's such a huge trend, if it was Python wouldn't be one of the top 3 most popular languages in the world. Yes, there is typescript for Angular. Outside of that how often is it used? Pure JS is still used tons.
- kowdermeister 8y agoOne reason is that the founders don't know rails and it's far from obvious to pick up. Another would be that sometimes a train is not the most practical transportation to travel a few blocks.
- ttty 8y agoShare code between client and server side to get client side prediction and server side validation.
- esistgut 8y agoI'm exploring Nest [0] for my next project. It is a "glue framework" on top of Typescript and many Node libraries, with an Angular like style. Every Node library used has a framework module which provides the integration with the framework [1] so it appears to be both flexible and easy to use. I am just starting to explore Nest and I'm liking it, my previous experience on the backend was on Django for many years and Nest seems like a breath of fresh decoupled air, coming from this heavy monolithic experience. [0] https://nestjs.com/ https://nestjs.com/ [1] https://github.com/nestjs https://github.com/nestjs
- amzans 8y agoI've been interested in trying out Nest too. While I've just been toying around with it, it seems to strike a nice balance between fast to write and easy to scale (in terms of growing the codebase). Hopefully then the path from MVP -> full product becomes smoother. It also makes good use of what Typescript has to offer, which IMO is very much welcomed.
- senoroink 8y agoI've been using nest as well on a project. It's nice, but it's miles behind Rails.
- agconti 8y agoDjango fits this bill.
- sydd 8y agoExcept for 2 things: Finding developers. while it's possible it's much harder that say Java. You'll be in trouble if you are not in a metropolis and need 5+ rails developers. Long term sustainability. While it will work for your MVP, at some point you will need to rewrite it in a language that sclaes to 10.000s of lines of code and that will be painful.
- cutler 8y agoYes, this is a commonly overlooked consequence of adopting Rails. Here in London recruiters are falling over themselves trying to hire Rails developers as so many companies built their stack on Rails. However, once you leave the capital demand for Rails more ore less evaporates. Rails only thrives in tech hubs, probably due to its association with startup culture. Once you leave the capital PHP, Java and ASP.Net dominate.
- tonyedgecombe 8y agoOnce you leave the capital everything evaporates.
- wolco 8y agoCurious why someone would pick rails over php in 2018. Existing pool of developers perhaps.. Any other reason?
- psychometry 8y agoBecause even in 2018 PHP is still PHP?
- wolco 8y agoWhat does PHP mean to you? What are your personal views? From a language perspective it's stable, fast, easy to deploy. Why wouldn't you choose to use it? For most it's not a difficult language to learn and start using.
- cutler 8y agoHere's why I wouldn't choose it. When I look at a screen of idiomatic, PSRx-compliant PHP code I'm lucky if it contains 10 lines of code. Most of the space is occupied by KR-style space-wating layout plus blank lines between every line of code. Then there are the half-screen doc comments. Ruby, by contrast, is concise and code-focused instead of boilerplate-focused.
- scns 8y agoPHP makes it really easy to write insecure software, because the first googleresult is often outdated and hacked in a short time by automated scripts. The defaults of functions/methods in the standard library are often insecure. if you want to write good PHP i can recommend following resources: https://paragonie.com/software https://paragonie.com/software Would use their stuff if i wrote PHP https://www.phptherightway.com https://www.phptherightway.com https://phpdelusions.net https://phpdelusions.net even though the name sounds abrasive it is a good resource on dbaccess if you want to know specifics. It is from a guy with several SO gold badges.
- PunchTornado 8y agolaravel can do all that
- philwelch 8y agoI did full-time Ruby on Rails development for between three and five years. These days, a huge chunk of what's "included" in Rails is stuff I don't need, and a huge chunk of what's not included in Rails is absolutely essential: Stuff included in Rails I don't need: * ORM * Heavyweight controllers * Server-side HTML templating Stuff not included in Rails that I do need: * Basic DB-level sanity checks, such as uniqueness constraints that actually work * Any kind of real frontend framework Stuff that I desperately want that Rails makes fundamentally impossible: * Sane concurrency * Not having to pull my hair out over random values in my codebase magically turning into "nil" The best pattern for developing basic web applications that I've seen lately is basically: * Use React for the UI. (If you prefer another front-end framework, I don't really want to fight about it, but React is pretty damn good.) Host your statics, well, statically. * For your backend, use the simplest possible mechanism that receives HTTP requests and emits JSON. If you're married to Ruby, Sinatra does this. Flask does this. Node and Go and Java all have relatively simple mechanisms for this. The mechanism doesn't matter. Route HTTP requests to function; return JSON (or some HTTP response object that encapsulates your JSON) from function. * For interacting with a relational database, use sprocs. SQL isn't hard; ActiveRecord is probably the best example of the Rails antipattern of, "make easy things easier, and hard things harder".