Hacker News new | past | comments | ask | show | jobs | submit login

Fully agree. I wanted to recommend Django for a friend to get started in web development but it's such a hassle to get started, I'd rather have him start with flask or even PHP..



I would much sooner introduce someone to Flask than I would to PHP and Laravel (which is, IMO, the best current PHP framework.) Flask has an easier learning curve than Django, and is able to handle small to large applications. Plus, Python is simply a better language than PHP.

This is coming from someone who writes a lot of PHP.


You should recommend to your friend this tutorial, that it how i learned flask: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-...


Better yet, buy the new (early-release) book from Grinberg. It's fantastic.


Is Flask easier than Django for someone with no experience working directly with databases?

I have worked with Django a bit, but I've never built anything in Flask. Does Flask use an ORM, or do people need to write their own SQL?


It's common to use SQLAlchemy with Flask, so the answer depends on how comfortable you are with that ORM.

That being said, you should absolutely at least learn the basics of working directly with databases. ORMs are a leaky abstraction, and you will run into situations where it's easier to drop into raw SQL to get the job done. Think of it like this: using GPS while driving is fine 95% of the time, but when it malfunctions or breaks, you're screwed unless you know how to read a map or ask for directions ;)


SQL are a leaky abstraction too, and ORMs get rid of an extremely high amount of common beginner errors.

Using raw SQL instead of an ORM is one of the best examples of premature optimization I can think of (unless you are very very good at SQL and have a very complicated structure).


Django's ORM is great for simple SQL. Anything moderately complex is going to require you to understand SQL, plus other features of the ORM (extra / raw queries).


You could also set them up with HiveMind (crudzilla.com), I am the developer. It is a cloud IDE you can install on your own.

You can get quickly started with a bunch of languages without doing any setup, which is ideal for people learning to code.

Here's also a short installation guide (for Ubuntu):

http://blog.crudzilla.com/2014/04/hivemind-on-digital-ocean-...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: