News for hackers. Stuff that matters.
Re:Ask HN: Django or Rails? by msie on Sunday June 10, 2018 @02:33PM (#17279490)
Interestingly, I'm learning Django right now because of enough bad experiences with Rails. This may sound obvious but if you don't do things the Rails way then you'll have a harder time taking advantage of what Rails gives you. Some things which I consider essential to web development are not included with Rails but available via gems which I think are unfortunate: session management, authentication and administration. The model files don't contain any information on the schema like you would expect. You have to dig into the schema file in order to find that. The documentation is bad for Rails and the Ruby ecosystem in general. Lots of magic...
Re:Ask HN: Django or Rails? by handbanana on Monday June 11, 2018 @06:42AM (#17283194)
> Some things which I consider essential to web development are not included with Rails but available via gems which I think are unfortunate: session management, authentication and administration

You must dislike a lot of web frameworks

> The model files don't contain any information on the schema like you would expect

What schema information were you expecting?

Re:Ask HN: Django or Rails? by cryptography on Sunday June 10, 2018 @02:40PM (#17279528)
So is RoR something like Flask[0] which provides you with basics and all other bells and whistles (e.g. ORM, Forms, Admin, Auth, etc..) are available via extensions?

[0] http://flask.pocoo.org/

Re:Ask HN: Django or Rails? by robin_reala on Sunday June 10, 2018 @03:27PM (#17279767)
Sinatra[1] is more like Flask. From your list Rails has an ORM (ActiveRecord) and built in ActionView form helpers, but no default admin interface or authentication. The standard authentication library in the community is usually Devise[2]. What ‘etc’ includes is difficult to comment on :)

[1] http://sinatrarb.com/

[2] https://github.com/plataformatec/devise

Re:Ask HN: Django or Rails? by strife25 on Sunday June 10, 2018 @03:25PM (#17279753)
Not at all. The ruby equivalent to Flask is Sinatra: http://sinatrarb.com

Rails and Django are equivalent to each other from the sense of providing an MVC based framework to build a web application.

Re:Ask HN: Django or Rails? by tylerritchie on Sunday June 10, 2018 @03:47PM (#17279852)
No. Sinatra [1] is more like Flask.

Rails has session management, forms, ORM, and simple authentication all built in (as well as asset compilation, schema migrations, websockets, asynchronous processing, file uploads, etc). Models do not contain schema definitions, they're defined elsewhere. Admin functionality needs to be added.

I've got some experience in Python at this point if I were to build a new CRUDy business app I would use Rails because of my familiarity with Ruby and Rails. If I wanted to learn more Python as a main goal I'd pick Django.

[1] http://sinatrarb.com/

Re:Ask HN: Django or Rails? by BerislavLopac on Sunday June 10, 2018 @05:12PM (#17280162)
Django is not the best solution if your goal is to learn Python -- it simply has too many magic going on underneath, and some of their solutions are convoluted due to its specific architecture and backward compatibility requirements.
Re:Ask HN: Django or Rails? by BerislavLopac on Sunday June 10, 2018 @05:41PM (#17280305)
> This may sound obvious but if you don't do things the Rails way then you'll have a harder time taking advantage of what Rails gives you

> Lots of magic...

The same is largely true of Django as well.

Re:Ask HN: Django or Rails? by pritambaral on Monday June 11, 2018 @04:04AM (#17282605)
In fact, it's stronger with Django. Rails (because of Ruby) is more flexible in the right hands.
Re:Ask HN: Django or Rails? by BerislavLopac on Monday June 11, 2018 @04:35AM (#17282730)
I'm curious, what makes Ruby more flexible than Python in that context?