By Tyler Keenan
Python is a valuable and highly flexible programming language for teams trying to get a web app up and running quickly. To accelerate the development and prototyping process even more, many developers turn to Python’s robust collection of frameworks to handle the details of implementation. There are a number of popular Python web frameworks out there, from robust full-stack options designed for enterprise-scale applications, to ultralightweight microframeworks optimized for building small, specialized tools.
In this article, we’ll look at some of the most popular Python frameworks and explore some of their advantages and idiosyncrasies.
Full-Stack or Microframework?
One of your main considerations in choosing a framework should be the size and complexity of your project. If you’re trying to get a feature-rich web app that will integrate with the rest of your organization’s systems, then a full-stack option could potentially save your team lots of time and effort. If, on the other hand, you’re working on a small, relatively simple project with few requirements, then a microframework might have everything you need.
A related question is how much “scaffolding” you need from a framework. A full-stack option should have just about everything you need to actually build a functioning web app–form generators, templating, access control lists, etc–so your team can assemble the pieces as needed. This is an attractive option for teams that are trying to get a product together quickly because it allows them to focus on actually building the app and not the stuff that goes around it. But if you have complex custom requirements or are working with a lot of customized software already, you may not be able to take advantage of all those libraries in the first place.
There are a bunch of full-stack options when it comes to Python frameworks. Some prominent examples include TurboGears 2, Pylons, and Web2py. That said, the most popular option, by far, is Django.
Django is the most popular Python framework around, and it’s easy to understand why. Thousands of websites are currently using Django, from daily newspapers to social media and sharing sites to major foundations and nonprofits. Since Django was originally developed for use in the newsroom, it’s no surprise that major daily publications like the Washington Post and The Guardian rely on it. Startups like Eventbrite and Disqus have turned to Django to scale quickly, while social media behemoths like Instagram and Pinterest have used it to power their dynamic web apps.
As a framework, Django is known for being fast to build and friendly to beginning programmers. It’s a “batteries included” framework, meaning it supplies all the critical components you need–template rendering, ORM, authentication, routing, etc. It’s also exceedingly well-documented, which isn’t necessarily the case with some other popular frameworks.
By taking care of a lot of decisions, Django can dramatically speed up the time it takes to bootstrap a new project. What you gain in speed, though, you may lose in long-term flexibility. For example, Django’s built-in ORM is considered fine for a majority of cases, but it’s Go to the full article.
Source:: Business 2 Community