News for hackers. Stuff that matters.
Re:Modern Front-end in Rails by zabana on Friday December 08, 2017 @12:13PM (#15880181)
Not trying to start a flame war here, buy what is the argument for using Rails over Express or Django/Flask for a new project ? Genuinely curious to know the benefits / downsides of each option
Re:Modern Front-end in Rails by sho on Friday December 08, 2017 @12:37PM (#15880356)
You can't compare Rails to Express. It's a much, much more full-featured web framework. JS doesn't really have an equivalent to Rails (that I know of).

Django is comparable in scope but Rails is many times more popular and a lot more work has gone into it. IMO you would need a very good, specific reason to choose Django over the far more popular Rails.

Re:Modern Front-end in Rails by orb_yt on Friday December 08, 2017 @01:23PM (#15880690)
> JS doesn't really have an equivalent to Rails (that I know of).

Probably Meteor, though not as mature as Rails.

Re:Modern Front-end in Rails by Can_Not on Friday December 08, 2017 @03:10PM (#15881588)
Not as mature as rails, obviously, but Adonisjs and sailsjs are options.
Re:Modern Front-end in Rails by desireco42 on Friday December 08, 2017 @12:38PM (#15880365)
Genuinely to answer, Rails offer much richer environment, Express is pretty much bare bones server, Flask is comparable to Sinatra, the only comparable thing is Django and, especially in new version it got much better, I still think Rails is much more flexible solution, which offers you a lot already premade stuff, with your ability to control how things will be used, still quite significant.

Most of all, I believe a set of good practices enforced or encouraged with Rails is what distinguish it over all other frameworks.

Most difficutlty with Rails is after few years when you need to upgrade, I feel a lot of busy work has to happen then.

Re:Modern Front-end in Rails by fleetfox on Friday December 08, 2017 @12:31PM (#15880320)
I can only comment regarding Django and it mostly boils down to python vs Ruby and what is idiomatic to them
Re:Modern Front-end in Rails by pbrb on Friday December 08, 2017 @12:50PM (#15880454)
There really aren't any major benefits/downsides anymore regardless of what you'll read. To clear one thing up, you should compare Rails/Django/Sails (each language's "full" web framework), and Sinatra/Flask/Express (minimalist web frameworks). Each of the full frameworks offer a flavor or configuration of the framework that is focused to building RESTful APIs, and you can build the front end in whatever you want. The only major difference between frameworks in each class will be the language and ecosystem it uses. Of course there will be people that have heavy feelings towards whichever ecosystem they like the most that will tell you it's WAAAYYYY better than the other frameworks, but in reality it's nonsense.

When starting a new project, my major decision is if I want to use the REST API flavor of one of these frameworks + react on the front end (substitute with your front end framework of choice), or build the project fully in the framework itself. I've been writing a lot of python lately, so I go with flask for small or quick/dirty stuff, Django or Django Rest Framework for bigger stuff. React on the front end if it needs to be a SPA.

Re:Modern Front-end in Rails by sho on Friday December 08, 2017 @01:02PM (#15880541)
> There really aren't any major benefits/downsides anymore regardless of what you'll read

Who made you the grand arbiter? There are huge differences. Rails is miles ahead in the options you present. Probably 90% of startups that don't have a specific reason not to, use Rails - and rightly so.

Rails has over 65k commits. Django has 25k. Sails? Less than 7k. Don't tell me these are equivalent.

Re:Modern Front-end in Rails by lozenge on Friday December 08, 2017 @07:12PM (#15883273)
You realise Django squashes every PR into a single commit right?
Re:Modern Front-end in Rails by Dirlewanger on Friday December 08, 2017 @01:52PM (#15880930)
Rails is a great entry point into web development, because it Just Works. If you need to do something not included, there's most likely a Ruby gem that integrates seamlessly with Rails. Need authentication? Authorization? Audit trails? Piping logs to different systems? There's several mature options for each in the Rails ecosystem.
Re:Modern Front-end in Rails by mmontoya on Friday December 08, 2017 @08:06PM (#15883520)
Rails is a very mature set of DSL tools. There is nothing even close to the level of integration, richness, community, and documentation that Rails offers.

Ruby by itself is a powerful reason to develop with Rails.

Re:Modern Front-end in Rails by TomK32 on Friday December 08, 2017 @12:47PM (#15880430)
One thing you probably hear a lot from Ruby devs: The language makes you happy.
Re:Modern Front-end in Rails by esaym on Friday December 08, 2017 @12:30PM (#15880316)
Well, in this case it looks like they have decent built in webpack support.