-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Update Pyramid section to be descriptive of what the framework is. #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,8 @@ project as-is, or customized to fit your needs. | |
There are annual Django conferences `in the United States | ||
<http://djangocon.us>`_ and `in Europe <http://djangocon.eu>`_. | ||
|
||
The majority of new Python web applications today are built with Django. | ||
Django is a popular framework and you will find many sites and projects built | ||
with on it. | ||
|
||
Flask | ||
----- | ||
|
@@ -85,9 +86,8 @@ For those that do, there are many | |
`Extensions <http://flask.pocoo.org/extensions/>`_ available that may | ||
suit your needs. Or, you can easily use any library you want yourself! | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this PR is to be accepted, this change will need to be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is Flask the default? What makes that statement factually true? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't agree that this change would need to be removed. Why is Flask a "default" choice for any Python web application that isn't a good fit for Django? What exactly about Flask makes it a "default" choice? A "default" choice by whose standards? This could be reworded as "Flask is a good choice for Python web applications that don't require all of Django's bells and whistles", and it wouldn't exclude every single other framework to the exclusion of Django/Flask. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bertjwregeer that rewording isn't bad. However, the sentence is intended to do exactly what you suggest. If this PR is to be accepted, this change will need to be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am I misunderstanding you here? If the intent of the sentence is excluding everything but Flask and Django, why even mention Pyramid? Also, from Flask docs: "However Flask is just not designed for large applications or asynchronous servers. Flask wants to make it quick and easy to write a traditional web application." Are you seriously saying that Django is the only option for large applications? Or are you simply not in agreement with the Flask docs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cguardia He mentioned that here: https://github.com/kennethreitz/python-guide/pull/692#issuecomment-203679472 Let me quote:
So he wants to be nice to the Pyramid community, yet the entire thing reads like "Pyramid is not used so you shouldn't either". A backhanded compliment if you will. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section's purpose is to recommend the following:
As mentioned elsewhere on this page, Pyramid could easily be left out of this document, as could tornado (as web2py is). However, I think they are both worthy of mention, with attention brought towards the fact of why they wouldn't otherwise be included. |
||
Flask is default choice for any Python web application that isn't a good | ||
fit for Django. | ||
|
||
Flask is a common choice over Django because it is for developers who like | ||
minimalistic approach. | ||
|
||
Tornado | ||
-------- | ||
|
@@ -102,14 +102,27 @@ I do not recommend using Tornado unless you think you need it. | |
Pyramid | ||
-------- | ||
|
||
`Pyramid <http://www.pylonsproject.org/>`_ is a lot like Django, except | ||
with a heavier focus on modularity. It comes with a smaller number of | ||
libraries ("batteries") built-in, and encourages users to extend its | ||
base functionality. | ||
`Pyramid <http://www.pylonsproject.org/>`_ lies somewhere between a big | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This paragraph existed in the guide for a while, and was re-written as the original paragraph you are suggesting to replace. What exact information does this pice of text provide that the version your are suggestion be replaced does not? I would prefer to add an additional sentence instead of using this block. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pyramid is not at all like Django. It does not make sense to make that comparisson. Django is monolithic, Pyramid is anything but. Django tightly couple it's ORM, its Models, Admin and Form management. Pyramid does none of that and has no opinions about the Resources it uses with only one of them being SQLAlchemy, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggesting it's a lot like Django does a huge disservice to anyone reading the guide. Unlike Django Pyramid is not kitchen sink included. We allow users to pick and chose from the vast Python eco-system so that they can use best of breed tools without requiring explicit framework support. Pyramid also follows Python packaging standards more closely, which leads to better code re-use across projects, and can work a lot like Flask or Django, and as projects grow Pyramid more easily grows with them, so start Flask like, and over time grow to use the Django like functionality, no rewrites required. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thats what "a heavier focus on modularity" is intended to address. Let's focus on rewording that sentence, then. |
||
framework like Django and the microframeworks. Instead, it practices a modular | ||
approach where you can specify include any libraries as needed which provides a | ||
great deal of extensibility. By contrast to Django which includes everything in | ||
one package (though you might not need to use it all). | ||
|
||
Notably, Pyramid provides a lot of adapters to existing libraries. For example, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole paragraph should be able to be reduced to a sentence or two. |
||
it supports nearly all the templating languages Python has to offer and | ||
it's modular approach allows you use more then one. Same is true of it's | ||
database support. You can use SQLAlchemy, Mongo, ZoDB all in the same | ||
application without much trouble. | ||
|
||
Additionally, Pyramid has a huge focus on complete | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This paragraph is needless. Trying to keep these sections succinct. |
||
`documentation <http://docs.pylonsproject.org/en/latest/docs/pyramid.html>`__ | ||
and boast 100% unittest coverage. | ||
|
||
**Support** can also be found in the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This paragraph is needless. Trying to keep these sections succinct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It the same size as Django and Flask sections actually. Reword it as you wish. |
||
`documentation <http://docs.pylonsproject.org/en/latest/index.html#support-desc>`__. | ||
|
||
Pyramid does not have a large user base, unlike Django and Flask. It's a | ||
capable framework, but not a very popular choice for new Python web | ||
applications today. | ||
Pyramid is a good choice for developers who like flexibility of their | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's important to note here that Pyramid's userbase and community is significantly smaller than the other frameworks mentioned. Code quality is far from the the only qualifier when selecting a web framework. |
||
application including what they need and nothing extra. | ||
|
||
Web Servers | ||
::::::::::: | ||
|
@@ -452,16 +465,16 @@ you can replace it with a more terse and readable syntax that uses the pattern | |
But keep in mind that the full `<span tal:replace="expression">Default Text</span>` | ||
syntax also allows for default content in the unrendered template. | ||
|
||
Being from the Pyramid world, Chameleon is not widely used. | ||
Integration with Chameleon is available for a number of popular web frameworks | ||
including Plone/Zope2, Pyramid, Django and Grok. | ||
See: https://chameleon.readthedocs.org/en/latest/integration.html | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not proper link syntax for this project. This link is also generally needless, as long as we're linking to the overall documentation. |
||
|
||
Mako | ||
---- | ||
|
||
`Mako <http://www.makotemplates.org/>`_ is a template language that compiles to Python | ||
for maximum performance. Its syntax and api is borrowed from the best parts of other | ||
templating languages like Django and Jinja2 templates. It is the default template | ||
language included with the `Pylons and Pyramid <http://www.pylonsproject.org/>`_ web | ||
frameworks. | ||
templating languages like Django and Jinja2 templates. | ||
|
||
An example template in Mako looks like: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this PR is to be accepted, this change will need to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed because it creates bias for the Python webframework. Django might be popular but it is anything but certain that most web application are built with Django. In fact Python has about 35 web frameworks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this PR is to be accepted, this change will need to be removed.