3 ms·
Ask HN: What's your preferred web application structure?
I've created a lot of small web apps using python with flask without ever really thinking about it. I'm about to embark on a bigger project, and I'm getting a little overwhelmed with all the options, and the lack of guides.
Should I use Python or PHP? (I'm leaning towards Python)
Should I use Django, Pyramid, Flask, or something else as the framework? (I'm leaning towards Django)
Should I buy hosting, use Google App engine, or get a dedicated server?
How will I store data, how will users login (Open ID, or should I create a login service).
How will things scale if the app performs well?
Can anyone recommend a good book or resource on navigating all the options available for creating and launching a python web app?
- workhere-io 13y agoShould I use Python or PHP? (I'm leaning towards Python) Use what you know best. Should I use Django, Pyramid, Flask, or something else as the framework? (I'm leaning towards Django) Use what you know best. I personally prefer Flask. Should I buy hosting, use Google App engine, or get a dedicated server? Google App Engine is rather pricey and has a lot of lock-in. Have you considered something like DigitalOcean or WebFaction? How will I store data, how will users login (Open ID, or should I create a login service). OpenID is pretty much dead if you ask me. Use Persona instead. Sample Persona log-in code for Flask and PHP: https://github.com/workhere-io/personaexamples https://github.com/workhere-io/personaexamples How will things scale if the app performs well? Upgrade your VPS. Flask + PostgreSQL can take quite a couple of hits.
- chishaku 13y ago+1 Flask, especially if you already have experience with it. Check out this Flask boilerplate: https://github.com/imwilsonxu/fbone https://github.com/imwilsonxu/fbone It has Flask-login, sqlalchemy, wtforms, and other key extensions all configured out of the box. I don't have the most extensive experience but from what I understand, this template app incorporates a lot of the best practices for large scale applications.
- jnazario 13y agolargely concur with workhere-io. unless you have a sollid match for Django's use case (or something explicitly supported with a plugin) i would warn you that hammering in "oddness" into Django can be painful. for the features you are paying a price of some restrictions. also, study caching mechanisms. as for logins, i would suggest marrying up with an existing authentication infrastructure that looks similar to your userbases' typical login stack - facebook, google, twitter, etc - and avoid doing it yourself.