Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django for web2py developers

Tags:

django

web2py

Now that I've gotten relatively familiar with web2py, I'd like to give Django a go.

What are the main differences?

What would be the most efficient way to get started taking into account web2py knowledge? (It must help to have some python application framework knowledge,no?)

EDIT

Also, if you've used both, can you offer an opinion on which you prefer and why?

like image 861
carrier Avatar asked Dec 10 '09 02:12

carrier


People also ask

Is web2py better than Django?

web2py differs from Django because it is more compact, easier to learn and does not have any project-level configuration files. web2py is less verbose than Java-based frameworks and its syntax is much cleaner than PHP-based frameworks. This makes applications simpler to develop, and easier to read and maintain.

Does web2py support Python 3?

web2py runs with CPython (the C implementation) and PyPy (Python written in Python), on Python 2.7 and Python 3.

Is web2py full-stack?

web2py is a full-stack framework, meaning that it contains all the components you need to build fully functional web applications. web2py is designed to guide a web developer to follow good software engineering practices, such as using the Model View Controller (MVC) pattern.

What is the disadvantage of Django?

One of the primary disadvantages is that the Django web framework has a steep learning curve. Although it is a clear and simple framework, it is written in Python, which makes it difficult to learn. Django comes with a lot of features and configuration that can't be easily understood by developers.


1 Answers

web2py was very much inspired by Django and if you know one it is easy to learn the other. We added some features we did not find in Django, including: database migrations (alter tables automatically), tickets on errors, a web based IDE, a database abstraction layer that works on Google App Engine, a role based access control mechanism with pluggable login modules.

One of the fundamental design differences is that in Django apps are implemented as modules and therefore you need to restart the server when you edit them. In web2py instead Models/Views/Controllers are not modules, they are executed (not imported) by the frameworks and therefore you do not need to restart the server when they change.

Another difference is that Django uses an ORM, web2py uses a DAL. The DAL is slightly lower level than the Django ORM and this makes it closer to the SQL syntax (for example is allows left joins, arbitrary aggregates, nested selects and combinations thereof) while remaining portable (we support 10 different databases). The DAL also make it easy to do dynamic meta-programming of models (such as create models at runtime based on specs stored in file such as an XML or CSV file).

Django has been around longer so you find more people skilled with it and more applications deployed.

like image 110
mdipierro Avatar answered Sep 28 '22 10:09

mdipierro