choice of web-framework

justin walters walters.justin01 at gmail.com
Sun Oct 22 14:05:42 EDT 2017


On Sun, Oct 22, 2017 at 3:24 AM, Patrick Vrijlandt <nieuws.pv at xs4all.nl>
wrote:

> Hello list,
>
> I would like your recommendation on the choice of a web framework.
>
> The project is completely new, there are no histories to take into account
> (current solutions are paper-based). The website involves questionnaires
> that will be developed, filled out and stored. Users are not programmers or
> developers. They should be authenticated. Version control is required.
> Internationalization is not an issue. I expect that the project will add
> additional requirements and complexity later on that I can not foresee yet.
> I'm targeting a single deployment (maybe a second on a development
> machine). I usually work on Windows, but Linux can be considered.
>
> I'm not afraid to learn a (=one) new framework (that would actually be
> fun) but trying out a lot of them is not feasible. My current goal is a
> demonstration version of the project as a proof of concept. I may want to
> hand it over to a commercial solution at that stage.
>
> I'm an experienced python programmer but not an experienced web developer.
> A few years ago I read some books about Zope and Plone, but never did
> serious development with those. I currently maintain an intranet site in
> MoinMoin. I assume Zope could still be a potential choice, but it may have
> lost the vibrancy of a few years ago. Also, I would not know which version
> to choose (Zope 4, BlueBream, or something like Grok). The problem seems
> too complicated for micro frameworks like bottle of Flask. Django could be
> the next alternative.
>
> Finally, for a new project, I would not like to be confined to Python 2.7.
>
> What are your ideas?
>
> Thanks in advance,
>
> --
> Patrick
> --
> https://mail.python.org/mailman/listinfo/python-list
>

I think your best choice here would be Django. I've been doing web
development with Python
for about 5 years now and I have only found thing that Django can't handle:
replacing the authentication
framework's dependence on SQL. i.e., if you wanted to use a noSQL db like
MongoDb for your user
model, it's not really possible without a ton of work. Other than that
though, Django can pretty much do everything.

Since you need to get this prototype done quickly, I think Django is your
absolute best choice. The projects motto is
"The web framework for perfectionists with deadlines." You get a ton of
stuff out of the box:

- User authentication
- Sessions
- Admin interface
- Fantastic ORM
- Templating (like jinbja2 but with some Django flair)
- The best documentation I have ever seen
- A huge ecosystem of third party libraries and plugins
- A strong and heavilly opinionated MVC architecture
- One of ths strongest and best suppported OSS projects in existence
- Built in and versioned schema migrations

The reasons I would not reccomend Flask/Bottle for your project
specifically:

- Flask is better for more "customized" solutions or simpler projects
- Flask is a great framework, but offers very little out of the box as far
as modern web application features
- It takes longer to get rolling with Flask(a lot more initial
configuration)
- When using Flask, many devs end up building their own version of Django
anyways
- Flask's tutorial is a lot less in-depth than Django's
- Although learning Flask in its entirety is much simpler than learning
Django in its entirety, it takes more time
  to get up and running with Flask in my experience.

Web2py/zope/other small and old frameworks:

- I would stay away from these unless you have a lot of experience with
them.
- These projects do not have a modern ecosystem of libraries and may not
have full Python3 support
- You will find less community memebers that are able to help you as there
are less people using these frameworks

Hug/Sanic/Falcon/ApiStar:

- These are designed around the idea of REST apis
- They offer less than Flask does out of the box(except for building REST
apis)
- They are fairly new and have not had the time to build up a supportive
ecosystem yet
- They rely on new language features like async
- Their docs are not up to par with more mature projects

Pyramid:

Though I haven't ever worked with Pyramid, I have met several people who
are very happy with it. I also met with
one of the project's core contributors and he spoke about how the
architecture is "plugin based". There is the the core library
and all of the other layers of the application such as the data layer or
authentication, for example, are officially supported
plugins. Might be worth looking into.



More information about the Python-list mailing list