I am planning to build an app using python-flask and mongodb, but I have absolute zero experience on those. I would like to know Why one prefers MongoDB, and is there any kind of user authentication is possible within the app. i.e., A new user signs up and later authenticates his username and password and gets an access and and start up his session, and simultaneously gets authorization to his data. And once on click of logout link his sessios gets destroyed.
Thanks in advance.
and is there any kind of user authentication is possible within the app. i.e., A new user signs up and later authenticates his username and password and gets an access and and start up his session, and simultaneously gets authorization to his data. And once on click of logout link his sessios gets destroyed.
We are not here to code your site for you however I believe this tutorial from 10gen might help you out: http://docs.mongodb.org/manual/tutorial/write-a-tumblelog-application-with-flask-mongoengine/ .
Since you know nout (like me) abut Python I am gonna give you a few tips:
Why one prefers MongoDB
As another SOer said above this is extremely subjective so I am gonna send you to some links, these may or may not support the use of MongoDB but they will help you to not fall into the trap of the band wagon:
If you really must ask for my opinion and my opinion only:
Your question is really two questions:
Why one prefers MongoDB
As I mentioned in my comment, this is a pretty subjective question, and as such it doesn't fit well in the StackOverflow Question and Answer design.
Is there any kind of user authentication possible within the app?
MongoDB is simply a database: it stores data. It doesn't provide logic (such as "user authentication" or "shopping cart" or "blog post"). It provides the ability to store general data. You can certainly build applications that deal with authentication using MongoDB.
Flask is simply a framework used to handle web requests. Unlike frameworks like Django, it is designed to handle some "bare necessities", and leaves logic such as "authentication" or "submit a blog post" in control of the programmer to design. So, once again, no out-of-the-box support for authentication, but it's possible to build such a system using Flask and MongoDB as your building blocks.
See some Flask documentation on authentication for more info on some possibilities with Flask.
There are also extensions to Flask that are designed to do authentication.